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

Windows 10: Invalid parameter passed to C runtime function. #402

Closed
bubbasnmp opened this issue Apr 2, 2021 · 6 comments
Closed

Windows 10: Invalid parameter passed to C runtime function. #402

bubbasnmp opened this issue Apr 2, 2021 · 6 comments

Comments

@bubbasnmp
Copy link

The error/warning message gets logged to the VS Code debug log.
Would be nice to have a clean log before it gets to whatever I've broken in my code. :-)

ares_init.c: static int get_DNS_AdaptersAddresses(char **outptr)

/* Usually this call suceeds with initial buffer size */
res = (*ares_fpGetAdaptersAddresses) (AF_UNSPEC, AddrFlags, NULL,
ipaa, &ReqBufsz);

Invalid parameter passed to C runtime function.


cares.dll!get_DNS_AdaptersAddresses(char * * outptr) Line 1139 (c:\vcpkg\buildtrees\c-ares\src\res-1_17_1-7723edf4cb.clean\src\lib\ares_init.c:1139)
[Inline Frame] cares.dll!get_DNS_Windows(char * *) Line 1322 (c:\vcpkg\buildtrees\c-ares\src\res-1_17_1-7723edf4cb.clean\src\lib\ares_init.c:1322)
cares.dll!init_by_resolv_conf(ares_channeldata * channel) Line 1457 (c:\vcpkg\buildtrees\c-ares\src\res-1_17_1-7723edf4cb.clean\src\lib\ares_init.c:1457)
cares.dll!ares_init_options(ares_channeldata * * channelptr, ares_options * options, int optmask) Line 204 (c:\vcpkg\buildtrees\c-ares\src\res-1_17_1-7723edf4cb.clean\src\lib\ares_init.c:204)
libwireshark.dll!host_name_lookup_init() Line 3141 (c:\Development\wireshark\epan\addr_resolv.c:3141)
libwireshark.dll!epan_init(void(*)(register_action_e, const char *, void *) cb, void * client_data, int load_plugins) Line 248 (c:\Development\wireshark\epan\epan.c:248)
Wireshark.exe!main(int argc, char * * qt_argv) Line 794 (c:\Development\wireshark\ui\qt\main.cpp:794)
Wireshark.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 97 (c:\Users\qt\work\qt\qtbase\src\winmain\qtmain_win.cpp:97)
[Inline Frame] Wireshark.exe!invoke_main() Line 102 (d:\a01\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:102)
Wireshark.exe!__scrt_common_main_seh() Line 288 (d:\a01\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
kernel32.dll!00007ffb79707974() (Unknown Source:0)
ntdll.dll!00007ffb7990a2d1() (Unknown Source:0)
@bradh352
Copy link
Member

bradh352 commented Apr 2, 2021

What parameter are you saying is wrong?

@bubbasnmp
Copy link
Author

bubbasnmp commented Apr 2, 2021

That's the message from Windows / VS Code.
If there is data I can collect to help diagnose this, glad to do it.

Ha! - I should have googled more:
https://developercommunity.visualstudio.com/t/getadaptersaddresses-invalid-parameter-passed-to-c/363323

@bradh352
Copy link
Member

bradh352 commented Apr 2, 2021

That's what, a stack trace from a crash?

Can you get any more information?

We do have appveyor running automated tests on windows, we don't get any crashes, and this seems to be in initialization code which is the first thing called. What build system are you using to compile with windows (cmake, nmake makefiles, etc)?

@bradh352
Copy link
Member

bradh352 commented Apr 2, 2021

Also, was ares_library_init() called before this?

@bubbasnmp
Copy link
Author

I was testing on a Win10 1809 VM.
Moving to a newer win10 now and will report back (web link says fixed in win 10 1909)
I think I just stumbled across a Microsoft thing that hopefully is fixed.

@bubbasnmp
Copy link
Author

Clean load on win10 20H2.
Sorry for the noise here - closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants