NellWatson / Founders-Life--New-Prototype

MIT License
1 stars 0 forks source link

v0.0.8-1227 Crash #120

Closed kwangchow closed 6 years ago

kwangchow commented 6 years ago

v0.0.8-1227 crashes when you launch play from the Main Menu.

Reproduction Rate: 100%

Reproduction Steps:

  1. Launch game
  2. Press PLAY button on Main Menu
  3. Observe fatal crash

Log: traceback.txt

DipeshAggarwal commented 6 years ago

The game launches for me without crash, everytime.

EDIT: Works for me on New Game and Resume Game too. The traceback suggests that your telemetry.rpy is a few commits behind than it should be. Do a pull and check again

kwangchow commented 6 years ago

I have the latest telemetry.rpy (see screenshot) and have tried again with a Force Recompile and a fresh pull, no change. It still crashes at launch. Can you re-commit the file so I can force overwrite?

screen shot 2018-01-02 at 16 33 46

DipeshAggarwal commented 6 years ago

So I tested again and everything works on my end.

Even the error is weird since it's saying that a variable is not defined NameError: global name 'sessions' is not defined even though it is > https://github.com/NellWatson/Founders-Life--New-Prototype/blob/master/game/telemetry.rpy#L7

Can you manually copy paste this file > https://github.com/NellWatson/Founders-Life--New-Prototype/raw/master/game/telemetry.rpy

Also, do a Force Recompile after pasting this file.

kwangchow commented 6 years ago

No luck, I'm afraid :(

  1. I followed the steps you suggested - crash
  2. I deleted my local copy of the repo and re-cloned - crash
  3. I manually replaced the telemetry.rpy file in my new local repo and force recompiled - crash

Any thoughts?

DipeshAggarwal commented 6 years ago

Weird. Please do me a favour. Zip the game folder and mail it to me.

kwangchow commented 6 years ago

Sure, link below.

https://www.dropbox.com/s/8ks1a6rm3pqo6k8/Founders-Life--New-Prototype.zip?dl=0

DipeshAggarwal commented 6 years ago

It still shows "File is uploading..." for me

EDIT: Downloaded now.

DipeshAggarwal commented 6 years ago

So I just tested it out and as weird as it may sound, it works for me without any hitch.

kwangchow commented 6 years ago

Okay, what's our next step here? We are probably going to have to take a step back to move forward again (temporarily remove telemetry, add extra debugging?). In any case, we're kind of blocked until we can address this?

DipeshAggarwal commented 6 years ago

I have asked Nell to test the game so that first we can be sure if it's a Mac specific bug or is something else at play here.

I'll let you know as soon as I know more.

DipeshAggarwal commented 6 years ago

Please try with this file. > https://www.dropbox.com/s/etmp5uwdqxf9xgs/telemetry.rpy?dl=0

I'm not going to commit it to master yet until I hear Nell's response. I want to know what the problem is, instead of just fixing symptoms and perhaps making the bug harder to find.

kwangchow commented 6 years ago

No change, I'm afraid :(

traceback.txt

DipeshAggarwal commented 6 years ago

On the contrary, it confirms a lot of things.

So what's happening is either telemetry.init() isn't running fully for some reason or the game is loading an old save where telemetry.init didn't have a chance to run. (we run it as soon as he game starts)

Can you make sure that you are not loading an old save? Reset button in the Pref menu should do it but please confirm by deleting all the folders starrting from Founders Life in /user/$name/Library/RenPy/

Thanks

kwangchow commented 6 years ago

Good news, wiping the save via Reset fixed the problem!

However, out of that come a couple of questions:

Other than that, great job, problem solved!

(I'll go through the build when I get a chance over the weekend)

DipeshAggarwal commented 6 years ago

Why was the Distribution Build also crashing - we need to be sure these are 'clean' installs (ie. no legacy save files)?

Ren'Py was loading the old save file. It doesn't matter if we have build the game or if we are running from source, the save directory is the same.

Why did the problem persist even with a local wipe and fresh clone of the project?

Save files aren't touched when you Delete Persistent or Force recompile.

So, what I think we should do is create some kind of distinction between the buttons for playing. Maybe a colour or icon change when the game is going to be resumed.

kwangchow commented 6 years ago

Understood, here's my thoughts...

  1. No-one - beyond dev - should have a pre-existing save file when they download/launch the executable.
  2. If we set autosave as the expectation then we do not need to change colour or icon, imo.
  3. In test, we should perform a reset with each update.
  4. The only problem I foresee is if we update the release version and an existing playtester installs it. At that point, we run the risk of this issue re-occurring?
  5. 4 makes me think that this isn't so much an 'invalid' issue but an extreme edge case. How do we ensure that a new distribution build is not trying to use a legacy save file?

DipeshAggarwal commented 6 years ago

The only problem I foresee is if we update the release version and an existing playtester installs it. At that point, we run the risk of this issue re-occurring?

No. This issue happened because we made changes to the "core" engine, and the old save didn't have those update parts intialised properly. Unless we make game altering changes to the code after releasing an alpha, this issue is not going to resurface,

4 makes me think that this isn't so much an 'invalid' issue but an extreme edge case. How do we ensure that a new distribution build is not trying to use a legacy save file?

Like the save/load, I can have Ren'Py use a new savedir on build if required. Or we can clear out the save folder on first run of the game to make sure we are starting with a clean slate.

kwangchow commented 6 years ago

Thanks. I think we should go with the option that is easiest to implement yet ensures that we start a 'fresh install' with a clean slate (not important for dev, I can flush using resets).

DipeshAggarwal commented 6 years ago

Alright. I will seek out the best and easiest method and push. Closing this.