Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QSerialPortInfo::availablePorts() crashing on osx

$
0
0
Hey guys, I’ve been using QtSerial in Qt 5.1 and it seems to work fine in linux and windows but when I compiled and try it on OSX I get a malloc: *** error for object 0×1040b0000: pointer being freed was not allocated. It seems like it works about 1/2 the time and crashes the other 1/2. My app calls refresh() to refresh a view with serial devices in it when it launches and then again if the user triggers the refresh action via menu or hotkey. Here is a backtrace on the crash: App(5684,0×7fff719fa180) malloc: *** error for object 0×1040b0000: pointer being freed was not allocated set a breakpoint in malloc_error_break to debug Program received signal SIGABRT, Aborted. 0×00007fff893a1212 in __pthread_kill () (gdb) bt #0 0×00007fff893a1212 in __pthread_kill () #1 0×00007fff8940ab54 in pthread_kill () #2 0×00007fff8944edce in abort () #3 0×00007fff894229b9 in free () #4 0×00000001019a4c77 in QSerialPortInfo::availablePorts () #5 0×000000010001503f in TerminalManager::refresh (this=0×108180120) at terminalmanager.cpp:68 #6 0×0000000100020e10 in TerminalManager::qt_static_metacall (_o=0×108180120, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0×7fff5fbfee90) at moc_terminalmanager.cpp:85 #7 0×0000000100b56931 in QMetaObject::activate () #8 0×0000000100e98572 in QAction::activate () #9 0×0000000100e965fe in QAction::qt_static_metacall () #10 0×0000000100b56931 in QMetaObject::activate () #11 0×0000000105a40273 in -[QCocoaMenuDelegate itemFired:] () #12 0×00007fff834db959 in -[NSApplication sendAction:to:from:] () #13 0×00007fff8361136c in -[NSMenuItem _corePerformAction] () #14 0×00007fff8361105a in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] () #15 0×00007fff8360fce0 in -[NSMenu performKeyEquivalent:] () #16 0×00007fff8360f1a3 in -[NSApplication _handleKeyEquivalent:] () #17 0×00007fff834cc143 in -[NSApplication sendEvent:] () #18 0×0000000105a3fa80 in -[QNSApplication sendEvent:] () #19 0×00007fff833e221a in -[NSApplication run] () #20 0×0000000105a3d47d in QCocoaEventDispatcher::processEvents () #21 0×0000000100b264dd in QEventLoop::exec () #22 0×0000000100b2a049 in QCoreApplication::exec () #23 0×0000000100006ad9 in main (argc=1, argv=0×7fff5fbffb28) at main.cpp:49 Sometimes the app crashes right when it’s starting, other times it gets loaded and the view “refreshes” properly. But if I hit refresh it will almost always crash with that free issue. Since the pointer being freed is inside the QtSerial component I don’t think there is much I can do but thought I’d ask to see if anyone had encountered this. I couldn’t find a bug posted about this issue either. Any ideas?

Viewing all articles
Browse latest Browse all 13965

Trending Articles