VOGONS


Weird crash home-compiled debug version 0.73

Topic actions

First post, by jal

User metadata
Rank Oldbie
Rank
Oldbie

I've compiled dosbox sources for years now, and never had any problems. 0.73 compiles and runs fine on my Ubuntu desktop (debug build) - so far so good. However, since I've recently put Ubuntu (eeebunto to be exact) on my EeePC 900, I thought I'd make it a development machine as well. The problem I'm having on the laptop now is the following:
- running a build of 0.73 with --debug-enabled fails (see below)
- running a copied build of 0.73 from my desktop fails with same behaviour

with "fails" I mean the following:
- First time seems to start OK, after the splash screen I get a prompt. However, after a while (+/- 30 seconds) it crashes with 'segmentation fault'.
- Starting it again results directly in segmentation fault.
- When I remove the autogenerated config file, behaviour of 'first time' above appears again (i.e. no direct crash).
- Starting it a few times results in a few segmentation faults, but then may result in the message "E: pstream.c: Assertion 'p->io == io' failed at pulsector/pstream.c:211, function to io_callback(). Aborting." or "E: mainloop.c: Assertion '!e->dead' failed at pulse/mainloop.c:285, function mainloop_defer_enable(). Aborting."

I've played around with various output, machine and core settings, but that doesn't change the behaviour. Any thoughts on what I can check to see where the fault lies?

JAL

Reply 2 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie

while it's always a good idea to kill pulseaudio, that didn't resolve it, unfortunately (on my desktop I've still got pulseaudio running, and no problem there). haven't got the abort messages though, just the segfaults. no log in the log file, no other messages.

drives me crazy...

JAL

Reply 3 of 33, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Would it help if you ran dosbox from inside gdb (or whatever debugger you prefer)?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 4 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie
MiniMax wrote:

Would it help if you ran dosbox from inside gdb (or whatever debugger you prefer)?

I'll give it a try tonight, see what it comes up with.

JAL

Reply 5 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie

Mmm, nothing I can go on. I'm not very versed with gdb, and I don't feel like debugging the entire dosbox, but this is some output from a few startups:

[New Thread 0xb5bc7b90 (LWP 4163)]om config file /home/kilian/.dosbox/dosbox-0.7

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb77ed6e0 (LWP 4159)]
0xb7b5bdfb in fputs () from /lib/tls/i686/cmov/libc.so.6
(gdb)


[New Thread 0xb5bcdb90 (LWP 4383)]om config file /home/kilian/.dosbox/dosbox-0.7

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb77f36e0 (LWP 4379)]
0xb7d30b25 in std::string::compare () from /usr/lib/libstdc++.so.6
(gdb)


[New Thread 0xb5c56b90 (LWP 4391)]om config file /home/kilian/.dosbox/dosbox-0.7

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb787c6e0 (LWP 4387)]
0xb7db9b25 in std::string::compare () from /usr/lib/libstdc++.so.6
(gdb)


[New Thread 0xb56d6b90 (LWP 4439)]ration.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb56d6b90 (LWP 4439)]
0xb791e415 in snd_pcm_poll_descriptors_revents () from /usr/lib/libasound.so.2
(gdb)

JAL

Reply 6 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

and I don't feel like debugging the entire dosbox

None of those locations is in dosbox. Not that this'd make the debugging easier 😉

Reply 7 of 33, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

bt

1+1=10

Reply 8 of 33, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

and maybe some debug symbols to dosbox
CXXFLAGS=" -O0 -ggdb3" ./configure --enable-debug
or change the -O0 with -O2 and/or go for heavy debug stuff
this makes the backtraces (bt) contain more useful information

Water flows down the stream
How to ask questions the smart way!

Reply 9 of 33, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
h-a-l-9000 wrote:

bt

I believe this rather cryptic post means that if you give the command bt to gbd you will get a backtrace (stacktrace) with information about where the program crashed.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I believe this rather cryptic post

Actually it's the most non-cryptic way of sharing information imo, props to hal 😉

Reply 11 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie

Ok, thank's y'all, I'll try to do some more debugging tonight, if I can find the time (going on holiday this weekend, and there's unfortunately more to it than preparing your laptop for uninterrupted coding 😀).

JAL

Reply 12 of 33, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
wd wrote:

I believe this rather cryptic post

Actually it's the most non-cryptic way of sharing information imo, props to hal 😉

Actually it was pretty cryptic.

Reply 13 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A two-character string can't be THAT hard to decrypt.

Reply 14 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie

Running bt (thanks wd 😀) gives the following results for a couple of crashes:

#0  0xb7a9a078 in strcmp () from /lib/tls/i686/cmov/libc.so.6
#1 0x0815e5c3 in MAPPER_AddHandler (handler=0x80e0230 <DEBUG_Enable(bool)>, key=MK_pause, mods=2, eventname=0x823caf7 "debugger", buttonname=0x823caee "Debugger")
at sdl_mapper.cpp:2076
#2 0x080e01c1 in DEBUG_Init (sec=0xa93d0e8) at debug.cpp:1976
#3 0x0821bdc9 in Section::ExecuteInit (this=0xa93d0e8, initall=true) at setup.cpp:728
#4 0x0821be1b in Config::Init (this=0xbfd771c8) at setup.cpp:712
#5 0x0815c642 in main (argc=Cannot access memory at address 0x6e
) at sdlmain.cpp:1807


#0 0xb7bdeb25 in std::string::compare () from /usr/lib/libstdc++.so.6
#1 0x082199f9 in MSG_Add (_name=0x8240d34 "PROGRAM_MOUNT_CDROMS_FOUND", _val=0x8240d22 "CDROMs found: %d\n") at /usr/include/c++/4.3/bits/basic_string.h:2189
#2 0x080f3f7a in DOS_SetupPrograms () at dos_programs.cpp:1343
#3 0x080e6c25 in DOS_Init (sec=0xbbf7c18) at dos.cpp:1127
#4 0x0821bdc9 in Section::ExecuteInit (this=0xbbf7c18, initall=true) at setup.cpp:728
#5 0x0821be1b in Config::Init (this=0xbf903d58) at setup.cpp:712
#6 0x0815c642 in main (argc=Cannot access memory at address 0x11
) at sdlmain.cpp:1807

The first one is from a crash after removing the config file, happening after a number of seconds, the second one repeats after that.

So it seems there's some SDL problem, probably?

JAL

Reply 15 of 33, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A two-character string can't be THAT hard to decrypt.

HunterZ should have learned the hard way 😉

1+1=10

Reply 16 of 33, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
wd wrote:

A two-character string can't be THAT hard to decrypt.

Indeed, but decrypting it into the right thing requires something additional :p

BitTorrent...no
British Telecom...no
???
Profit!

Turns out it's all about context. Didn't realize that it was in reference specifically to gdb.

Reply 17 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Running bt (thanks wd)

I'm innocent, hal's the one!

BitTorrent...no British Telecom...no ??? Profit! […]
Show full quote

BitTorrent...no
British Telecom...no
???
Profit!

Ok you'll maybe even get a prize for decrypting "bt" into "Profit" 😀

Maybe you can put some LOG_MSGs into the MSG_Add in messages.cpp

Reply 18 of 33, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

Maybe you can put some LOG_MSGs into the MSG_Add in messages.cpp

Ok, see if I can do tomorrow...

JAL

Reply 19 of 33, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What gcc version is that btw.? And compiling for 32bit? (logs look like that...)