Crash when using Bluetooth

Dominique Rety dominiquerety at hotmail.fr
Thu Dec 13 14:41:24 UTC 2012


Hi,

I am currently developing a telecommunication project involving Blutooth communication between Android devices. For this purpose, I'm trying to use Necessitas Bluetooth support and I experiment very similar problems that are described in the "Crash when using Bluetooth" (Kate Alhola) archive thread.

Environment:
Java JDK 1.7.0_09
Qt Creator 2.5.83 Based on Qt 4.8.3 running on Linux Suze
Kit = Necessitas Qt 4.8.2 for Android armv7a
Compiler = Android GCC (arm-4.4.3)
Android target SDK = android-16
Deploy to Nexus 7 with Android version 4.2.

I firstly tried to deploy the btchat sample and I faced the same problem:
JNI ERROR (app bug): accessed stale local reference 0xe680001d (index 7 in a table of size 4)
VM aborting
Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 13965 (.example.btchat)

Setting traces in different source files of the connectivity library, I also noticed that the error happens when trying to use some member functions of QBluetoothLocalDevice (btchat sample requests for the local device name from the main function).

I tried to bypass this problem by only creating the QBluetoothLocalDevice without requesting for the device name in the btchat application. The program then starts correctly.

In the btchat application, the "Connect" button calls the QBluetoothServiceDiscoveryAgent::start function. This function randomly processes the request because it relies on discoveryState and deviceAddress members, which seem not to be initialized : either the discovery process freezes or the program aborts with an error (if luckily discoveryState and deviceAddress members get consistent values). I didn't try any further investigation. It seems to me that the connectivity library is compiled with qbluetoothlocaldevice_p.cpp, which just contains empty functions for the QBluetoothLocalDevice class, instead of a customized source for Android.

Is Bluetooth support for Android in Necessitas complete ?
Is the btchat sample expected to work properly with Android ?
Is there any specific configuration issue I could miss ?
Is there any corrective or complement software I could download ?
How can I progress on this issue ? What is the best way to get help and advices ?

Regards,
Dominique RETY
dominiquerety at hotmail.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20121213/fdd2fbd8/attachment.html>


More information about the Necessitas-devel mailing list