Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : DROD Linux: SDL segfault
New Topic New Poll Post Reply
Poster Message
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon DROD Linux: SDL segfault (0)  
This post is mainly intended for Trick, or at least anyone else savvy with the internals of Drod outside Windows. I *think* I could work-around the problem by doing the standard schemes (reinstall etc), but it may be more interesting to try and figure out what went wrong instead.

Whenever I start Drod, I get the following message: "Fatal signal: Segmentation Fault (SDL Parachute Deployed)". The loading screen does appear for a jiffy, prior to the message, but disappears as SDL goes down crashing. This behaviour was not corrected by rebooting, restarting X, etc. My drod.err file does not contain any error message pointing at this problem.

The problem has started yesterday, right after I ran into an X freeze. Right after I'd exited Drod (maybe fifteen seconds afterwards), X stopped responding. The magical emergency commands didn't help either; I plugged in and out my USB wireless adapter, but Linux didn't register the fact (in other words, the wireless adapter wasn't switched back on). A hard reboot resolved the problem, with no apparent side-effect (one inode in /tmp had to be fixed; journal recovery of my other partitions didn't bring up any unexpected message.

I've run into this particular message with other programs, but those relied on my own SDL libraries; I gather Drod uses its own libraries, so I doubt the problem would be on my part. I'm running Debian Unstable, Drod 2.14, X.org 7.0 with the nv drivers, and kernel 2.6.17.2 . Please let me know if you need more information; I'm not sure what else to look for myself. Near as I can tell, a strace doesn't bring up anything relevant, and I'm not sure how to run something heavier (gdb?) on the DROD bin.

Thanks,
Alneyan

[Last edited by Alneyan at 09-23-2006 08:32 PM]
09-23-2006 at 08:30 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: DROD Linux: SDL segfault (+1)  
Well, I could give you a special debug executable that can dump core*, but I'm not sure how useful it'd be. From what you describe, it sounds like the freeze messed up some of your files. ext3 reduces the chance of such things happening, but it doesn't eliminate the possibility entirely. Usually such corruption only happens to files that were written at the time of the crash (so, most likely the DROD dat files ..), but depending on what the filesystem were doing it's possible that other files were corrupted.

So, we don't know what went wrong. Now, DROD should of course not segfault, but depending on what the corruption is, this might be something that couldn't happen at all otherwise. In this kind of situation I think it's better to try a reinstall first, so I don't go looking for bugs that might not actually exist.

Before you do a reinstall, back up your dats. They're either located in ~/.caravel/drod-2_0 (per-user data option), or in the Data subdir where you installed DROD (shared data option). There will always be .dat files in the latter place, but if you used the per-user option they won't be updated. If you're not sure, the files are probably in ~/.caravel/drod-2_0, but if you want to be certain, you can check ~/.caravel/drod-2_0/DataPath.txt. The first path is the location of the data. Anyway, once you've found the .dats, copy all of them somewhere safe. Then do a reinstall.

After the reinstall, if the .dats were in ~/.caravel/drod-2_0, you don't have to do anything. DROD will automatically use your existing dats. (Otherwise, of course, copy your old dats back to where they were before). With some luck that'll fix your problems! Let me know what happens :)

- Gerry

* Basically, in stead of having SDL open parachutes for a smooth landing and disappearing in a puff of smoke, we fire DROD firmly into the ground so we can have a look at the scattered debris.

09-25-2006 at 10:46 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: DROD Linux: SDL segfault (0)  
Actually, it's the dat files that trigger the segfault. If I get them out of the way, my fresh Drod can get up and run. Odd that a data corruption could create a problem with SDL, though.

Looks like it's "download all holds" time then. drod2-0.dat is among the ones that don't work (the big data.dat does work). Where did I put my player file again...

Well, thanks for your help!
09-26-2006 at 10:23 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Briareos
Level: Smitemaster
Avatar
Rank Points: 3516
Registered: 08-07-2005
IP: Logged
icon Re: DROD Linux: SDL segfault (0)  
Alneyan wrote:
Odd that a data corruption could create a problem with SDL, though.
Well, if the corrupted DAT file makes DROD allocate an image from SDL that's about 2^31 wide and high then this could cause the SDL to die as 2^62*3 bytes usually aren't readily available... :)

____________________________
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
R.I.P. Robert Feldhoff (1962-2009) :(
09-26-2006 at 11:03 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: DROD Linux: SDL segfault (+1)  
Alneyan wrote:
Actually, it's the dat files that trigger the segfault. If I get them out of the way, my fresh Drod can get up and run. Odd that a data corruption could create a problem with SDL, though.
It's probably not a problem with SDL. What you're seeing is the SDL parachute, which is just SDL catching the segfault (wherever it might occur) and doing some cleanup to restore your system to a usable state before aborting. Ungrabbing the input so you can use your mouse, that kind of thing. Anyway, if you e-mail the dat files to me, I could reproduce the crash here and figure out if I can make DROD more resistant to crashes like this. (It probably wouldn't help much though, since we can't do much with corrupt data ..)

~ Gerry

10-03-2006 at 07:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: DROD Linux: SDL segfault (+1)  
Sure. Of course, I put the files in some obscure directory, but I've found them now. I've given up the corrupted data, and went back to my latest player file. One of those days, I'll have to fiddle with adding in some ugly hack so that DROD can export my player file on its own every week or so (the actual sending is trivial, but I have some trouble remembering to do the backup in the first place).

How do you want the actual sending to take place, though? The whole lot of them weights around 200 mB, uncompressed. p7zip or similar should shrink them, but it would still be a bit too big for a "polite" mail sending (granted, it's not an infinite MTA loop, but still).
10-03-2006 at 09:16 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: DROD Linux: SDL segfault (0)  
Well, my e-mail account doesn't technically have a size limit, and I'm on a pretty fast line here too, so I don't think there'd be a problem at my end at least, but on the other hand I don't want to blatantly abuse the system either .. 200 mb might be pushing it. How large are the files after 7z ? (or rar, etc)

~ Gerry

10-06-2006 at 01:34 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: DROD Linux: SDL segfault (+1)  
7z with compression 9 didn't do much good... The file is still a whooping 120 mB. I don't know any more efficient compressing system, though, and I doubt it'll be possible to bring the size down to more reasonable values.

I've uploaded the archive at [edited out by Schik] , for your downloading pleasure. Let me know if something is amiss.

[Last edited by Schik at 10-06-2006 12:48 PM]
10-06-2006 at 10:39 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: DROD Linux: SDL segfault (0)  
Got it.

~ Gerry

[Last edited by trick at 10-06-2006 02:04 PM]
10-06-2006 at 02:00 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : DROD Linux: SDL segfault
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.