ultimate_alarm_clock icon indicating copy to clipboard operation
ultimate_alarm_clock copied to clipboard

Bug: Incorrect await usage in TimerRingController causes build failure & possible crash

Open rohitarer opened this issue 6 months ago • 2 comments

Description

The TimerRingController misused await and accessed properties on a Future, leading to compile-time errors and a potential null crash.

  • Problematic lines: AudioUtils.playTimer(alarmRecord: await getFakeTimerModel().value); // .value on a Future AudioUtils.stopTimer(ringtoneName: await getFakeTimerModel().ringtoneName); // property access before await vibrationTimer!.cancel(); // potential null crash

  • Impact: Build fails with type/property errors. Possible runtime crash if vibrationTimer is null.

What I tried Reproduced by launching a timer ring; build failed due to the incorrect .value and property access on a Future. Verified crash risk by inspecting vibrationTimer.

Screenshots

No response

rohitarer avatar Oct 27 '25 14:10 rohitarer

The code is updated and tested locally; requesting review and merge.

rohitarer avatar Oct 27 '25 14:10 rohitarer

Hi! @rohitarer 👋 I’d love to work on this issue — thank you for maintaining such a great project. I’m a student developer experienced in React and API integrations, with previous open-source contributions focused on front-end optimization and UI enhancements. My approach would be to first reproduce the reported behavior, then implement a fix by refining the component logic and ensuring consistent state handling across renders (testing thoroughly on both desktop and mobile views). I’ve worked on similar issues involving React state management and UI responsiveness in open-source dashboards and personal apps. I can have a pull request ready within 3–5 days.

Could you please assign me this issue? I’d be happy to start right away. 🚀

lakshay909 avatar Nov 07 '25 05:11 lakshay909