Open darkshoxx opened 1 year ago
Quick update, the bugreport on ScummVM has received a reply, pretty much stating the ball is in LibTAS' court for now, with some info on what may be happening. Quote:
It's my understanding from the description that this is an interoperability problem between LibTAS and ScummVM. I had never heard of LibTAS before, and I wouldn't assume anyone else here has. Reading about LibTAS, it seems that this is a program that is able to freeze arbitrary programs, record their internal states, and later freeze them and restore these internal states and then let them run. THAT IS INSANE! It's also cool! BUT IT'S INSANE. If LibTAS is failing at the insane task that they've made it their business to undertake, against all medical advice, I feel like it should be brought up with them first. A lot of developers would read that description and say, "A third party program screwed around with our RAM while we were running, crashed our program, and we have a bug?", and that would be the end of it. But let's keep this open just in case I've mischaracterized this. It could be that ScummVM code is calling some low level graphics API in an incorrect way that leads to this crash. But it's a lot more likely that the external program that's messing around with our internals at runtime is doing so badly. (Because there's no "good" way to do that!) Either way, I think the ball is in LibTAS' court. I don't think this has any relationship to the SCI engine code, but SCI does change video modes in these games, so that seems like the relevant issue. I'm kicking this to Graphics but that's kind of a guess; the least-inaccurate option.
I hope this is helpful. It's really only this issue preventing me from making more TASes of Sierra Point'n'Clicks
Posted also in scummvm ticket:
Looking at this issue: when the Phantasmagoria 1 intro cutscene starts, scummvm is calling SDL_DestroyRenderer()
then SDL_CreateRenderer()
on the current window, which calls the underlying glXDestroyContext()
and glXCreateContext()
functions.
When a savestate is saved before the cutscene, we play the cutscene, the savestate is loaded and we play again the cutscene, the SDL renderer is destroyed a second time. This is no problem for SDL because the old context was recovered as part of the savestate loading. However, GLX contexts are shared with X server, so when a request is sent to destroy the context, the server reports that the context is bad (already destroyed).
Thank you for figuring out the core of the issue. Can it be fixed? If so, where?
shameless PING before I try this again
For context: this submission would benefit greatly from this fix https://tasvideos.org/8249S
Originally posted here https://bugs.scummvm.org/ticket/14445 as I didn't know if it was a ScummVM or LibTAS issue. Copy-pasted from the submission over there
To be sure, the game does not crash if ScummVM is run WITHOUT LibTAS. LibTAS Log Excerpt.txt Added part of the log file of the crash, manually stopped, then killed the game. I also did a run where I set "log to file" but I don't know where that file is. If someone can point me to it, I can upload that as well.
Also, 20 minutes later, my PC crashed with BSOD. Not sure if related, but you know, memory leaks and such. No clue.