[GH-ISSUE #230] Can't close a game and open it again #68

Closed
opened 2026-03-17 03:26:26 +03:00 by kerem · 6 comments
Owner

Originally created by @unknownbrackets on GitHub (Dec 23, 2012).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/230

Emulation breaks. Actually, there seem to be lots of places, and weird things happen.

This'll probably be fixed while implementing save states / really easy to fix after save states are done.

Anyway, it might be useful to collect a list of issues, because I realized I made some mistakes in this area and probably don't know about everything:

  • events (timer ids) are no longer valid, breaking mutex/etc. timeouts.
  • jit seems to reset badly and often crashes if enabled.
  • held mutexes/etc. aren't reset.
  • in-progress dialogs appear not to reset (not 100% sure.)
  • vblank waiting threads aren't reset.
  • the callback count isn't reset.

Also not an issue for this but for save states

  • I moved the mutex thread end listener to lazy load but that's no good.

Not sure if anything else.

-[Unknown]

Originally created by @unknownbrackets on GitHub (Dec 23, 2012). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/230 Emulation breaks. Actually, there seem to be lots of places, and weird things happen. This'll probably be fixed while implementing save states / really easy to fix after save states are done. Anyway, it might be useful to collect a list of issues, because I realized I made some mistakes in this area and probably don't know about everything: - events (timer ids) are no longer valid, breaking mutex/etc. timeouts. - jit seems to reset badly and often crashes if enabled. - held mutexes/etc. aren't reset. - in-progress dialogs appear not to reset (not 100% sure.) - vblank waiting threads aren't reset. - the callback count isn't reset. Also not an issue for this but for save states - I moved the mutex thread end listener to lazy load but that's no good. Not sure if anything else. -[Unknown]
kerem closed this issue 2026-03-17 03:26:41 +03:00
Author
Owner

@hrydgard commented on GitHub (Dec 23, 2012):

Both event registrations and events are wiped, I think, so those shouldn't be an issue. All kernel objects are deleted too.

But yeah, there are a bunch of problems left for sure.

<!-- gh-comment-id:11644226 --> @hrydgard commented on GitHub (Dec 23, 2012): Both event registrations and events are wiped, I think, so those shouldn't be an issue. All kernel objects are deleted too. But yeah, there are a bunch of problems left for sure.
Author
Owner

@unknownbrackets commented on GitHub (Dec 23, 2012):

Well, in the mutex code I have a global int that tracks the registered event. It never gets re-registered or cleared on shutdown, so it's definitely broken. I'm planning to fix the things I know about but wanted to have an issue in case there were others.

-[Unknown]

<!-- gh-comment-id:11644333 --> @unknownbrackets commented on GitHub (Dec 23, 2012): Well, in the mutex code I have a global int that tracks the registered event. It never gets re-registered or cleared on shutdown, so it's definitely broken. I'm planning to fix the things I know about but wanted to have an issue in case there were others. -[Unknown]
Author
Owner

@hrydgard commented on GitHub (Dec 23, 2012):

Fixed a couple of things for you :)

<!-- gh-comment-id:11644780 --> @hrydgard commented on GitHub (Dec 23, 2012): Fixed a couple of things for you :)
Author
Owner

@unknownbrackets commented on GitHub (Dec 24, 2012):

Thanks. I cleaned up the rest of the stuff I could find, and now it runs the same each time without crashing which is nice.

But there's something up with the GPU and I suspect it's the GL state or something... but don't really know.

Try the following:

  • Open DynoGems -> Classic Mode -> see that you can play.
  • Press F8 and wait a second or two to be sure jit is done.
  • File -> Close, and then open DynoGems right back up again.
  • Notice it seems fine so far.
  • Select Classic Mode and notice the main stuff is all... missing.

Some games just show black, seems to vary.

-[Unknown]

<!-- gh-comment-id:11656017 --> @unknownbrackets commented on GitHub (Dec 24, 2012): Thanks. I cleaned up the rest of the stuff I could find, and now it runs the same each time without crashing which is nice. But there's something up with the GPU and I suspect it's the GL state or something... but don't really know. Try the following: - Open DynoGems -> Classic Mode -> see that you can play. - Press F8 and wait a second or two to be sure jit is done. - File -> Close, and then open DynoGems right back up again. - Notice it seems fine so far. - Select Classic Mode and notice the main stuff is all... missing. Some games just show black, seems to vary. -[Unknown]
Author
Owner

@hrydgard commented on GitHub (Feb 20, 2013):

Should we close this?

Actually I've had problems using Close in the win32 port recently, dunno what's up with that.

This seems to work fine now on Android though.

<!-- gh-comment-id:13821865 --> @hrydgard commented on GitHub (Feb 20, 2013): Should we close this? Actually I've had problems using Close in the win32 port recently, dunno what's up with that. This seems to work fine now on Android though.
Author
Owner

@unknownbrackets commented on GitHub (Feb 20, 2013):

I've been crashing in gpu->EndFrame or host->EndFrame on quit, but I'm not sure why....

Anyway, yeah, let's close. There's still some weird glitch sometimes when close/open or resetting, but that's not really what this bug was about from the start anyway.

-[Unknown]

<!-- gh-comment-id:13822442 --> @unknownbrackets commented on GitHub (Feb 20, 2013): I've been crashing in gpu->EndFrame or host->EndFrame on quit, but I'm not sure why.... Anyway, yeah, let's close. There's still some weird glitch sometimes when close/open or resetting, but that's not really what this bug was about from the start anyway. -[Unknown]
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#68
No description provided.