On Wednesday, 13 January 2016 at 18:40:39 UTC, Dav1d wrote:
On Wednesday, 13 January 2016 at 17:43:54 UTC, Jason Jeffory wrote:
On Wednesday, 13 January 2016 at 16:04:32 UTC, Dav1d wrote:
On Wednesday, 13 January 2016 at 06:30:44 UTC, Jason Jeffory wrote:
[...]

That's not correct.
Build a debug build and check the stacktrace which should be printed, if not open gdb or any other debugger and set a breakpoint on the exception. Iirc you can break on _d_throw and check the stacktrace, then you know where it actually is coming from.

Either I don't get what you are talking about, or VS doesn't do what you think it does.

When I run the program, this is the stack trace. VS pops up with an "Exception has been thrown" window and it highlights the "import derelict.glfw3.glfw3;" line. I can't get any further than that. It is a debug build. But the except is not coming directly from the test.d code.

        user32.dll!74d94790     
        user32.dll!74d94527     
        opengl32.dll!5946caa3   
        user32.dll!74db4923     
        user32.dll!74d94790     
        user32.dll!74d94091     
        user32.dll!74d93e50     
        glfw3.dll!59525797      
        glfw3.dll!5952792c      
test.exe!_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv() + 0x1b bytes D test.exe!_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv() + 0x23 bytes D
        test.exe!__d_run_main() + 0x20c bytes   D
        test.exe!__entrypoint.main() Line 7 + 0x11 bytes        D
        test.exe!_mainCRTStartup() + 0xa9 bytes D


I'm not sure what you are expecting to happen. I can't step in to anything to see more detail and the lines that VS is showing where the problem is, is not steppable. It maybe a weird issue with VisualD. I will try gbd for windows, but have to install it and learn how to use it.

Yup that trace looks like a glfw issue not sure what causes it... that stacktrace on the other hand isn't really that helpful, it doesn't show what function call caused it only that it happens somewhere in glfw then possibly the driver.

I never used the VS debugger .. so no idea if you're doing it wrong or VS is simply not capable of debugging it.

Psudeo gdb session:

r
/* crashes here */
bt full

Or if an exception is thrown

b _d_throw
r
bt full


I don't know ;/ The SIGSEGV happens when I hit a key to exit the program.



This binary was built by Equation Solution <http://www.Equation.com>... Reading symbols from test.exe...(no debugging symbols found)...done.
(gdb) r
Starting program: B:\Software\test\test.exe
[New Thread 8660.0x1310]
warning: `C:\Windows\SYSTEM32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: `C:\Windows\system32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: `C:\Windows\system32\wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: `C:\Windows\system32\wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
[New Thread 8660.0x1160]
[New Thread 8660.0xe00]
[New Thread 8660.0x2068]
[New Thread 8660.0xb58]
[New Thread 8660.0x231c]
[New Thread 8660.0x1b3c]
[New Thread 8660.0x21bc]
[Thread 8660.0xb58 exited with code 0]
[New Thread 8660.0x2488]
[Thread 8660.0x1b3c exited with code 0]
[New Thread 8660.0x27cc]
[New Thread 8660.0x237c]
[Thread 8660.0x237c exited with code 0]
[Thread 8660.0x27cc exited with code 0]
[New Thread 8660.0x2088]
[New Thread 8660.0x241c]
OpenGL Version 3.3 loaded
Key Pressed = 32 <------------------ I hit a key to exit and the SIGSEGV happens

Program received signal SIGSEGV, Segmentation fault.
0x0000002b in ?? ()
(gdb) bt full
#0  0x0000002b in ?? ()
No symbol table info available.
Cannot access memory at address 0x44
(gdb) b _d_throw
Function "_d_throw" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_d_throw) pending.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: B:\Software\test\test.exe
[New Thread 8408.0x1a5c]
warning: `C:\Windows\SYSTEM32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: `C:\Windows\system32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: `C:\Windows\system32\wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386. warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: `C:\Windows\system32\wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
[New Thread 8408.0x1cb8]
[New Thread 8408.0x2454]
[New Thread 8408.0x268c]
[New Thread 8408.0x164]
[New Thread 8408.0x2150]
[New Thread 8408.0x2398]
[Thread 8408.0x2398 exited with code 0]
[New Thread 8408.0x2314]
[New Thread 8408.0x1ff8]
[Thread 8408.0x164 exited with code 0]
[New Thread 8408.0x238]
[New Thread 8408.0x2190]
[Thread 8408.0x2314 exited with code 0]
[Thread 8408.0x1ff8 exited with code 0]
[New Thread 8408.0x27ac]
[New Thread 8408.0x22a4]
OpenGL Version 3.3 loaded
Key Pressed = 36

Program received signal SIGSEGV, Segmentation fault.
0x0000002b in ?? ()
(gdb) bt full
#0  0x0000002b in ?? ()
No symbol table info available.
Cannot access memory at address 0x4a
(gdb)




I tried some online walkthrough's and I'd get the same issue... basically `in ??`, which I have no idea what it means and it is not informative. I can put a try/catch and catch the exception to avoid the error... obviously not an ideal solution.




Reply via email to