View Issue Details

IDProjectCategoryView StatusLast Update
0001449ardourbugspublic2008-11-20 23:50
Reportertimbyr Assigned Totimbyr  
PrioritylowSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Summary0001449: Large tempo value may result in OOM condition
DescriptionIt appears the text entry used for changing the value of the tempo is not bounds tested. If I input a large value, for instance 3000000 ardour will keep allocating memory until the system runs out unused memory and a std::bad_alloc exception is thrown:

glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: St9bad_alloc

aborting...
Aborted

Perhaps the new tempo value should be set with a GtkSpinButton?

From the Gtk+ Reference Manual:

"A GtkSpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a GtkEntry, GtkSpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range."

Which seems appropriate in this case.
TagsNo tags attached.

Activities

paul

2007-02-01 16:53

administrator   ~0003145

checking the bounds is slightly orthogonal to the correct widget to use.

what should the acceptable range be?

timbyr

2007-02-01 22:07

developer   ~0003149

> checking the bounds is slightly orthogonal to the correct widget to use.

They seem related to me, I was only as a suggesting using a spinbox as it seems more appropriate to me than a text entry and GtkSpinBox supports bounds checking so there wouldn't need to be special handling of the input.

You mentioned the Gnome HIG in another bug report, if you stay with a text entry then perhaps these two points from the HIG might be worth considering.

#

"Right-justify the contents of entry fields that are used only for numeric entry, unless the convention in the user's locale demands otherwise..."

#

"When the user gives focus to an entry field using the keyboard, place the text cursor at the end of the existing text and highlight its contents (but don't overwrite the existing PRIMARY clipboard selection). This makes it easy to immediately overtype or append new text, the two most common operations performed on entry fields"

> what should the acceptable range be?

I think many metronomes have a range from 30 to about 250 bpm. I'm fairly sure that Cubase goes up to 300 bpm. Perhaps limiting the integer part to 3 digits would be sufficient.

timbyr

2007-02-04 12:17

developer   ~0003164

This issue was fixed in svn rev 1409.

Issue History

Date Modified Username Field Change
2007-02-01 13:00 timbyr New Issue
2007-02-01 16:53 paul Note Added: 0003145
2007-02-01 16:53 paul Status new => feedback
2007-02-01 22:07 timbyr Note Added: 0003149
2007-02-04 12:17 timbyr Note Added: 0003164
2007-02-04 12:17 timbyr Status feedback => resolved
2007-02-04 12:17 timbyr Fixed in Version => SVN
2007-02-04 12:17 timbyr Resolution open => fixed
2007-02-04 12:17 timbyr Assigned To => timbyr
2008-11-20 23:50 seablade Status resolved => closed