Menu

#450 Crash on exit - r4006, VS2015

SVN
open
nobody
None
1
2017-03-02
2017-02-23
blade
No

The current revision (4006) crashes when DOSBox exits. When debugging, this message is all I get: "Exception thrown at 0x770EDF23 (ntdll.dll) in dosbox.exe: 0xC0000005: Access violation writing location 0x00000014.". No useful callstack is shown, probably because this happens after sdlmain.cpp:main() finishes.

My environment is VS2015, no external libs except SDL (v1.2.15) and this modification at the top of dosbox.cpp to make old SDL link in VS2015:

FILE _iob[] = { *stdin, *stdout, *stderr };

extern "C" FILE * __cdecl __iob_func(void) {
    return _iob;
}

Discussion

  • blade

    blade - 2017-02-28

    Moving the block of code above to sdlmain.cpp seems to resolve the issue in the SVN version. Oddly enough, the crash still happens in 0.74. I suspect moving the block of code might have only side-stepped the issue.

     

    Last edit: blade 2017-02-28
  • Qbix

    Qbix - 2017-03-02

    I don't have vs2015 installed myself. But my own build dosbox executables work properly when closing. So it has something to do with the libsdl you are using or vs2015.

    The iob stuff I could add, but the crash is weird. Does it behave differently if you disable the console (-noconsole) as that is probably the part that it touching stdin/stdout.
    The location that you are mentioning (0x14) sounds indeed like a wild zero pointor somewhere.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.