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

Crash when exiting alarm app with button after setting it #770

Closed
1 task done
Itai-Nelken opened this issue Oct 22, 2021 · 5 comments · Fixed by #816
Closed
1 task done

Crash when exiting alarm app with button after setting it #770

Itai-Nelken opened this issue Oct 22, 2021 · 5 comments · Fixed by #816
Labels
bug Something isn't working
Milestone

Comments

@Itai-Nelken
Copy link
Contributor

Itai-Nelken commented Oct 22, 2021

  • I searched for similar bug reports and found none was relevant.

What happened?

Exiting alarm app with button after seting it crashes InfiniTime sometimes.

What should happen instead?

InfiniTime shouldn't crash.

Reproduction steps

Open alarm app, set it, exit it with the button, watch will lock up and InfiniTime will reboot.
I haven't been able to reproduce this reliably though. Sometimes it happens and sometimes it doesn't.

More details?

No response

Version

Develop 1d76d91 (with pr's #746, #740, #720, #698, #679, #747, #648, #652, #586, buy none of them change the alarm other than 698)

Companion app

No response

@Itai-Nelken Itai-Nelken added the bug Something isn't working label Oct 22, 2021
@Riksu9000
Copy link
Contributor

Happened to me as well running #718, but that doesn't change the alarm, so the issue should be in develop.

@Itai-Nelken Itai-Nelken changed the title [Bug]: crash when exiting alarm app with after seting it [Bug]: crash when exiting alarm app after seting it Oct 29, 2021
@Itai-Nelken Itai-Nelken changed the title [Bug]: crash when exiting alarm app after seting it [Bug]: crash when exiting alarm app with button after seting it Oct 29, 2021
@hatmajster
Copy link
Contributor

This not always happening as I observed and also it doesn't require any changes. Just start app, press button, crash.
To me it seems like app is doing something very heavy, stops responding, and misses watchdog. Few times it finally went back to menu after about 5 seconds.

@Avamander Avamander changed the title [Bug]: crash when exiting alarm app with button after seting it Crash when exiting alarm app with button after setting it Oct 30, 2021
@mruss77
Copy link
Contributor

mruss77 commented Nov 2, 2021

I'm seeing this as well.

I wonder if this was introduced with #701, which overrides the OnButtonPushed event. Will try removing that code and see whether that resolves the issue.

It's not clear to me why the code that was introduced in that PR would cause a crash, but this is my best guess.

@mruss77
Copy link
Contributor

mruss77 commented Nov 2, 2021

Oh, I think the issue is that the OnButtonPushed code checks a couple of pointers that have not necessarily been initialized. They should be initialized to nullptr. That would explain why this doesn't predictably cause the crash because it depends on whatever random values are picked up in those variables.

I'm going to submit a PR with this and a couple of other patches for Alarm.

mruss77 added a commit to mruss77/InfiniTime that referenced this issue Nov 3, 2021
@ncartron
Copy link

ncartron commented Nov 9, 2021

I can reproduce this issue every time I use the Alarm app, either to set the alarm time, or when it has rung and i want to exit it - the PT reboots.
This is with a pre-1.7 DFU

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.

5 participants