LAMW : AppGridViewDemo1 and 2 crashing at startup lazarus / 43-Android ---------------------------------------------------------------------- tintinux · 2016-10-06 08:30 Hi A few days without using LAMW, no changes in the sources, and today both applications can be compiled and built, but are crashing right after launch. I use only sources up to date from LAMW repository.  I have checkouted all sources and reinstalled the 3 packages. The adb log relative to AppGridViewDemo1  is below. Thanks for help ! Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i F/art     (11057): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodA called with pending exception 'java.lang.NoSuchMethodError' thrown in void com.example.appgridviewde mo1.Controls.pAppOnCreate(android.content.Context, android.widget.RelativeLayout):-2 F/art     (11057): art/runtime/check_jni.cc:65]     in call to CallVoidMethodA F/art     (11057): art/runtime/check_jni.cc:65]     from void com.example.appgri dviewdemo1.Controls.pAppOnCreate(android.content.Context, android.widget.RelativeLayout) F/art     (11057): art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable F/art     (11057): art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x8776cfb0 self=0xb4e07800 F/art     (11057): art/runtime/check_jni.cc:65]   | sysTid=11057 nice=-11 cgrp=apps sched=0/0 handle=0xb6f03ec8 F/art     (11057): art/runtime/check_jni.cc:65]   | state=R schedstat=( 0 0 0 ) utm=6 stm=6 core=1 HZ=100 F/art     (11057): art/runtime/check_jni.cc:65]   | stack=0xbe24a000-0xbe24c000 stackSize=8MB F/art     (11057): art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held) F/art     (11057): art/runtime/check_jni.cc:65]   native: #00 pc 00004640  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23) F/art     (11057): art/runtime/check_jni.cc:65]   native: #01 pc 00002e8d  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8) F/art     (11057): art/runtime/check_jni.cc:65]   native: #02 pc 00248bb1  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream >&, int, char const*, art::mirror::ArtMethod*)+68) F/art     (11057): art/runtime/check_jni.cc:65]   native: #03 pc 0022d8e7  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream >&) const+146) F/art     (11057): art/runtime/check_jni.cc:65]   native: #04 pc 000b188b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+582) F/art     (11057): art/runtime/check_jni.cc:65]   native: #05 pc 000b1fc5  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60) F/art     (11057): art/runtime/check_jni.cc:65] native: #06 pc 000b50d5  /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1284) F/art     (11057): art/runtime/check_jni.cc:65]   native: #07 pc 000bc60f  /system/lib/libart.so (art::CheckJNI::CallVoidMethodA(_JNIEnv*, _jobject*, _jmethodID*, jvalue*)+30) F/art     (11057): art/runtime/check_jni.cc:65]   native: #08 pc 0003a6fc  /data/app/com.example.appgridviewdemo1-2/lib/arm/libcontrols.so (???) F/art     (11057): art/runtime/check_jni.cc:65]   at com.example.appgridviewdemo1.Controls.pAppOnCreate(Native method) F/art     (11057): art/runtime/check_jni.cc:65]   at com.examp le.appgridviewdemo1.Controls.jAppOnCreate(Controls.java:1111) F/art   (11057): art/runtime/check_jni.cc:65]   at com.example.appgridviewdemo1.App.onCreate(App.java:75) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.Activity.performCreate(Activity.java:6374) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.Instrumentation .callActivityOnCreate(Instrumentation.java:1119) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.ActivityThread.performLa unchActivity(ActivityThread.java:2746) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.ActivityThread.handleLau nchActivity(ActivityThread.java:2867) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.ActivityThread.access$900(ActivityThread.java:181) F/art   (11057): art/runtime/check_jni.cc:65]   at android.app.ActivityThrea d$H.handleMessage(ActivityThread.java:1476) F/art     (11057): art/runtime/check_jni.cc:65]   at android.os.Handler.dispatchMessage(Handler.java:102) F/art     (11057): art/runtime/check_jni.cc:65]   at android.os.Looper.loop(Looper.java:145) F/art     (11057): art/runtime/check_jni.cc:65]   at android.app.ActivityThread.main(ActivityThread.java:6134) F/art     (11057): art/runtime/check_jni.cc:65]   at java.lang.reflect.Method.invoke!(Native method) F/art     (11057): art/runtime/check_jni.cc:65]   at java.lang.reflect.Method.invoke(Method.java:372) F/art     (11057): art/runtime/check_jni.cc:65]   at com.android.internal.os.ZygoteInit$M ethodAndArgsCaller.run(ZygoteInit.java:1399) F/art     (11057): art/runtime/check_jni.cc:65]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) F/art   (11057): art/runtime/check_jni.cc:65] ---------------------------------------------------------------------- tintinux · 2016-10-19 12:32 Hi I'm still stuck with this problem, using freshly updated sources of LAMW, and with any Demo application I tried (jListViewDemo to name one) With r505, after removing and reinstalling all 3 packages, this problem doesn't exist. For information, if this is important, I have still SDK API 17. It looks related to "android.widget.RelativeLayout", some wrong change must have been done in october, but I do not understand enough to find where... Thanks  ! ---------------------------------------------------------------------- A.S. · 2016-10-19 20:39 I can build and run these demos on api17 emulator without any problem. ---------------------------------------------------------------------- jmpessoa · 2016-10-20 00:33 @tintinux! I (re)uploaded "jGridViewDemo1" to github repository an attempt to find out what has gone wrong... @A.S. Me too! ---------------------------------------------------------------------- tintinux · 2016-10-20 06:05 Hi Thanks for your answers. I don't think my new jGridView is responsible, because 1) everything works fine with release 506, including changes in this component. 2) demos not using it are crashing too. There is still an issue with this component, producing an AV at designmode, but I must be able to run the last trunk release before. I test only in real devices using Android 4 and 5, and have given up emulators, too slow (probably not enough RAM on my systems). I wonder whether it could work in an emulator and not in real devices ?  Did you tried it too ? Best regards ---------------------------------------------------------------------- tintinux · 2016-10-20 07:33 Hi I have tried on  another [Windows] machine, with several other revisions. I update LAMW to the tested revision, rebuild Lazarus with clean all option, and then build,  install and run the Demo on a tablet. With SVN Revision 505 and 506 it works fine too, but with 507 (and 513 - head) there are crashes. I guess the wrong change is in revision 507 but I don't find why ! Best regards