Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When you start using x-ray detector, then the game crashes because of lack of sound #1966

Open
Inveriss opened this issue Apr 3, 2024 · 5 comments

Comments

@Inveriss
Copy link

Inveriss commented Apr 3, 2024

What is wrong

Hello

Everything with the game was just fine until I went to Balime to create x-ray detector. While in battle was using it, then after a while the game crashes. It was not crashing at the same time I press the button.

I checked the code and in the "Utils / Sound_Controll.cc" in line 307 there is indeed such an entry, but when I unpacked Sounds.slf I did not found such file.


	305  SOUNDSDIR "/explosion 12.wav",                              // 286
	306  SOUNDSDIR "/drink from canteen male.wav",            // 287
	
        307  SOUNDSDIR "/x ray activated.wav",                           // 288
	
        308  SOUNDSDIR "/catch object.wav",                              // 289
	309  SOUNDSDIR "/fence open.wav",                                // 290

I renamed with "REMOTE ACTIVATE.WAV" because it should be the most similar sound and it seems that the game is not crashing anymore.

Thanks

JA2S version Game version Vanilla bug? Used to work?
release 0.21.0 JA2 Gold 1.12 ENG NO YES
2024-04-03T12:48:53.0848086Z [INFO] game\GameLoop.cc: Version Label: Stracciatella v0.21.0-git
2024-04-03T12:48:53.0848086Z [INFO] game\GameLoop.cc: Version #:     Build 04.12.02
2024-04-03T12:48:53.0848086Z [ERROR] sgp\SoundMan.cc: SoundLoadDisk Error for "sounds/x ray activated.wav": openGameResForReading: VfsFile_open "sounds/x ray activated.wav": entity not found
@selaux
Copy link
Member

selaux commented Apr 4, 2024

Is this reproducible without renaming the sound (meaning it crashes everytime the device is used)?

That the sound is missing was already identified here. But this error log should have no effect, as this simply results in the related function call returning NULL and the sound not playing. For the X-Ray device this shouldnt matter as the return value is not used.

So I wonder if that is an issue with the sound part, or the actual effects of using the X-Ray device.

@Inveriss
Copy link
Author

Inveriss commented Apr 4, 2024

Yes, it crashes everytime when device has been used. But as I mentioned this is not happening at once. It is somehow delayed. Sometimes after several turns or after the battle when I'm leaving the sector etc.

@lynxlynxlynx
Copy link
Member

Sounds like memory corruption then, not really related to the sound, perhaps not even the detector. But that's hard for you to debug, since it requires something like valgrind or ASAN (manual building).

@momoko-h
Copy link
Contributor

momoko-h commented Apr 5, 2024

@Inveriss, it sounds as if you're building the source yourself? In that case, building either a Debug or at least a RelWithDebInfo build and running the game under a debugger should allow you to get a stack trace where exactly the crash happens.

@Inveriss
Copy link
Author

Inveriss commented Apr 7, 2024

Unfortunately my coding experience is near to zero. I can only compile the code with simple static changes like in this issue. I'm making a small mod for Stracciatella and when I hit some issue, then I'm just sharing with you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants