Skip to content

Commit df98d9f

Browse files
committed
Fix audio crash: Use Sound = 0 config variable
After researching Spring engine documentation and running: ./spring --list-config-vars | grep -i sound Found the correct configuration variable: Sound = 0 (bool) - Completely disables OpenAL Previous attempts used wrong variables: ❌ snd_disable (doesn't exist) ❌ --nosound flag (doesn't exist) ❌ apulse wrapper (still segfaults) ❌ SDL_AUDIODRIVER=dummy (doesn't prevent OpenAL init) This should FINALLY fix the alcCaptureOpenDevice segfault by preventing OpenAL initialization entirely. Simplified crash detection - no more special audio crash handling since we shouldn't get audio crashes anymore.
1 parent 8a969c9 commit df98d9f

File tree

1 file changed

+17
-42
lines changed

1 file changed

+17
-42
lines changed

.github/workflows/smoke-test.yml

Lines changed: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ jobs:
3535
libopenal1 \
3636
libcurl4 \
3737
libgl1 \
38-
libglu1-mesa \
39-
apulse
40-
41-
# apulse provides PulseAudio API with no actual audio hardware needed
38+
libglu1-mesa
4239
4340
- name: Download BAR Engine (with RmlUi support)
4441
run: |
@@ -86,16 +83,14 @@ jobs:
8683
- name: Create Spring config to disable audio
8784
run: |
8885
# Create springsettings.cfg to disable audio (no sound card in CI)
86+
# Sound = 0 completely disables OpenAL (verified via: spring --list-config-vars)
87+
# This prevents the OpenAL segfault on alcCaptureOpenDevice when no audio hardware exists
8988
mkdir -p test-data
9089
cat > test-data/springsettings.cfg << 'EOF'
91-
snd_disable = 1
92-
snd_volmaster = 0
93-
snd_volgeneral = 0
94-
snd_volunitreply = 0
95-
snd_volbattle = 0
96-
snd_volui = 0
90+
Sound = 0
9791
EOF
9892
cat test-data/springsettings.cfg
93+
echo "Sound subsystem disabled via Sound = 0 config"
9994
10095
- name: Create Spring script.txt
10196
run: |
@@ -176,9 +171,9 @@ jobs:
176171
177172
# Run Spring with Xvfb (virtual X11 display) so LuaUI loads
178173
# This actually tests RmlUi initialization!
179-
# Use apulse to emulate PulseAudio (no real audio hardware needed)
174+
# Sound is disabled via Sound = 0 in springsettings.cfg
180175
timeout 10s xvfb-run -a -s "-screen 0 1024x768x24" \
181-
apulse ./spring --write-dir $(pwd)/test-data script.txt || EXIT_CODE=$?
176+
./spring --write-dir $(pwd)/test-data script.txt || EXIT_CODE=$?
182177
183178
# Wait a moment for Spring to finish writing logs
184179
sleep 2
@@ -203,38 +198,18 @@ jobs:
203198
fi
204199
205200
# Check for crash signatures in infolog
201+
# With Sound = 0, we should NOT get audio crashes anymore
206202
if grep -q "CrashHandler.*Error.*Aborted\|CrashHandler.*Error.*Segmentation\|XIO.*fatal.*error\|terminate called without an active exception" test-data/infolog.txt; then
207-
# Check if crash is audio-related (known CI limitation) vs actual bug
208-
if grep -q "alcOpenDevice\|ALSA.*pcm\|OpenALDevice\|Sound::Init" test-data/infolog.txt; then
209-
echo "⚠️ WARNING: Spring crashed on audio initialization (known CI limitation)"
210-
echo " This is expected in CI with no audio hardware"
211-
echo " Checking if SpringBoard scanned successfully before crash..."
212-
213-
# Verify SpringBoard was scanned successfully
214-
# Check for scanning completion - Spring logs archive count after scanning
215-
if grep -q "Scanning.*games" test-data/infolog.txt; then
216-
echo "✓ SpringBoard was scanned (found 'Scanning.*games' in logs)"
217-
# Show what was found
218-
echo " Archive scanner logs:"
219-
grep -E "Scanning|Found.*archives|SpringBoard" test-data/infolog.txt | head -5 || true
220-
# Accept audio crash as long as scanning happened - this validates the RmlUi conversion
221-
echo ""
222-
echo "✅ SMOKE TEST PASSED (with expected audio crash)"
223-
echo " SpringBoard successfully scanned - RmlUi conversion is valid"
224-
exit 0
225-
else
226-
echo "✗ FAIL: SpringBoard didn't scan before audio crash"
227-
tail -50 test-data/infolog.txt
228-
exit 1
229-
fi
230-
else
231-
echo "✗ FAIL: Spring crashed (NON-audio crash)"
232-
echo ""
233-
echo "=== Crash signatures found ==="
234-
grep -E "CrashHandler.*Error|XIO.*fatal|terminate called" test-data/infolog.txt || true
235-
exit 1
236-
fi
203+
echo "✗ FAIL: Spring crashed"
204+
echo ""
205+
echo "=== Crash signatures found ==="
206+
grep -E "CrashHandler.*Error|XIO.*fatal|terminate called" test-data/infolog.txt || true
207+
echo ""
208+
echo "=== Last 100 lines of infolog.txt ==="
209+
tail -100 test-data/infolog.txt
210+
exit 1
237211
fi
212+
echo "✓ No crashes detected"
238213
239214
# Check if LuaUI loaded
240215
if ! grep -q "LuaUI.*Loaded\|Loading LuaUI" test-data/infolog.txt; then

0 commit comments

Comments
 (0)