I wrote a program which works well under Linux, but does not in Windows. It will not return from the following line:
let file = "./antenna.jpg".open()
It does not crash, it just does not return. On Windows, I tested msvc and mingw, the problem occurs in both cases. I compiled it with --debugger:native and ran it through gdb (even though I have no Idea what I'm doing here, as I've never used gdb by hand before). As the line wont return I just canceled the execution after running into the line, and then looked at the backtrace:
PS C:\Users\knorr\tmp\session_planner> gdb .\session_planner.exe
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from .\session_planner.exe...done.
(gdb) run
Starting program: C:\Users\knorr\tmp\session_planner\session_planner.exe
[New Thread 9244.0x28b0]
[New Thread 9244.0x3d4c]
[New Thread 9244.0x42a0]
[New Thread 9244.0x4788]
[New Thread 9244.0x17f8]
[New Thread 9244.0x2fa4]
[New Thread 9244.0x1c4]
[New Thread 9244.0x2f48]
[New Thread 9244.0x2038]
[New Thread 9244.0x2830]
[New Thread 9244.0x44d8]
[New Thread 9244.0x3814]
[Thread 9244.0x3814 exited with code 0]
[New Thread 9244.0xa30]
[New Thread 9244.0x5e0]
[New Thread 9244.0x1d00]
[New Thread 9244.0x1d30]
[New Thread 9244.0x3a80]
[Thread 9244.0x3a80 exited with code 0]
[New Thread 9244.0x2c54]
[New Thread 9244.0x46e0]
[New Thread 9244.0x3c34]
[Thread 9244.0x2f48 exited with code 0]
after store as image
about to load antenna image
1
[New Thread 9244.0x134c]
Thread 21 received signal SIGINT, Interrupt.
[Switching to Thread 9244.0x134c]
0x00007ff9fb17d81b in TlsGetValue ()
from C:\Windows\System32\KernelBase.dll
(gdb) backtrace
#0 0x00007ff9fb17d81b in TlsGetValue ()
from C:\Windows\System32\KernelBase.dll
#1 0x00007ff9fc737034 in KERNEL32!BaseThreadInitThunk ()
from C:\Windows\System32\kernel32.dll
#2 0x00007ff9fd37d241 in ntdll!RtlUserThreadStart ()
from C:\Windows\SYSTEM32\ntdll.dll
#3 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
This does anyone have an Idea what is going on?