[Clam-devel] resizing InControl arrays (canvas display bug?)

Hernán Ordiales h at ordia.com.ar
Thu Jul 12 20:31:08 PDT 2007


hi,

In my last commit i've added configurable amount of voices (max 6) and
ignoreResidual option to SMSHarmonizer.

I have two questions related:

1) there is a way to limit directly DYN_ATTRIBUTE from configuration
and also see it reflected to configuration GUI?

ATM, is limited when i get that property in this way:

	int n_voices = mConfig.GetNumberOfVoices();
	if (n_voices>6) n_voices = 6;

	mVoicesPitch.Resize(n_voices, "Pitch", this);
	mVoicesGain.Resize(n_voices, "Gain", this);


2) Above code is working but there is a bug when you shrink controls
amount... (for example from 5 to 2) incontrol std::vector shrink seems
work ok, but seems related to canvas display, don't?

how can I avoid this?

here the backtrace:

(gdb) bt
#0  0xb69869e8 in QString::fromLatin1_helper () from /usr/lib/libQtCore.so.4
#1  0xb698c931 in QString::fromAscii_helper () from /usr/lib/libQtCore.so.4
#2  0x080aacaa in ProcessingBox::getIncontrolName (this=0x87e4780,
index=9) at /usr/share/qt4/include/QtCore/qstring.h:341
#3  0x080abdda in ProcessingBox::getIncontrolNameAndBounds
(this=0x87e4780, index=9) at src/ProcessingBox.cxx:631
#4  0x080ac652 in ProcessingBox::mouseMoveEvent (this=0x87e4780,
event=0xbfe77d50) at src/ProcessingBox.cxx:508
#5  0x0817b4c2 in NetworkCanvas::mouseMoveEvent (this=0x8512d88,
event=0xbfe77d50) at src/generated/../NetworkCanvas.hxx:222
#6  0xb6e22c56 in QWidget::event () from /usr/lib/libQtGui.so.4
#7  0x08179c72 in NetworkCanvas::event (this=0x8512d88,
event=0xbfe77d50) at src/generated/../NetworkCanvas.hxx:391
#8  0xb6dd8190 in QApplicationPrivate::notify_helper () from
/usr/lib/libQtGui.so.4
#9  0xb6ddabf3 in QApplication::notify () from /usr/lib/libQtGui.so.4
#10 0xb6e33639 in ?? () from /usr/lib/libQtGui.so.4
#11 0xb6e321c8 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#12 0xb6e56f34 in ?? () from /usr/lib/libQtGui.so.4
#13 0xb6861df2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb6864dcf in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x08475858 in ?? ()
#16 0x00000000 in ?? ()
load = 0.1203 max usecs: 32.000, spare = 23187.000
(gdb) load = 0.1118 max usecs: 24.000, spare = 23195.000
load = 0.1054 max usecs: 23.000, spare = 23196.000
load = 0.1087 max usecs: 26.000, spare = 23193.000

#0  0xb69869e8 in QString::fromLatin1_helper () from /usr/lib/libQtCore.so.4
#1  0xb698c931 in QString::fromAscii_helper () from /usr/lib/libQtCore.so.4
#2  0x080aacaa in ProcessingBox::getIncontrolName (this=0x87e4780,
index=9) at /usr/share/qt4/include/QtCore/qstring.h:341
#3  0x080abdda in ProcessingBox::getIncontrolNameAndBounds
(this=0x87e4780, index=9) at src/ProcessingBox.cxx:631
#4  0x080ac652 in ProcessingBox::mouseMoveEvent (this=0x87e4780,
event=0xbfe77d50) at src/ProcessingBox.cxx:508
#5  0x0817b4c2 in NetworkCanvas::mouseMoveEvent (this=0x8512d88,
event=0xbfe77d50) at src/generated/../NetworkCanvas.hxx:222
#6  0xb6e22c56 in QWidget::event () from /usr/lib/libQtGui.so.4
#7  0x08179c72 in NetworkCanvas::event (this=0x8512d88,
event=0xbfe77d50) at src/generated/../NetworkCanvas.hxx:391
#8  0xb6dd8190 in QApplicationPrivate::notify_helper () from
/usr/lib/libQtGui.so.4
#9  0xb6ddabf3 in QApplication::notify () from /usr/lib/libQtGui.so.4
#10 0xb6e33639 in ?? () from /usr/lib/libQtGui.so.4
#11 0xb6e321c8 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#12 0xb6e56f34 in ?? () from /usr/lib/libQtGui.so.4
#13 0xb6861df2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb6864dcf in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x08475858 in ?? ()
#16 0x00000000 in ?? ()
(gdb) quload = 0.1211 max usecs: 31.000, spare = 23188.000


-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9




More information about the clam-devel mailing list