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

Occasional crash on startup #544

Closed
TwitchBronBron opened this issue Mar 29, 2022 · 6 comments · Fixed by #573
Closed

Occasional crash on startup #544

TwitchBronBron opened this issue Mar 29, 2022 · 6 comments · Fixed by #573
Labels
bug Something isn't working

Comments

@TwitchBronBron
Copy link
Contributor

Describe the bug
Sometimes the app crashes on startup. I've seen this happen in the production version of the app, as well as when it's sideloaded. While debugging a different issue today, the crash happened. Here's the error:
image

I'm not sure why the updateUser method is being called in this context. The call stack shows that it's the only function in the call stack, so it's probably being triggered by an observer somewhere.
image

@TwitchBronBron TwitchBronBron added the bug Something isn't working label Mar 29, 2022
@jimdogx
Copy link
Contributor

jimdogx commented Mar 29, 2022

Just a quick glance, it looks like the first thing the app does (Main.brs) is set "currentUser". But if the overhang isn't available yet (e.g. timing issue?) then you'd get a crash. Might be as simple as reversing these two lines in Main.brs (so that CreateHomeGroup comes first):

   sceneManager.currentUser = m.user.Name
    group = CreateHomeGroup()

I can try this upcoming weekend, but since you are able to reproduce it, it might be worth giving it a shot and seeing if the crash goes away.

@TwitchBronBron
Copy link
Contributor Author

I tried like 100 times to reproduce it, and couldn't get it to happen again. It seems to only happen periodically.

@jimdogx
Copy link
Contributor

jimdogx commented Apr 13, 2022

You are not crazy. I got this twice this morning. Still investigating.

@neilsb
Copy link
Member

neilsb commented Apr 22, 2022

This is also odd like #560, and I agree it sounds like some timing thing. The overhang defined in the Scene XML so I would have assumed it should be created well before that was called.

I don't see any harm in having some additional checks there, just in case.

if m.overhang <> invalid then m.overhang.currentUser = m.top.currentUser

@jimdogx
Copy link
Contributor

jimdogx commented Apr 22, 2022

Funny, I've had this in my local build for a week... just waiting to see the print statement (to prove that at least it would catch it and not crash). Never could reproduce it LOL

Screen Shot 2022-04-22 at 12 59 33 PM

@neilsb
Copy link
Member

neilsb commented Apr 22, 2022

Likewise. Had it for a while trying to see if the name in the overhang is still set, but keep forgetting to look. Certainly seems to have resolved those crashes for me.

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

Successfully merging a pull request may close this issue.

3 participants