ed-chemnitz / qmodbus

GNU General Public License v2.0
279 stars 128 forks source link

Segfault when selecting port #10

Open Andy1978 opened 8 years ago

Andy1978 commented 8 years ago

Star qmodus, select "Modbus RTU", enable checkbox "Active". The dropdown choice "Serial Port" is now filled with "/dev/ttyS0.../dev/ttyS3", now deactivate "Active" and click it again. The dropdown choice now contains the entries doubled. If you now click on a doubled port you'll see a segfault:

Program received signal SIGSEGV, Segmentation fault. QString (other=..., this=0x7fffffffd180) at /usr/include/qt4/QtCore/qstring.h:726 726 { Q_ASSERT(&other != this); d->ref.ref(); } (gdb) bt

0 QString (other=..., this=0x7fffffffd180) at /usr/include/qt4/QtCore/qstring.h:726

1 SerialSettingsWidget::changeSerialPort (this=0x6c2f30)

at /home/andy/src/qmodbus/src/serialsettingswidget.cpp:97

2 0x000000000042468b in SerialSettingsWidget::qt_static_metacall (_o=, _c=,

_id=<optimized out>, _a=<optimized out>) at /home/andy/src/qmodbus/build/src/moc_serialsettingswidget.cxx:55

3 0x00007ffff6d9871c in QMetaObject::activate(QObject, QMetaObject const, int, void**) ()

from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

4 0x00007ffff769e4e1 in QComboBox::currentIndexChanged(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4