Home Help Center

Ice(E) Android NDK + Qt 5.4.1

wimvalckewimvalcke Member Wim ValckeOrganization: PersonalProject: Nokia N900 port
I'm busy getting a native C++ application running with Ice + Qt5.4.1 on Android platforms.
Lots of previous posts have been done getting Ice(E) to compile on Android.
I've been able to patch IceE and Ice3.5.1 to get it compiled with Android NDK 10
I already was able to get a QML (Qt5 quick) application running with IceE (1.3.0) performing as a client app. This works perfectly.

Now the big stuff: getting an Ice server running on Android using a native C++ application. I was very optimistic, as the client was already working. But the application segfaults when adding an ice object to an ice object adapter. I do not think that the Ice sources are the reason of the crash, but more a combination of Ice+Android NDK.
When i put the adding of the ice object to the adapter in comment, the application runs, it even registers the object adapter in the IceGrid registry server. So we're almost there, but why the crash occurs when adding the object is for this moment a mystery.
I would like to hope to get some people on this wagon to further investigate the error.

Some sample code

Ice::InitializationData id;
id.properties = props;
ic = Ice::initialize(id);
Ice::ObjectAdapterPtr adapter =
//ic->createObjectAdapterWithEndpoints("SimplePrinterAdapter", "default -p 10000");
ic->createObjectAdapter("SimplePrinterAdapter");
Ice::ObjectPtr object = new PrinterI;

---> the next line causes the crash, comment it out and the crash is gone.

adapter->add(object, ic->stringToIdentity("SimplePrinter"));
adapter->activate();

Maybe someone knows the code that's behind the add method, to get a clue where the crash occurs.
I tried the same code (with iceE 1.3.0) running on a raspberry pi, no problem there, so Ice is not to blame.

Nice mystery, and more nice get it solved.

All hackers, unite and let me know if you're interested into getting this to work.

Best regards

Wim.
Sign In or Register to comment.