Hello DTN!
I've been running iqconnect.exe just fine under wine, with an X11server for gui, until recently it stopped working. When I investigated, I see it throwing an exception inside zeromq.cpp:
Assertion failed: Socket operation on non-socket (C:\Source\IQClient\Shared\third_party\zeromq\zeromq-4.0.5\src\select.cpp:170
It appears there may be a bad cast in the code -- see the stackoverflow below.
Or perhaps there is another reason for this?
Please advise. Thank you.
# export DISPLAY=:1; /usr/bin/wine /root/.wine/drive_c/Program\ Files/DTN/IQFeed/iqconnect.exe
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
fixme:nls:GetThreadPreferredUILanguages 00000038, 0x23fa94, 0x23fab0 0x23fa90
fixme:nls:get_dummy_preferred_ui_language (0x38 0x23fa94 0x23fab0 0x23fa90) returning a dummy value (current locale)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:nls:GetThreadPreferredUILanguages 00000038, 0x23d844, 0x23d860 0x23d840
fixme:nls:get_dummy_preferred_ui_language (0x38 0x23d844 0x23d860 0x23d840) returning a dummy value (current locale)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:nls:GetThreadPreferredUILanguages 00000038, 0x23d7b4, 0x23d7d0 0x23d7b0
fixme:nls:get_dummy_preferred_ui_language (0x38 0x23d7b4 0x23d7d0 0x23d7b0) returning a dummy value (current locale)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:wer:WerRegisterFile (L"C:\\users\\root\\My Documents\\DTN\\IQFeed\\IQConnectLog.txt", 2, 0) stub!
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:msvcrt:MSVCRT__stdio_common_vsnwprintf_s options 24 not handled
fixme:module:load_library unsupported flag(s) used (flags: 0x00000060)
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:wer:WerRegisterFile (L"C:\\users\\root\\My Documents\\DTN\\IQFeed\\IQConnectLog.txt", 2, 0) stub!
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
Assertion failed: Socket operation on non-socket (C:\Source\IQClient\Shared\third_party\zeromq\zeromq-4.0.5\src\select.cpp:170)
wine: Unhandled exception 0x40000015 in thread 2e at address 0x7b44f037 (thread 002e), starting debugger...
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf options 26 not handled
fixme:msvcrt:MSVCRT__stdio_common_vsprintf_s options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
fixme:msvcrt:MSVCRT__stdio_common_vfprintf options 24 not handled
root@host: ~/.wine/drive_c/users/root/My Documents/DTN/IQFeed^G
root@host:~/.wine/drive_c/users/root/My Documents/DTN/IQFeed# cat IQConnectLog.txt
cat IQConnectLog.txt
=== IQConnect Log File Opened On Sun Dec 04 23:36:52 ===
Current Log Levels,Connectivity,Information,Admin
Current IQFeed Version,6.2.0.25
STATUS Connectivity 43 0 2022-12-04 23:36:52 Creating trader account verification thread. Status idle
STATUS Connectivity 45 0 2022-12-04 23:36:52 Initializing the login thread
STATUS Information 44 0 2022-12-04 23:36:52 Unable to start Authentication Server. Error (13): Permission denied
root@host:~/.wine/drive_c/users/root/My Documents/DTN/IQFeed#
https://stackoverflow.com/questions/44229404/why-zeromq-poll-throws-an-error-socket-operation-on-non-socketGiven ZeroMQ API / C++ binding documentation recommends to do so, one ought follow a practice to:
To obtain a ØMQ socket for use in a zmq_pollitem_t structure, you should cast an instance of the socket_t class to (void *).
comment:
I've always thought that this is a nasty little thing in the C++ bindings. It relies on the first member variable in the zmq::socket_t class being the C zm\
q socket. If you edit the definition of zmq::socket_t to change the member variable order it breaks stuff, badly. –
bazza
May 29, 2017 at 22:29
comment:
Good to know, thanks for user3666197's answer. Although cast an object to a void* pointer making me feel weired zmq reference with an example –
r0n9
Feb 16, 2018 at 3:01
comment:
Instead of C-style casting you can use socket_t::operator void*() explicitly –
stijn
May 16, 2019 at 16:43