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

nornagon commented Oct 25, 2019

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
@@ -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];

This comment has been minimized.

Copy link
@devsnek

devsnek Oct 25, 2019

Member

could this be PATH_MAX?

This comment has been minimized.

Copy link
@nornagon

nornagon Oct 25, 2019

Author Contributor

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
nornagon added 2 commits Oct 29, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

nornagon added 3 commits Nov 5, 2019
@nornagon

This comment has been minimized.

Copy link
Contributor Author

nornagon commented Nov 14, 2019

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

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@addaleax

This comment has been minimized.

Copy link
Member

addaleax commented Nov 19, 2019

Landed in 4f43418 🎉

addaleax added a commit that referenced this pull request Nov 19, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@addaleax addaleax closed this Nov 19, 2019
@nornagon nornagon deleted the nornagon:filename-module-error branch Nov 19, 2019
MylesBorins added a commit that referenced this pull request Nov 21, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@BridgeAR BridgeAR mentioned this pull request Nov 21, 2019
targos added a commit that referenced this pull request Dec 1, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins added a commit that referenced this pull request Dec 17, 2019
PR-URL: #30125
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@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
You can’t perform that action at this time.