Ticket #23 (new defect)

Opened 3 years ago

Last modified 3 years ago

sweep crashes when zooming a large file.

Reported by: kickback Assigned to: kickback
Priority: normal Milestone:
Component: sweep Version:
Severity: normal Keywords: hate
Cc:

Description

someone on #lad mentioned that loading an mp3 then quickly zooming in causes sweep to crash. he sent an mp3 and i can reproduce the problem.

Change History

02/12/06 09:30:24 changed by kickback

UPDATE: actually, it doesn't crash. it goes into an infinite loop by the looks of it.

02/12/06 11:45:57 changed by kickback

ergh, maths. the for loop at src/time_ruler.c:284 never reaches it's exit condition due to the increment ending up as 0.00001 (or at least it'll take a long while to get there given the intensive drawing code inside the loop.) so sweep gets stuck in there.

i don't understand the maths behind the function at the moment. i'll keep staring at it for a bit then put a big FIXME flag on it if i get nowhere.

02/24/06 21:19:30 changed by kickback

the problems was caused by a precison error in floating point math. switching to doubles fixes the problem to some extent but it will appear again as we load much larger files. not having worked out the new size threshold, i'm just going to wait until either the problem presents itself again or i understand the problem better.

Conrad suggested that reimplemeting the time_ruler_draw_ticks function with integer math avoids the problem but i'm not familiar with that either yet :)