Crash when using Bluetooth

Kate Alhola kate.alhola at gmail.com
Thu Nov 1 17:29:03 UTC 2012


On Mon, Oct 29, 2012 at 10:59 PM, Micke Prag <micke.prag at telldus.se> wrote:

>  Hi,
>
> It only happens after I call start(). Only creating the object works fine.
> Thank you for looking into this.
>

I noticed that exactly same thing happens with QBluetoothSocket and
QBluetoothLocalDevice, in both cases they happen If I try use some member
functions. Creation of object goes OK in both of cases. I posted report to
android-qt list but may be this is better forum.

Here is two cases where I got same bug

Code:
     qDebug() << "Turning bluetooth on";
      localDevice->powerOn();

D/Qt ( 4746): Turning bluetooth on

E/dalvikvm( 4746): JNI ERROR (app bug): accessed stale local reference
0x9f50001d (index 7 in a table of size 4)

E/dalvikvm( 4746): VM aborting

Or

from:
  wmSocket = new QBluetoothSocket(
QBluetoothSocket::RfcommSocket);

    qDebug() << "btHost::tryConnect()" << wmPulse.address().toString() <<
":" << PORT;
    wmSocket->connectToService(wmPulse.address(), PORT);

D/Qt ( 6195): btHost::tryConnect() "83:7C:82:00:39:31" : 5

E/dalvikvm( 6195): JNI ERROR (app bug): accessed stale local reference
0xb3b0001d (index 7 in a table of size 0)

E/dalvikvm( 6195): VM aborting


Kate



>
> Regards
> Micke
>
> On Monday 29 October 2012 at 21:54, Lauri Laanmets wrote:
>
>  Hi
>
> I guess that is addressed to me :). Crash is definitely a bug, regardless
> of Android permissions or missing Java files. Can you verify if it crashes
> on creating the DiscoveryAgent object or when starting the discovery?
>
> I have lost my old devel set-up, It takes me a few days to get on that
> issue.
>
> Regards
> Lauri
>
>
> On 29.10.2012 22:31, Micke Prag wrote:
>
>  Hello,
>
>  I know that the Bluetooth support in Necessitas is not complete but I
> wanted to try it out anyway. I am only trying to discover bluetooth devices
> but my application crashes. I don't know if I am doing something wrong or
> if it is not supported yet?
>
>  The output from logcat can be found here: http://pastebin.com/khcj28Xy
> This is what I am doing:
> QtMobility::QBluetoothDeviceDiscoveryAgent agent;
> agent.start();
>
>  libs.xml:
>  <?xml version='1.0' encoding='utf-8'?>
>  <resources>
>    <array name="qt_libs">
>      <item>QtCore</item>
>      <item>QtGui</item>
>      <item>QtNetwork</item>
>      <item>QtDeclarative</item>
>      <item>QtXml</item>
>      <item>QtOpenGL</item>
>      <item>QtSystemInfo</item>
>      <item>QtConnectivity</item>
>    </array>
>   <array name="bundled_libs"/>
> </resources>
>
>  I also have this in AndroidManifest.xml:
> <uses-permission android:name="android.permission.BLUETOOTH" />
>
>  Bluetooth is activated on the device.
>
>  The device is a Cube U30GT-H running Android 4.1.1
>
>  --
> Micke Prag
>
>
> _______________________________________________
> Necessitas-devel mailing listNecessitas-devel at kde.orghttps://mail.kde.org/mailman/listinfo/necessitas-devel
>
>
>
>
> _______________________________________________
> Necessitas-devel mailing list
> Necessitas-devel at kde.org
> https://mail.kde.org/mailman/listinfo/necessitas-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20121101/62f73716/attachment.html>


More information about the Necessitas-devel mailing list