2025-07-21 17:36 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004753Spring engineGeneralpublic2015-05-06 11:05
Reporterhokomoko 
Assigned Toabma 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version98.0.1+git 
Target VersionFixed in Version 
Summary0004753: Using enqueue=true in Spring.PlaysoundStream causes a crash
DescriptionI'm not listing it under lua, because the crash is in the sound.
More info may come later.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0014433

abma (administrator)

Fix 7db5f966ff84b5fe0cfc9ba8e103ec861e9b6aa1 committed to develop branch: Merge pull request 0000195 from ashdnazg/enqueue_fix

fix enqueuing soundstreams (Fixes 0004753), repo: spring changeset id: 4932

~0014434

abma (administrator)

Last edited: 2015-05-06 01:56

View 2 revisions

just for the completeness as you already collected the info?!

stacktrace + lua snippet to reproduce it would be nice.

~0014435

abma (administrator)

(as you can't post it here it seems:)

"

    How the bug happens:
    SoundStream A plays with SoundStream B queued after it.
    When A ends, CSoundSource::Stop() is called from CSoundSource::Update() in these lines:
     
                    if (curStream->IsFinished()) {
                            Stop();
                    }
     
    This causes the following stack overflow:
     
    1) CSoundSource::Stop() calls curChannel->SoundSourceFinished()
     
    2) AudioChannel::SoundSourceFinished() sees that the queue isn't empty, and calls AudioChannel::StreamPlay() on B.
     
    3) AudioChannel::PlayStream calls curStreamSrc->PlayStream()
     
    4) The first thing CSoundSource::PlayStream() does is calling Stop() which puts us back in 1.
     
     
    The solution was to prevent AudioChannel::SoundSourceFinished() from being called in the second time we hit Stop().

"


thanks a lot for for explaining and fixing this!
+Notes

-Issue History
Date Modified Username Field Change
2015-04-21 17:56 hokomoko New Issue
2015-05-06 01:40 hokomoko Changeset attached => spring develop 28617b78
2015-05-06 01:40 abma Changeset attached => spring develop 7db5f966
2015-05-06 01:40 abma Note Added: 0014433
2015-05-06 01:40 abma Assigned To => abma
2015-05-06 01:40 abma Status new => resolved
2015-05-06 01:40 abma Resolution open => fixed
2015-05-06 01:56 abma Note Added: 0014434
2015-05-06 01:56 abma Note Edited: 0014434 View Revisions
2015-05-06 08:21 abma Note Added: 0014435
2015-05-06 11:05 abma Priority low => normal
2015-05-06 11:05 abma Severity minor => crash
+Issue History