Ice Cream Sandwich

211 views
Skip to first unread message

Adam Pigg

unread,
May 15, 2012, 2:44:31 PM5/15/12
to andro...@googlegroups.com
Hi

When i deploy onto an ICS device, either my sons tablet, ZT280-C71, a
HTC Sensation or SGS2, the app crashes.

The only device i have access to is the tablet, and i get this message
running from the debugger:

E/dalvikvm( 1349): JNI ERROR (app bug): accessed stale local reference
0x1d200001 (index 0 in a table of size 0)
E/dalvikvm( 1349): VM aborting

Any ideas? Ministro downloads all the libs, but maybe ICS is not supported?

Cheers

Adam

Marco Bernasocchi

unread,
May 15, 2012, 3:08:30 PM5/15/12
to andro...@googlegroups.com
it is, my app works fine, must be sth else.
>
> Cheers
>
> Adam


--
Marco Bernasocchi
www.opengis.ch

Adam Pigg

unread,
May 15, 2012, 4:00:28 PM5/15/12
to andro...@googlegroups.com
What api do you compile with?

I was using api-10, but im installing api-14 now to see if that helps.

Cheers

Marco Bernasocchi

unread,
May 15, 2012, 4:01:29 PM5/15/12
to andro...@googlegroups.com, Adam Pigg
On 05/15/2012 10:00 PM, Adam Pigg wrote:
> What api do you compile with?
>
11 and 12 (IIRC even 8)
--
Marco Bernasocchi
www.opengis.ch

Adam Pigg

unread,
May 15, 2012, 4:29:47 PM5/15/12
to Marco Bernasocchi, andro...@googlegroups.com
hmmm, no joy with api-14..same problem as api-10.

here is the full output, incase anyone can suggest something (most of
the stuff at the end is my own debug output)

Starting remote process ...
D/dalvikvm( 3968): Late-enabling CheckJNI
D/dalvikvm( 3968): GC_FOR_ALLOC freed 46K, 14% free 6548K/7555K, paused 43ms
I/dalvikvm-heap( 3968): Grow heap (frag case) to 8.663MB for
1536016-byte allocation
D/dalvikvm( 3968): GC_CONCURRENT freed <1K, 12% free 8047K/9095K,
paused 7ms+13ms
D/dalvikvm( 3968): DexOpt: --- BEGIN 'QtIndustrius-14.jar' (bootstrap=0) ---
D/dalvikvm( 3968): DexOpt: --- END 'QtIndustrius-14.jar' (success) ---
D/dalvikvm( 3968): DEX prep
'/data/data/org.kde.necessitas.ministro/files/qt/jar/QtIndustrius-14.jar':
unzip in 27ms, rewrite 395ms
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtNetwork.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtNetwork.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtNetwork.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtScript.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtScript.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtScript.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSensors.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSensors.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSensors.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSql.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSql.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSql.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXml.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXml.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXml.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSvg.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSvg.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSvg.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXmlPatterns.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXmlPatterns.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtXmlPatterns.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtDeclarative.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtDeclarative.so
0x411af5d8
D/dalvikvm( 3968): No JNI_OnLoad found in
/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtDeclarative.so
0x411af5d8, skipping init
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so
0x411af5d8
I/Qt ( 3968): qt start
D/dalvikvm( 3968): Trying to load lib
/data/data/org.kde.necessitas.ministro/files/qt/plugins/sensors/libqtsensors_android.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/org.kde.necessitas.ministro/files/qt/plugins/sensors/libqtsensors_android.so
0x411af5d8
D/dalvikvm( 3968): Trying to load lib
/data/data/uk.co.piggz.pgz_spaceinvaders/lib/libpgz-spaceinvaders.so
0x411af5d8
D/dalvikvm( 3968): Added shared lib
/data/data/uk.co.piggz.pgz_spaceinvaders/lib/libpgz-spaceinvaders.so
0x411af5d8
I/Qt ( 3968): qt start
D/Qt ( 3968): startQtApp
D/Qt ( 3968): environmentString
"HOME=/data/data/uk.co.piggz.pgz_spaceinvaders/files TMPDIR=/data/data/uk.co.piggz.pgz_spaceinvaders/files MINISTRO_SSL_CERTS_PATH=/data/data/org.kde.necessitas.ministro/files/qt/ssl QML_IMPORT_PATH=/data/data/org.kde.necessitas.ministro/files/qt/imports QT_PLUGIN_PATH=/data/data/org.kde.necessitas.ministro/files/qt/plugins"
("HOME=/data/data/uk.co.piggz.pgz_spaceinvaders/files",
"TMPDIR=/data/data/uk.co.piggz.pgz_spaceinvaders/files",
"MINISTRO_SSL_CERTS_PATH=/data/data/org.kde.necessitas.ministro/files/qt/ssl",
"QML_IMPORT_PATH=/data/data/org.kde.necessitas.ministro/files/qt/imports",
"QT_PLUGIN_PATH=/data/data/org.kde.necessitas.ministro/files/qt/plugins")
D/Qt ( 3968): paramsString "QtApp -platform android"
D/Qt ( 3968): 0.5.1
W/Qt ( 3968): WARNING: QApplication was not created in the main() thread.
I/Qt JAVA ( 3968): surfaceChanged: 800,438,800,438
D/Qt ( 3968): QAndroidPlatformIntegrationPlugin::create "android"
D/Qt ( 3968):
QAndroidPlatformIntegration::QAndroidPlatformIntegration(): creating
QAndroidPlatformScreen => Using Raster (Software) for painting
D/Qt ( 3968): QFbScreen::setPhysicalSize QSize(127, 69)
D/Qt ( 3968): QFbScreen::setGeometry QRect(0,0 800x438)
D/Qt ( 3968): QAndroidPlatformScreen::QAndroidPlatformScreen():QFbScreen()
D/dalvikvm( 3968): GC_FOR_ALLOC freed 1575K, 28% free 6572K/9095K, paused 70ms
I/dalvikvm-heap( 3968): Grow heap (frag case) to 7.890MB for
700816-byte allocation
D/dalvikvm( 3968): GC_CONCURRENT freed 1K, 21% free 7255K/9095K, paused 2ms+2ms
W/dalvikvm( 3968): dvmFindClassByName rejecting
'org/kde/necessitas/industrius/QtNativeInputConnection'
W/dalvikvm( 3968): dvmFindClassByName rejecting
'org/kde/necessitas/industrius/QtExtractedText'
D/Qt ( 3968): Created Android Audio Engine
D/Qt ( 3968): Starting Sound Player
D/Qt ( 3968): Configured Sound Player
D/Qt ( 3968): Created Sound Player
D/Qt ( 3968): Realised Sound Player
D/Qt ( 3968): Created Buffer Player
D/Qt ( 3968): registerSound:
"qml/pgz-spaceinvaders/sounds/shoot.wav" "shoot"
D/Qt ( 3968): registerSound:created
D/Qt ( 3968): registerSound:loading
D/Qt ( 3968): opening: "qml/pgz-spaceinvaders/sounds/shoot.wav"
D/Qt ( 3968): readingSize:
D/Qt ( 3968): readingData: 65320
D/Qt ( 3968): closing:
D/Qt ( 3968): registerSound:loaded
D/Qt ( 3968): registerSound:
"qml/pgz-spaceinvaders/sounds/explosion.wav" "explosion"
D/Qt ( 3968): registerSound:created
D/Qt ( 3968): registerSound:loading
D/Qt ( 3968): opening: "qml/pgz-spaceinvaders/sounds/explosion.wav"
D/Qt ( 3968): readingSize:
D/Qt ( 3968): readingData: 139736
D/Qt ( 3968): closing:
D/Qt ( 3968): registerSound:loaded
D/Qt ( 3968): registerSound:
"qml/pgz-spaceinvaders/sounds/invaderkilled.wav" "killed"
D/Qt ( 3968): registerSound:created
D/Qt ( 3968): registerSound:loading
D/Qt ( 3968): opening: "qml/pgz-spaceinvaders/sounds/invaderkilled.wav"
D/Qt ( 3968): readingSize:
D/Qt ( 3968): readingData: 54072
D/Qt ( 3968): closing:
D/Qt ( 3968): registerSound:loaded
W/Qt ( 3968): A backend with type "QAccelerometer" and identifier
"android.accelerometer" has already been registered!
W/Qt ( 3968): A backend with type "QAmbientLightSensor" and
identifier "android.ambientlight" has already been registered!
W/Qt ( 3968): A backend with type "QCompass" and identifier
"android.compass" has already been registered!
W/Qt ( 3968): A backend with type "QMagnetometer" and identifier
"android.magnetometer" has already been registered!
W/Qt ( 3968): A backend with type "QOrientationSensor" and
identifier "android.orientation" has already been registered!
W/Qt ( 3968): A backend with type "QProximitySensor" and
identifier "android.proximity" has already been registered!
W/Qt ( 3968): A backend with type "QRotationSensor" and
identifier "android.rotation" has already been registered!
W/Qt ( 3968): A backend with type "QGyroscope" and identifier
"android.gyroscope" has already been registered!
D/Qt ( 3968): createPlatformWindow false
D/Qt ( 3968): setFullScreen false
D/Qt ( 3968): setFullScreen false
D/Qt ( 3968): setFullScreen true
D/Qt ( 3968): setFullScreen true
E/dalvikvm( 3968): JNI ERROR (app bug): accessed stale local reference
0x1d200001 (index 0 in a table of size 0)
E/dalvikvm( 3968): VM aborting
F/libc ( 3968): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)




On Tue, May 15, 2012 at 9:01 PM, Marco Bernasocchi

Adam Pigg

unread,
May 15, 2012, 5:00:15 PM5/15/12
to Marco Bernasocchi, andro...@googlegroups.com
yeah, your right.....i was getting to that, im kinda multi-tasking,
browsing opengameart.org for some better graphics for another project,
and running through a conceptual stage in my head for something
new....in any case, this is how the lazy-web works :)

Thanks, i'll read through that page

Adam

On Tue, May 15, 2012 at 9:51 PM, Marco Bernasocchi
<ma...@bernawebdesign.ch> wrote:
> http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-in-ics.html
> maybe helpful, in general googling the error can be fruiful.
> ciao
> --
> Marco Bernasocchi
> www.opengis.ch

Adam Pigg

unread,
May 15, 2012, 5:22:44 PM5/15/12
to Marco Bernasocchi, andro...@googlegroups.com
Marco (and anyone else)

Tell me if im being lazy again, but...

It seems i need to register some variables with the garbage collector?
if so, this requires accss to the JNIenv...ive no idea what this is,
but ive read that i can get access to it by modifying
qtmain_android.cpp?

Is this the best solution?

Thanks (qt im familiar with, android and java, not so!)

Adam

Marco Bernasocchi

unread,
May 16, 2012, 3:40:50 AM5/16/12
to ad...@piggz.co.uk, andro...@googlegroups.com, BogDan

Hi I've no idea :) but iirc bogdan said that qtmain-android was going to disappear in alpha 4?

Ciao

Marco Bernasocchi (mobile)
http://opengis.ch

BogDan Vatra

unread,
May 16, 2012, 6:21:16 AM5/16/12
to andro...@googlegroups.com, BogDan, ad...@piggz.co.uk

It is gone, I just pushed Taylor's patch moments ago.

Cheers,
BogDan.

Marco Bernasocchi

unread,
May 16, 2012, 6:36:05 AM5/16/12
to andro...@googlegroups.com, ad...@piggz.co.uk, BogDan

Hi BogDan
Thanks a lot!
What would i have to do to try out all the latest code with my app? Are the unstable repos in ministro delivering the latest code? Ciao

Ps was it correct that qtmain-android will go away? How will it be replaced?

Marco Bernasocchi (mobile)
http://opengis.ch

Adam Pigg

unread,
May 16, 2012, 7:16:31 AM5/16/12
to andro...@googlegroups.com, BogDan Vatra, BogDan, ad...@piggz.co.uk

hi Bogdan, any idea how to fix my bug, or will i just have to start commenting out code until i find it? What is the new way to get access to the jnienv?


Adam

--

Sent from my Nokia N9

BogDan Vatra

unread,
May 16, 2012, 12:16:12 PM5/16/12
to andro...@googlegroups.com
Hi,

No, not yet, I still have a few things missing.
Anyway it should be 100% compatible with alpha3 unless you didn't
change any private files (e.g. qtmain-android) or used any private
java classes directly.

Cheers,
BogDan.


2012/5/16 Marco Bernasocchi <ma...@bernawebdesign.ch>:

Adam Pigg

unread,
May 16, 2012, 3:15:19 PM5/16/12
to andro...@googlegroups.com
Foroet to send to the group...

---------- Forwarded message ----------
From: Adam Pigg <pig...@gmail.com>
Date: Wed, May 16, 2012 at 8:12 PM
Subject: Re: Ice Cream Sandwich
To: BogDan Vatra <taipan...@gmail.com>


I may be making progress tracking something down....i basically
commented out everything in my C++ side to start enabling things one
at a time, but found it odd that i was getting debug messages from
code that wasnt even compiled, even after a clean/build cycle!

Then, i deleted the build dirs, no change.

Then i deleted the android/bin and android/libs dirs, rebuilt, and now
its executing the code it should be..so i may have more chance of
debugging it, if not, i may take you up on your kind offer of a
debugging service ;)

Adam

On Wed, May 16, 2012 at 5:18 PM, BogDan Vatra <taipan...@gmail.com> wrote:
> Hi,
>
> It seems your code is generating that crash, unless you share the code
> with us (or give us more informations) we can't help you here.
>
> Until now I have no problem with any Qt apps on ICS.
>
> Cheers,
> BogDan.
>
>
> 2012/5/16 Adam Pigg <pig...@gmail.com>:

Adam Pigg

unread,
May 16, 2012, 4:56:59 PM5/16/12
to andro...@googlegroups.com, BogDan Vatra, Marco Bernasocchi
Well

That is annoying!

Ive spent hours disabling/enabling code and adding debug messages.
And now my app pretty much works....with all the original code
enabled!

At one point, im sure adding a debug message made it run!

Ive now got 2 seemingly clear cases where i get the JNI error:
1) When i call Qt.quit() in QML
2) When i call acceleromenter.stop() in QML

so i commented out 2), and ignore 1) as its not noticable, when you
quit, it crashes :)

Hopefully i will find out more!

Adam
Reply all
Reply to author
Forward
0 new messages