<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On 13.12.2012, at 16.41, Dominique Rety <<a href="mailto:dominiquerety@hotmail.fr">dominiquerety@hotmail.fr</a>> wrote:</div><div><br></div><blockquote type="cite"><div>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta content="MSHTML 6.00.6000.17114" name="GENERATOR">
<style></style>
<div>
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font> </div></div></div></blockquote><div><br></div><div>There is several issues in current necessitas libQtConnectivity version. I have hopefully fixed most of them and i have version of libQtConnectivity that least works with my own applocation. I try to deliver patches to necessitas project so that fixes could be included in next release. </div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">Environment:</font></div>
<div><font face="Arial" size="2">Java JDK 1.7.0_09<br>Qt Creator 2.5.83 Based on Qt
4.8.3 running on Linux Suze<br>Kit = Necessitas Qt 4.8.2 for Android
armv7a<br>Compiler = Android GCC (arm-4.4.3)<br>Android target SDK =
android-16<br>Deploy to Nexus 7 with Android version 4.2.</font></div>
<div><font face="Arial"><font size="2"><font face="Arial" size="2"></font></font></font> </div>
<div><font face="Arial" size="2">I firstly tried to deploy the btchat sample and I
faced the same problem:</font></div>
<div><font face="Arial" size="2">JNI ERROR (app bug): accessed stale local reference
0xe680001d (index 7 in a table of size 4)<br>VM aborting<br>Fatal signal 11
(SIGSEGV) at 0xdeadd00d (code=1), thread 13965 (.example.btchat)</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">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).</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2"></font> </div></div></div></blockquote><div><br></div><div>Yes, that's case. The QBluetoothLocalDevice initializes static handles to java virtual machine that are then referenced by other modules. I have made fixes to several parts of libQtConnectivity</div><div><br></div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">Is Bluetooth support for Android in Necessitas
complete ?</font></div></div></div></blockquote><div><br></div><div>Most of, some functions are still missing but there are some bugs in current version</div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">Is the btchat sample expected to work
properly with Android ?</font></div></div></div></blockquote><div><br></div><div>I have not tried that one</div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">Is there any specific configuration issue I could
miss ?</font></div></div></div></blockquote><div><br></div><div>That's good question, what is origin of the bugs, does it work with older android</div><div>Versions ? The source reason of bugs is JNI handles alocation that conflict with</div><div>Current thread structure and some that handles are expired when used. I have only tested with</div><div>Android 4.x</div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">Is there any corrective or complement software I
could download ?</font></div></div></div></blockquote><div><br></div><div>I could make my patches avaiable before next release but overriding default necessitas libQtConnectivity requires some tricks</div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2">How can I progress on this issue ? What is the best
way to get help and advices ?</font></div></div></div></blockquote><div><br></div>This list works fine.<div><br></div><div>Kate</div><div><br><blockquote type="cite"><div><div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Regards,</font></div>
<div><font face="Arial" size="2">Dominique RETY</font></div>
<div><font face="Arial" size="2"><a href="">dominiquerety@hotmail.fr</a></font></div>
<div><font face="Arial" size="2"></font> </div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Necessitas-devel mailing list</span><br><span><a href="mailto:Necessitas-devel@kde.org">Necessitas-devel@kde.org</a></span><br><span><a href="https://mail.kde.org/mailman/listinfo/necessitas-devel">https://mail.kde.org/mailman/listinfo/necessitas-devel</a></span><br></div></blockquote></div></body></html>