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

The Sims 2 Castaway freezes #8999

Closed
hankyuller opened this issue Sep 21, 2016 · 19 comments
Closed

The Sims 2 Castaway freezes #8999

hankyuller opened this issue Sep 21, 2016 · 19 comments

Comments

@hankyuller
Copy link

hankyuller commented Sep 21, 2016

Ppsspp menu is still accessible, audio stops after a short while.

Here is 3 logs (same freeze, 3 different times)
https://gist.github.com/hankyuller/6695b72173e6e00323c3f0e4c731ab73

Thank you for your time

Name: The Sims 2 Castaway
Game ID: ULUS10296

@daniel229
Copy link
Collaborator

Uploading a savedata or savestate which near the freeze spot may help.

@hankyuller
Copy link
Author

Savestate: https://1drv.ms/u/s!Ar1oz8Cru1o1gmtsdxBgg9y2_s4p (onedrive)

Savedata: https://1drv.ms/u/s!Ar1oz8Cru1o1gmpnDZEQHgUMJmSv (onedrive)

Tested it with no input sent, it is supposed to freeze in a few seconds.

@daniel229
Copy link
Collaborator

daniel229 commented Sep 22, 2016

It helps by going to setting the system tab change I/O timing method to Simulate UMD delays. No,it doesn't.

@daniel229
Copy link
Collaborator

Debug log
ppsspplog

The last working build is PPSSPPWindows64v0.9.9.1-812-g7d54622 ,
from v0.9.9.1-820-g75c739d to v0.9.9.1-1351-gd545908 ,it can't go ingame,
v0.9.9.1-1355-g5fffe53 start freezing.

@hankyuller
Copy link
Author

I'm afraid I can't see your log : "cannot be displayed, because it contains errors"

If someone have trouble to open the logs I posted in op, the hyperlink is broken you must copy paste the address manually.

@unknownbrackets
Copy link
Collaborator

So that means #7258. Does this work in the IR Interpreter? Which commit broke it?

-[Unknown]

@daniel229
Copy link
Collaborator

It's not #7258 ,
it's
case 4: //olt
case 12: //lt

in CompFPU.cpp

and it works in the IR Interpreter

@gdm-1718-robbhaeg
Copy link

I am experiencing the same problem. So how do I fix this?

@Saramagrean
Copy link
Contributor

Use cwcheat freeze workaround form here.
https://forums.ppsspp.org/showthread.php?tid=2103&page=4

@Saramagrean
Copy link
Contributor

Fixed. test with v1.7.5 latest git build.
screenshot_ppsspp_20190306-122125

@unknownbrackets unknownbrackets added this to the v1.8.0 milestone Mar 7, 2019
@unknownbrackets
Copy link
Collaborator

Maybe that means this was fixed by something in #11835. Hurray. Thanks for reporting.

-[Unknown]

@TAbdiukov
Copy link

TAbdiukov commented Aug 26, 2019

While the issue is closed and 95% of crash causes seem to be fixed (thanks a lot for that!); the game still crashes once in a while.

To be clear, it doesn't get stuck in a glitchy loop and made unplayable (like before), but rather occasionally crashes the whole emulator. I played through the game a week ago, and the crashes happen once every 1 or 2 hours of playing.

What is more interesting is that a few times I happened to create a save-state before it crashes. If I happened to go back to the save-state and continue playing after restarting the emulator, the game plays as normal. Windows-specific issue perhaps?

Windows 8 x64, the official build of v1.8.0.

@hrydgard
Copy link
Owner

Does it seem to leak memory or something, if you look in the task manager details?

@TAbdiukov
Copy link

Does it seem to leak memory or something

So I tried to intensely perform as many activities possible/switching Sims/summoning as many sims possible/bringing menus many times/performing animation-rich activities (like swimming) for about 30 minutes at about 400% in game speed (so about 2 hours of 100% speed gameplay). No crash so far, but I found some possible clues

  • I tried watching the memory usage, and I noticed it gains about 5 MB at the highest memory usage every ~40minutes of 100% speed gameplay. Why at highest? The emulator (or likely the game) frees and allocates about 10 MB every second, likely to be able to pull off the rich environment with the PSP hardware limitations, plus may free or allocate additional 5 MB as the weather changes/sims come and go/non-apparent reasons. Hence it's hard to pinpoint the memory gain in the first place. But again, in general, it gains about 5 mb at the highest memory usage every ~40minutes of 100% speed gameplay

  • I noticed Sims' physical bodies began disappearing. Luckily I managed to screenshot one such moment. The game thinks Sim is still there, but it's invisible. In another case when this happened (uncaptured) I couldn't move.

    screenshot

    • Also I noticed that at this point, the "textboxes" for interactable items (bottom-right corner in the screenshot) sometimes would not appear, making these items un-interactable
  • Sometimes, the music wouldn't play when I go to pause menu. I don't really care about music (which is why I probably never noticed this problem before), but if this happens, these are error messages in the console, which seem to indicate memory allocation and freeing problems

46:10:193 user_main    E[SCEKERNEL]: util\blockallocator.cpp:140 Block Allocator (08800000-0a000000) failed to allocate 32768 (00008000) bytes of cont
iguous memory
46:10:193 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:420 Failed to allocate stack for thread
46:10:193 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:1979 80020190=sceKernelCreateThread(SND ATRAC PACKET DECODER, 08ac4330, 00000012, 32768,
00000000, 00000000): out of memory, 00008000 stack requested
46:10:193 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:2073 80020198=sceKernelStartThread(-2147352176, 136, 09fff240): thread does not exist
46:49:324 SND ATRAC PA E[ME]: hle\sceatrac.cpp:1669 80630005=sceAtracReleaseAtracID(-1): did not exist
49:36:394 user_main    E[SCEKERNEL]: util\blockallocator.cpp:140 Block Allocator (08800000-0a000000) failed to allocate 32768 (00008000) bytes of cont
iguous memory
49:36:394 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:420 Failed to allocate stack for thread
49:36:394 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:1979 80020190=sceKernelCreateThread(SND ATRAC PACKET DECODER, 08ac4330, 00000012, 32768,
00000000, 00000000): out of memory, 00008000 stack requested
49:36:394 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:2073 80020198=sceKernelStartThread(-2147352176, 136, 09fff240): thread does not exist
49:54:289 user_main    E[SCEKERNEL]: util\blockallocator.cpp:140 Block Allocator (08800000-0a000000) failed to allocate 32768 (00008000) bytes of cont
iguous memory
49:54:289 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:420 Failed to allocate stack for thread
49:54:289 user_main    E[SCEKERNEL]: hle\scekernelthread.cpp:1979 80020190=sceKernelCreateThread(SND ATRAC PACKET DECODER, 08ac4330, 00000012, 32768,

(I think, these error messages are for 3 or 4 times when this happened)

  • Possibly unrelated, but when I load the savefile I made at the last in-game location (volcano peak), this error message occurs (occured at least 2 times)
32:30:276 user_main    E[SCEAUDIO]: hle\sceaudio.cpp:263 sceAudioSetChannelDataLen(00000000, 00000200) - channel not reserved

...
Again, let me know if I can be of any help,
Tim

@unknownbrackets
Copy link
Collaborator

If you get that error at the pause menu, save state, and load state - the error continues to happen and music continues not to play, right? Does the same go for missing characters?

The pause menu error sounds like an in-game memory leak. This is probably something (maybe even timing) being emulated wrong, but it could also just be a bug in the game.

The character model issue could also be the same sort of thing, or it could be a GPU / host memory issue.

Ultimately, if PPSSPP is consistently increasing in memory usage, it means we have a leak. The PSP game itself can only allocate so much before it gets out of memory errors. The fluctuation in memory usage makes sense - we keep caches of various things, like textures, so that we can draw them quickly. They are pruned periodically.

That said, it may also be worth trying the latest git build. I don't know of anything that would fix these things specifically, but it has a number of improvements since 1.8.0 and we're probably getting closer to a 1.9.0. I'm pretty sure at least one leak was fixed.

-[Unknown]

@TAbdiukov
Copy link

If you get that error at the pause menu, save state, and load state - the error continues to happen and music continues not to play, right? Does the same go for missing characters?

Yes, if I save state, reboot the emulator, and load state, the problem persists (models don't come back, music do not resume playing). In my opinion though , most likely an in-game bug, not the emulator's one.

In the meantime, the great news are that I found a consistent way to reproduce the memory problem!

  1. Start the game normally,
  2. Go to South Volcano Beach (seemingly the most memory-hungry location; the first location on the third island)
  3. Craft "Hut stove". Go to Pause menu -> Plans & Ideas -> Object plans -> Firepits & Stoves Ideas -> Hut stove (the third item) ->craft
  4. Cook a bunch of food. Fastest is "Coconut"+"Banana". Once cooked, cook another one (luckily sim comes back to the stove)
    4.2 Now watch the log console. My observations are,
  • 5-10 dishes -> Music stops playing
  • 10-15 dishes -> Random gameplay glitches
  • 15-25 dishes -> Game crash/emulator crash

@ghost ghost mentioned this issue Jun 7, 2021
3 tasks
@hrydgard hrydgard modified the milestones: v1.12.0, Future Jul 11, 2021
@ghost
Copy link

ghost commented Sep 16, 2021

@hankyuller no feedback/outdated?

@TAbdiukov
Copy link

I'd say that it is fixed

@hankyuller
Copy link
Author

I believe it is fixed and has been for a while.

@hrydgard hrydgard removed this from the Future milestone Jan 24, 2024
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

7 participants