grag38 / qextserialport

Automatically exported from code.google.com/p/qextserialport
0 stars 0 forks source link

Segfault in Event-Driven Mode on POSIX #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Execute the following code (the last line is the important one, you can
change other settings as you want)
    QextSerialPort port = new QextSerialPort("/dev/ttyUSB0",
QextSerialPort::EventDriven);
    port->setBaudRate(BAUD115200);
    port->setFlowControl(FLOW_OFF);
    port->setParity(PAR_NONE);
    port->setDataBits(DATA_8);
    port->setStopBits(STOP_2);
    port->open(QIODevice::ReadWrite);
2. Watch as your program segfaults
3. ???
4. PROFIT!

What is the expected output? What do you see instead?
I expect my program to run and display an image constructed with serial
data. It works intermittently.

What version of the product are you using? On what operating system?
Latest hg on kubuntu 8.04 with Qt 4.4

Please provide any additional information below.
The library worked very nicely for a fairly long stretch of time, I don't
know if anything was different. I've unplugged and replugged my USB adapter
several times. Nothing was being transmitted when I started the program.
Backtrace:
#0  0xb74ce69d in QObject::thread () from /usr/lib/libQtCore.so.4
#1  0xb74da31f in QSocketNotifier::QSocketNotifier () from
/usr/lib/libQtCore.so.4
#2  0x0804f94a in QextSerialPort::open ()
#3  0x0804bac0 in cameraviewer (this=0x8093618) at cameraviewer.cpp:42
#4  0x0804c5cd in main (argc=1, argv=0xbfd81aa4) at main.cpp:29

Original issue reported on code.google.com by bztdli...@gmail.com on 23 Aug 2009 at 5:32

GoogleCodeExporter commented 8 years ago
When you say "The library worked very nicely for a fairly long stretch of 
time", does that mean it was running OK 
before this happened, or the library used to work OK before you updated?

There's been some reasonably major refactoring going on in the latest hg, so 
something nasty may have slipped 
in.  We'll continue to look for it - if you step through it in the debugger and 
see anything more specific, please 
let us know.

Original comment by lst...@gmail.com on 27 Aug 2009 at 4:55

GoogleCodeExporter commented 8 years ago
Sorry about the late reply and my sarcastic original post...

I traced the crash to be in the creation of QSocketNotifier, but last time I 
tried it
it worked again... I will try to provide more info the next time it happens, 
though
I'm not sure this is QextSerialPort's fault - it might be a bug in Qt.

Original comment by bztdli...@gmail.com on 1 Sep 2009 at 9:48

GoogleCodeExporter commented 8 years ago
No worries!  I'll close this issue for now, but please feel free to re-open or 
file a new one if you see it 
misbehaving again.

Original comment by lst...@gmail.com on 1 Sep 2009 at 10:12