Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: add file name to 'Module did not self-register' error #30125

Closed
wants to merge 9 commits into from

Conversation

nornagon
Copy link
Contributor

The 'Module did not self-register' error can be difficult to track down because it's not always obvious which module is failing to self-register.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 25, 2019
@@ -484,7 +484,9 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
mp = dlib->GetSavedModuleFromGlobalHandleMap();
if (mp == nullptr || mp->nm_context_register_func == nullptr) {
dlib->Close();
env->ThrowError("Module did not self-register.");
char errmsg[1024];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be PATH_MAX?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATH_MAX + strlen("Module did not self-register.") + 1 i suppose?

given the code immediately below that also uses 1024 and includes *filename, I figured best to go for consistency :)

src/node_binding.cc Outdated Show resolved Hide resolved
@addaleax addaleax added addons Issues and PRs related to native addons. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Oct 29, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nornagon
Copy link
Contributor Author

Looks like the CI flaked out here, could someone kick it?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleax
Copy link
Member

Landed in 4f43418 🎉

addaleax pushed a commit that referenced this pull request Nov 19, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@addaleax addaleax closed this Nov 19, 2019
@nornagon nornagon deleted the filename-module-error branch November 19, 2019 18:21
MylesBorins pushed a commit that referenced this pull request Nov 21, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Nov 21, 2019
targos pushed a commit that referenced this pull request Dec 1, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants