QAxObject SIGSEGV
-
wrote on 7 May 2013, 11:19 last edited by
Hi there,
I am developing an application using an existing tlb file. I use dumpcpp to generate a C++ namespace.
But when I try to access some members, a segmentation fault occurs in qmetaobject.cpp line 679.
This is in: @int QMetaObject::indexOfProperty(const char *name) const;@
I guess it means that Qt can't find this member in the object. However I am sure it exists. What could be wrong?
Should I use querySubObject() instead of calling directly the generated method?
-
wrote on 8 Nov 2013, 15:37 last edited by
Still no reply and still no solution.
I realised the problem occurs when I try to access a method when the ActiveX connection is not established yet.
-
Hi,
I'm not a QAx specialist, but are you sure your object is valid when you try to call that method ?
-
wrote on 8 Nov 2013, 18:08 last edited by
Absolutely not. That's the point. The object is sometimes valid but not always and I don't know how to check it...
-
Can you show how you create it and use it ?
-
wrote on 14 Nov 2013, 12:16 last edited by
I use a tlb file. My .pro file has:
@TYPELIBS = $$system( dumpcpp lib/Pulse.tlb -n PulseLabShop -o src/controller/Pulse )@
Then I create the connection with:
@PulseLabShop::Application *app = new PulseLabShop::Application();@
In a destructor I have:
@
app->CloseProject(true);
app->Quit();
@But if the connection has been lost I have a SIGSEGV error. I would like to check if I can reliably call the Quit() function.
-
What other methods are available in this Application object ?
-
wrote on 16 Nov 2013, 12:13 last edited by
It has many but all will fail if the connection has not been set or if the connection is broken. I think the QMetaObject class shall have a method that tests the establishment of a connection.
Hasn't anyone faced this problem before?
-
That's a question you should ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)
-
wrote on 18 Nov 2013, 11:02 last edited by
Okay you're right.
Just an additional information.
I voluntarily generated an error while connecting to the QAxObject and I got those messages in the Qt Creator console:
@
CoCreateInstance failure (The class has not a valid license.)QAxBase::setControl: requested control {587b4a33-81d3-11cf-91c5-0020af429815} could not be instantiated
QAxBase::qt_metacall: Object is not initialized, or initialization failed
@So some messages are emitted. The question is how to catch them...
-
Maybe the QAxBase::exception signal ?