Bug #21

SDL engine crash, related to sound module

Added by Ronan 10 months ago. Updated 8 months ago.

Status:Resolved Start:05/07/2009
Priority:High Due date:
Assigned to:divVerent % Done:

100%

Category:Engine
Target version:2.5.2 Estimated time:2.00 hours
Votes: 3

Description

OS : linux - ubuntu8.10, (Mac too ?)
DP rev 8949 (and surely before in nex2.5.1 engine)

happen most of the time in the few seconds after a map is loaded.

3 gdb "thread apply all backtrace full" provided, the first two playing online, the third replaying a demo with fast slowmo

gdb_online1.txt (4.9 KB) Ronan, 05/07/2009 07:22 pm

gdb_online2.txt (3.3 KB) Ronan, 05/07/2009 07:22 pm

gdb_demo3.txt (3.6 KB) Ronan, 05/07/2009 07:22 pm

fullcrash_osx.txt (131.5 KB) retnuh, 05/16/2009 07:20 pm

dave.txt (4 KB) Dave, 05/19/2009 02:07 pm

dp_stop_sound_race_lock.diff (1.1 KB) Blub, 05/24/2009 04:24 pm

History

Updated by morfar 10 months ago

  • Target version changed from 2.5.1 to 2.5.2

Updated by divVerent 10 months ago

Backtraces contain no useful info, but the problem is acknowledged.

Were you on a dualcore system?

If not, can you try getting a backtrace on a dualcore system? They should provide more exact info about what may have caused it than what these contain.

Updated by Ronan 10 months ago

  • % Done changed from 20 to 0

No sorry, I haven't any dualcore cpu available for the moment.

Updated by retnuh 10 months ago

I've been trying to log something to show the hang, and I finally got it to freeze up while logging. Here's the full crash report from Crash Reporter. I'm running a c2d on OS X 10.5.6. Full details are inside the attachment.

Updated by divVerent 10 months ago

  • Status changed from New to Assigned

Still no useful info about what DP was doing there :( LordHavoc should sign up here so I can assign this to him.

Updated by Dave 10 months ago

Attached a backtrace from my dual-core laptop.

Updated by Blub 10 months ago

Please see if it still happens with the attached patch.
IF IT DOES STILL HAPPEN:
The first frame should be S_StopSound, similar to:

#0  0x0000000000407e62 in S_StopChannel (channel_ind=1, lockmutex=false)

It contains a line
sfx = (sfx_t *) 0xa7e3790

Please check the channel_ind part in the first line and do:

print channels[<the channel index channel_ind>]

Which looks like this:
(gdb) print channels[1]
$1 = {listener_volume = {0, 0, 0, 0, 0, 0, 0, 0}, master_vol = 0, sfx = 0x11871450, flags = 1, pos = 0, entnum = 0, entchannel = 0, origin = {0, 0, 0}, dist_mult = 0, fetcher_data = 0x0}

The reason is because the sfx = 0x11871450 and the sfx = (sfx_t *) 0xa7e3790 show different values but should actually be the same.
My patch should fix this behaviour.

Updated by Dave 10 months ago

Works for me. The problem would usually occur within 30 minutes, I played for over an hour and still no problems.

Updated by parasti 10 months ago

Played with the patch applied last night and tonight, no crashes so far.

Updated by FruitieX 10 months ago

I have not had any crashes for a long time now either, and I have played more than usually :)

Updated by -z- 10 months ago

  • Category set to Engine

Updated by divVerent 9 months ago

  • Status changed from Assigned to Resolved

Patch applied. Can anyone check if the bug still exists? If it does, please reopen this issue.

Updated by morfar 8 months ago

  • % Done changed from 0 to 100

I have not heard any complains after this patch. 100%

Also available in: Atom PDF