Closed CarlosCraveiro closed 7 months ago
I am very grateful for your work of debug! I really just forgot the machineFrame specifically... 😅. My bad, I hope it didn't take up too much of your time.
Haha, no problem! I took the early afternoon to hunt for this bug. It was a fun experience btw, it's been a while since I debugged a C program like this.
I got excited to help when I saw your commitment to the project yesterday. In fact, I discovered this program yesterday through a post on r/unixporn and I loved the proposal. It's the Pomodoro app I always wanted!
Thanks! In a month or two I should refactor the whole app, then it should not be that buggy... as I created this app in the first year of university.
I look forward to the refactoring. Hope it stays as amazing as it is now!
The Problem
As reported in the issue #40, sometimes the action of skipping the Pomodoro was causing weird segmentation faults.
After some debugging I discovered that the frameIndex was behaving weirdly at:
Causing unexpected illegal memory accesses at
machineFrames
. I printed the value of frameIndex in the giff available at Before section.The Solution
Apparently the problem was solved by initializing the
app->machineFrame
with the other Animation Variables attomato.c
Before:
After: