Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Game crashes on continuing saved game #15

Open
bchantech opened this issue Feb 28, 2023 · 3 comments
Open

Game crashes on continuing saved game #15

bchantech opened this issue Feb 28, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bchantech
Copy link

When starting a new game, save and quit to main menu, and then continue the saved game, the game crashes.

src/ResourceManager.lua:221: [ResourceManager] Attempt to get an unknown sprite: nil


Traceback:

crash.lua:55: in function 'handler'
[C]: in function 'error'
src/ResourceManager.lua:221: in function 'getSprite'
src/Level.lua:1307: in function 'deserialize'
src/Session.lua:53: in function 'startLevel'
src/UI/Manager.lua:22: in function 'levelStart'
.\games/ZumaBlitzRemake/ui/script.lua:907: in function 'f'
src/UI/Widget.lua:421: in function 'executeAction'
src/UI/Widget.lua:129: in function 'update'
src/UI/Widget.lua:149: in function 'update'
src/UI/Widget.lua:149: in function 'update'
src/UI/Manager.lua:151: in function 'update'
src/Game.lua:132: in function 'tick'
src/Game.lua:117: in function 'update'
main.lua:109: in function 'update'
[C]: in function 'xpcall'
@ShamblesSM ShamblesSM self-assigned this Feb 28, 2023
@ShamblesSM ShamblesSM added the bug Something isn't working label Feb 28, 2023
@ShamblesSM
Copy link
Member

ShamblesSM commented Feb 28, 2023

I've been trying to get rid of this bug for ages, and I might get rid of saving games eventually since the original game doesn't allow you to do so anyway. Usually it's because of the Target (fruit) sprite not wanting to save properly (despite everything I've done to prevent it).

Edit: I will have to try and fix this anyway, since Targets may be useful for OpenSMCE as a whole.

@ShamblesSM
Copy link
Member

Okay, I can't read. Looking at line 1307 it seems like it may be an issue with ShotSpheres:

for i, tShotSphere in ipairs(t.shotSpheres) do
    table.insert(self.shotSpheres, ShotSphere(tShotSphere))
end

@ShamblesSM
Copy link
Member

Just to add to this issue I've experienced crashes with saving games trying to index cause (a nil value). It's also a hard crash to reproduce.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants