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

Uninvited crashes otvdm after playing any sound #642

Closed
filipetolhuizen opened this issue Mar 15, 2020 · 8 comments · Fixed by #663
Closed

Uninvited crashes otvdm after playing any sound #642

filipetolhuizen opened this issue Mar 15, 2020 · 8 comments · Fixed by #663

Comments

@filipetolhuizen
Copy link

filipetolhuizen commented Mar 15, 2020

Playing without sounds works fine, but enabling it, it crashes a few seconds after playing any sound.
Environment:
•OS: Windows 7 64 bits SP1
•Version: dev1685 and earlier builds.

Uninvited
trace.txt

@otya128
Copy link
Owner

otya128 commented Mar 16, 2020

The tail of trace.txt seems to be missing.
I fixed it so that it would not be missing, so try to trace again with the latest version.

@filipetolhuizen
Copy link
Author

Updated trace.txt, funny thing is when it's tracing, sound play twice before crashing.
trace.txt

@filipetolhuizen
Copy link
Author

Turns out if I leave another instance of otvdm(w).exe standing by an .exe and run the game, it doesn't crash.

@filipetolhuizen
Copy link
Author

Here's x32dbg register.
register.txt

@cracyc
Copy link
Contributor

cracyc commented Apr 28, 2020

It looks top be crashing while parsing the wav file by reading past the end of the it. The file might be corrupt. I've been testing with a copy from the IA https://archive.org/details/win3_Uninvi3x .

@filipetolhuizen
Copy link
Author

That copy also crashes on the same place for me.

@cracyc
Copy link
Contributor

cracyc commented May 12, 2020

I think I know whats happening. It plays the sound then polls with an empty wav file and SND_NOSTOP waiting for success to indicate completion. The problem is the empty wav file is smaller than the wav header and when it is played it'll crash depending on what happens to be in the space that the end of the header would fill. Windows 10 handles the fault so prevents the crash but Windows 7 doesn't. The trace didn't show this because it uses SND_ASYNC so the crash is in a different thread.

@filipetolhuizen
Copy link
Author

Thanks! It's running fine now.

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

Successfully merging a pull request may close this issue.

3 participants