deanz1
24th January 2011, 19:50
I'm getting SIGSEGV during startup processing. I never reach the first line of my main. I have isolated this to an area of qobject.cpp near line 2537
if (!check_method_code(membcode, receiver, method, "connect"))
return false;
const char *method_arg = method;
++method; // skip code
const QMetaObject *rmeta = receiver->metaObject();
int method_index = -1;
The failure happens on the line containing "*remeta =" and I'm unable to trace into function metaObject. At the time, the metacode is processing my slot "catchLtiStart.
Here is code from "moc_opolib.cpp" re catchLtiStart and others:
int Opolib::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: lasLogin((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 1: lasSetParameters((*reinterpret_cast< const char*(*)>(_a[1]))); br
case 2: lasSend((*reinterpret_cast< const char*(*)>(_a[1]))); break;
case 3: lasSend((*reinterpret_cast< const char*(*)>(_a[1])),(*reinterpret
case 4: lasSend((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: lasLogout(); break;
case 6: motLogin((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 7: motSetParameters((*reinterpret_cast< const char*(*)>(_a[1]))); br
case 8: motSend((*reinterpret_cast< const char*(*)>(_a[1]))); break;
case 9: motSend((*reinterpret_cast< const char*(*)>(_a[1])),(*reinterpret
case 10: motSend((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 11: motLogout(); break;
case 12: lasError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 13: motError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 14: catchLtiStart(); break;
case 15: catchMtiStart(); break;
case 16: catchLasConnected(); break;
case 17: catchLasError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 18: catchLasNewMessage((*reinterpret_cast< QByteArray(*)>(_a[1])));
case 19: catchLasTimedOut(); break;
case 20: catchLthFinished(); break;
case 21: catchMotConnected(); break;
case 22: catchMotError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 23: catchMotNewMessage((*reinterpret_cast< QByteArray(*)>(_a[1])));
case 24: catchMotTimedOut(); break;
case 25: catchMthFinished(); break;
default: ;
}
_id -= 26;
}
return _id;
}
And catchLtiStart is the first SLOT listed (I name SLOTs as catch*).
SLOT catchLtiStart is not much:
public slots:
void catchLtiStart() {lti.start(TIMEOUT);} //start laser SerialClient breakout timer
I'm assuming this is memory corruption or, more likely, stack corruption but am at a loss as to where to look.
Any hints?
Added after 9 minutes:
Oops, sorry about the code markup.
Version info: Qt Creator 2.0.0 based on Qt 4.7.0 (32 bit) built Jun 21 2010 at 01:56:06 using MinGW compiler g++ 4.4.0 on Windows 7.
if (!check_method_code(membcode, receiver, method, "connect"))
return false;
const char *method_arg = method;
++method; // skip code
const QMetaObject *rmeta = receiver->metaObject();
int method_index = -1;
The failure happens on the line containing "*remeta =" and I'm unable to trace into function metaObject. At the time, the metacode is processing my slot "catchLtiStart.
Here is code from "moc_opolib.cpp" re catchLtiStart and others:
int Opolib::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: lasLogin((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 1: lasSetParameters((*reinterpret_cast< const char*(*)>(_a[1]))); br
case 2: lasSend((*reinterpret_cast< const char*(*)>(_a[1]))); break;
case 3: lasSend((*reinterpret_cast< const char*(*)>(_a[1])),(*reinterpret
case 4: lasSend((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 5: lasLogout(); break;
case 6: motLogin((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 7: motSetParameters((*reinterpret_cast< const char*(*)>(_a[1]))); br
case 8: motSend((*reinterpret_cast< const char*(*)>(_a[1]))); break;
case 9: motSend((*reinterpret_cast< const char*(*)>(_a[1])),(*reinterpret
case 10: motSend((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 11: motLogout(); break;
case 12: lasError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 13: motError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 14: catchLtiStart(); break;
case 15: catchMtiStart(); break;
case 16: catchLasConnected(); break;
case 17: catchLasError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 18: catchLasNewMessage((*reinterpret_cast< QByteArray(*)>(_a[1])));
case 19: catchLasTimedOut(); break;
case 20: catchLthFinished(); break;
case 21: catchMotConnected(); break;
case 22: catchMotError((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 23: catchMotNewMessage((*reinterpret_cast< QByteArray(*)>(_a[1])));
case 24: catchMotTimedOut(); break;
case 25: catchMthFinished(); break;
default: ;
}
_id -= 26;
}
return _id;
}
And catchLtiStart is the first SLOT listed (I name SLOTs as catch*).
SLOT catchLtiStart is not much:
public slots:
void catchLtiStart() {lti.start(TIMEOUT);} //start laser SerialClient breakout timer
I'm assuming this is memory corruption or, more likely, stack corruption but am at a loss as to where to look.
Any hints?
Added after 9 minutes:
Oops, sorry about the code markup.
Version info: Qt Creator 2.0.0 based on Qt 4.7.0 (32 bit) built Jun 21 2010 at 01:56:06 using MinGW compiler g++ 4.4.0 on Windows 7.