Hi Jorge, I've added some Log as you suggested, and apparently as soon as it construct the osgMainApp native object, something goes wrong. In particular I've added a log in the EGL Renderer like this:
public void onSurfaceChanged(GL10 gl, int width, int height) { Log.e(TAG, "BEFORE_NATIVE_INIT"); osgNativeLib.init(width, height); } and one log in the init() method of osgNativeLib.cpp like this: JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_init(JNIEnv * env, jobject obj, jint width, jint height) { __android_log_write(ANDROID_LOG_ERROR, "OSGANDROID", "NATIVE_INIT_CODE"); mainApp.initOsgWindow(0,0,width,height); } Finally, I've also added 2 log as first and last instruction of the OsgMainApp ctor (in the cpp file): OsgMainApp::OsgMainApp() { __android_log_write(ANDROID_LOG_ERROR, "OSGANDROID", "OSG_MAIN_APP_CTOR_BEGIN"); _lodScale = 1.0f; _prevFrame = 0; _initialized = false; _clean_scene = false; __android_log_write(ANDROID_LOG_ERROR, "OSGANDROID", "OSG_MAIN_APP_CTOR_END"); } What happens is that "BEFORE_NATIVE_INIT" is printed, the 2 logs in the cpp ctor are printed as well, but NOT he "NATIVE_INIT_CODE", which suggests some error related to the native object right after it's created. The new logcat is in attach. One more info is that I've tried to build all the example with both 2.3.3 and 3.1 target profile, and they show the same problem on the tablet. I've tried as well to modify manually the minimum and target version of the sdk in the AndroidManifest.xml but nothing changed. Ricky P.S. I'll run some more tests today, but since tomorrow I'll be in vacation for a couple of weeks =) My colleague Luca will run some tests and follow this thread while I'm away. Thank you. On Wed, Aug 17, 2011 at 18:44, Jorge Izquierdo Ciges <jori...@gmail.com>wrote: > Well it's easy... there are some debug messages that I put them because the > obscureness and difficulties to find some error so usually the trace should > have first the message: > > > 08-16 15:59:29.331: WARN/EGLview(4904): creating OpenGL ES 1 context > > That message come from the EGL java class WHICH initializes the GLES context. > That message is in your logs. Now when you have the context the method > onSurfaceCreated is called and it's a do nothing in my example, for more > complex programs the correct initialization should be done there and the > surfaceChange have another initialization code, because that function is > called when you change possition on your device and on other places. So they > should not have the same code. > > When you enter onSurfaceChanged, that's when OSG initializes everything so > NOW we have the BIG trouble. the init function goes through a JNI bridge > (init function) and calls the function initOsgWindow of mainApp. > > Inside initOsgWindow there's another LOG that should write. It's the FIRST > instruction and it is dispatchet through __android_log_write so that will > ever show whathever happens. > > "Initializing geometry" > > If you don't see that Log entry then no OSG code has been used. > > Then Maybe it's the same strange bug that Rafa told me once (he could fix it > for his samsung) but since 2.2 that bug dissapeared... And i don't know e > > Now you should test if the application can reach the JNI bridge, put some > __android_log_write in the osgNativeLib in the init function after and before > calling the osg function. > > And about the log that's just the full heap. There are some manuals if you > want to know more to translate to code but just by looking what I've said to > you... it's a strange bug. > > > > 2011/8/17 Riccardo Corsi <riccardo.co...@kairos3d.it> > >> Hi Jorge, >> >> I've set some breakpoints and stepped into the java code with the >> debugger. >> From the GLThread these methods are called in this order: >> - EGLView::onSurfaceCreated() >> - EGLView::onSurfaceChanged() >> >> Inside onSurfaceChanged(), when it calls the native method >> osgNativeLib.init(), it exits and thus never reaches onDrawFrame() is never >> reached. >> >> Ricky >> >> P.S. By the way... how did you get that info from the logcat? it's still >> quite obscure to me... >> >> >> >> >> >> On Wed, Aug 17, 2011 at 16:38, Jorge Izquierdo Ciges >> <jori...@gmail.com>wrote: >> >>> That's one hell of a error. ¡He doesn't reach the initOsgWindow function! >>> >>> I've never seen it, but I have some ideas. First it's the same error for >>> both of them. This must be some Native compatibility isue. I've heard that >>> the EglView in which the example is based has some troubles with some >>> devices but no one has said something solid about it. So, try to check by >>> debug or just Log (quicker) which methods of the EGLview.java if onDraw is >>> calle before onSurfaceChange or if onSurfaceChanged is never called we'll >>> hace to see if there has been some changes in the API that requiere a SDK >>> target version on the manifest. If not... well we'll see. >>> >>> 2011/8/17 Riccardo Corsi <riccardo.co...@kairos3d.it> >>> >>>> Hi Jorge and all, >>>> >>>> I start a new thread as I don't want to pollute the other - >>>> http://forum.openscenegraph.org/viewtopic.php?t=8917&start=17 >>>> which mainly talks about building for Android. >>>> >>>> Basically the issue is that osgAndroidExampleGLES1 doesn't work when >>>> deployed to my Acer Iconia A500, running Android 3.1 >>>> (while the same build works just fine on the Nexus S running Android >>>> 2.3.4) >>>> >>>> The application starts up for a couple of seconds, and when it's about >>>> to create the osg blue screen it dies. >>>> I attach the logcat, even though I couldn't understand from it what's >>>> the reason that makes the viewer die... >>>> >>>> The same happens with the GLES2 example, for which I attach the logcat >>>> as well. >>>> >>>> I'm still investigating and will post if I have some news, >>>> any hint is appreciated. >>>> Ricky >>>> >>>> _______________________________________________ >>>> osg-users mailing list >>>> osg-users@lists.openscenegraph.org >>>> >>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>>> >>>> >>> >>> _______________________________________________ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> >>> >> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
08-18 15:54:29.390: DEBUG/dalvikvm(17080): GC_EXPLICIT freed 8K, 6% free 6254K/6595K, paused 6ms+2ms 08-18 15:54:30.760: DEBUG/AndroidRuntime(17631): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 08-18 15:54:30.760: DEBUG/AndroidRuntime(17631): CheckJNI is OFF 08-18 15:54:30.880: DEBUG/AndroidRuntime(17631): Calling main entry com.android.commands.pm.Pm 08-18 15:54:30.890: DEBUG/AndroidRuntime(17631): Shutting down VM 08-18 15:54:30.890: INFO/AndroidRuntime(17631): NOTE: attach of thread 'Binder Thread #3' failed 08-18 15:54:30.890: DEBUG/dalvikvm(17631): GC_CONCURRENT freed 100K, 87% free 342K/2560K, paused 1ms+1ms 08-18 15:54:30.890: DEBUG/jdwp(17631): adbd disconnected 08-18 15:54:30.890: DEBUG/jdwp(17631): Got wake-up signal, bailing out of select 08-18 15:54:30.890: DEBUG/dalvikvm(17631): Debugger has detached; object registry had 1 entries 08-18 15:54:31.020: DEBUG/AndroidRuntime(17641): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 08-18 15:54:31.020: DEBUG/AndroidRuntime(17641): CheckJNI is OFF 08-18 15:54:31.140: DEBUG/AndroidRuntime(17641): Calling main entry com.android.commands.am.Am 08-18 15:54:31.140: INFO/ActivityManager(127): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=osg.AndroidExample/.osgViewer } from pid 17641 08-18 15:54:31.160: INFO/PowerManagerService(127): WakeLock: ActivityManager-Launch(PARTIAL_WAKE_LOCK ) is acquired by pid(127), uid(1000) 08-18 15:54:31.170: INFO/ActivityManager(127): Start proc osg.AndroidExample for activity osg.AndroidExample/.osgViewer: pid=17649 uid=10085 gids={3003} 08-18 15:54:31.180: DEBUG/AndroidRuntime(17641): Shutting down VM 08-18 15:54:31.190: INFO/AndroidRuntime(17641): NOTE: attach of thread 'Binder Thread #3' failed 08-18 15:54:31.190: DEBUG/dalvikvm(17641): GC_CONCURRENT freed 101K, 86% free 367K/2560K, paused 1ms+1ms 08-18 15:54:31.190: DEBUG/jdwp(17641): Got wake-up signal, bailing out of select 08-18 15:54:31.190: DEBUG/dalvikvm(17641): Debugger has detached; object registry had 1 entries 08-18 15:54:31.220: DEBUG/TabletStatusBar(258): lights on 08-18 15:54:31.310: DEBUG/libEGL(17649): loaded /system/lib/egl/libGLES_android.so 08-18 15:54:31.330: DEBUG/libEGL(17649): loaded /system/lib/egl/libEGL_tegra.so 08-18 15:54:31.350: DEBUG/libEGL(17649): loaded /system/lib/egl/libGLESv1_CM_tegra.so 08-18 15:54:31.390: DEBUG/libEGL(17649): loaded /system/lib/egl/libGLESv2_tegra.so 08-18 15:54:31.400: WARN/EGLview(17649): creating OpenGL ES 1 context 08-18 15:54:31.410: ERROR/EGLview(17649): BEFORE_NATIVE_INIT 08-18 15:54:31.410: DEBUG/dalvikvm(17649): Trying to load lib /data/data/osg.AndroidExample/lib/libosgNativeLib.so 0x40841398 08-18 15:54:31.420: ERROR/OSGANDROID(17649): OSG_MAIN_APP_CTOR_BEGIN 08-18 15:54:31.420: ERROR/OSGANDROID(17649): OSG_MAIN_APP_CTOR_END 08-18 15:54:31.480: INFO/PowerManagerService(127): WakeLock: ActivityManager-Launch(PARTIAL_WAKE_LOCK ) is released by pid(127), uid(1000) 08-18 15:54:31.530: INFO/DEBUG(80): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 08-18 15:54:31.530: INFO/DEBUG(80): Build fingerprint: 'acer/picasso_generic1/picasso:3.1/HMJ37/1309327721:user/release-keys' 08-18 15:54:31.530: INFO/DEBUG(80): pid: 17649, tid: 17658 >>> osg.AndroidExample <<< 08-18 15:54:31.530: INFO/DEBUG(80): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8256b7c6 08-18 15:54:31.530: INFO/DEBUG(80): r0 00000120 r1 00000001 r2 00000000 r3 00000000 08-18 15:54:31.530: INFO/DEBUG(80): r4 001dc1d8 r5 826d7cf0 r6 001dc1b0 r7 826e22f4 08-18 15:54:31.530: INFO/DEBUG(80): r8 b00133b8 r9 826dd000 10 006ef000 fp 82000000 08-18 15:54:31.530: INFO/DEBUG(80): ip 00000000 sp 591ce498 lr 8242b989 pc 8256b7c6 cpsr 20000030 08-18 15:54:31.530: INFO/DEBUG(80): d0 497ffff8000fffff d1 40dfae14497ffff0 08-18 15:54:31.530: INFO/DEBUG(80): d2 bf800000c47a0000 d3 3f80000000000000 08-18 15:54:31.530: INFO/DEBUG(80): d4 3f80000000000000 d5 3ff000003f800000 08-18 15:54:31.530: INFO/DEBUG(80): d6 3f00000000000000 d7 00000000bf800000 08-18 15:54:31.530: INFO/DEBUG(80): d8 0000000000000000 d9 0000000000000000 08-18 15:54:31.530: INFO/DEBUG(80): d10 0000000000000000 d11 0000000000000000 08-18 15:54:31.530: INFO/DEBUG(80): d12 0000000000000000 d13 0000000000000000 08-18 15:54:31.530: INFO/DEBUG(80): d14 0000000000000000 d15 0000000000000000 08-18 15:54:31.530: INFO/DEBUG(80): scr 80000012 08-18 15:54:31.700: INFO/DEBUG(80): #00 pc 0056b7c6 /data/data/osg.AndroidExample/lib/libosgNativeLib.so (_ZN3osg7Matrixd12makeIdentityEv) 08-18 15:54:31.700: INFO/DEBUG(80): #01 lr 8242b989 /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): libc base address: afc3d000 08-18 15:54:31.700: INFO/DEBUG(80): code around pc: 08-18 15:54:31.700: INFO/DEBUG(80): 8256b7a4 2318e9c0 2302e9d1 231ae9c0 2304e9d1 08-18 15:54:31.700: INFO/DEBUG(80): 8256b7b4 231ce9c0 bf004770 00000000 1b00eef7 08-18 15:54:31.700: INFO/DEBUG(80): 8256b7c4 0b12eddf 0b02edc0 0b04edc0 0b06edc0 08-18 15:54:31.700: INFO/DEBUG(80): 8256b7d4 0b08edc0 0b0cedc0 0b0eedc0 0b10edc0 08-18 15:54:31.700: INFO/DEBUG(80): 8256b7e4 0b12edc0 0b16edc0 0b18edc0 0b1aedc0 08-18 15:54:31.700: INFO/DEBUG(80): code around lr: 08-18 15:54:31.700: INFO/DEBUG(80): 8242b968 7a41edc4 7a42edc4 7a43edc4 7a44edc4 08-18 15:54:31.700: INFO/DEBUG(80): 8242b978 7a45edc4 7a46edc4 7a47edc4 ff1cf13f 08-18 15:54:31.700: INFO/DEBUG(80): 8242b988 70d0f504 ff18f13f f04f2300 f8c432ff 08-18 15:54:31.700: INFO/DEBUG(80): 8242b998 46203220 3224f884 2226f8a4 3228f8c4 08-18 15:54:31.700: INFO/DEBUG(80): 8242b9a8 4605bd70 f1884620 4628ff41 ea84f656 08-18 15:54:31.700: INFO/DEBUG(80): stack: 08-18 15:54:31.700: INFO/DEBUG(80): 591ce458 006ef000 08-18 15:54:31.700: INFO/DEBUG(80): 591ce45c afc5035b /system/lib/libc.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce460 826dd000 08-18 15:54:31.700: INFO/DEBUG(80): 591ce464 006ef000 08-18 15:54:31.700: INFO/DEBUG(80): 591ce468 001dc1d8 08-18 15:54:31.700: INFO/DEBUG(80): 591ce46c 00181f30 08-18 15:54:31.700: INFO/DEBUG(80): 591ce470 001dc1b0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce474 82555dbb /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce478 001dc1d8 08-18 15:54:31.700: INFO/DEBUG(80): 591ce47c 001233c4 08-18 15:54:31.700: INFO/DEBUG(80): 591ce480 001dc1b0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce484 825b4927 /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce488 001dc1d8 08-18 15:54:31.700: INFO/DEBUG(80): 591ce48c 002ac418 08-18 15:54:31.700: INFO/DEBUG(80): 591ce490 df002777 08-18 15:54:31.700: INFO/DEBUG(80): 591ce494 e3a070ad 08-18 15:54:31.700: INFO/DEBUG(80): #00 591ce498 001dc1d8 08-18 15:54:31.700: INFO/DEBUG(80): 591ce49c 001dc1b0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4a0 001dc1b0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4a4 822a9377 /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4a8 826d7cf0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4ac 0000136c 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4b0 001dc1b0 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4b4 822a9523 /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4b8 b00133b8 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4bc 826dd000 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4c0 006ef000 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4c4 822a159b /data/data/osg.AndroidExample/lib/libosgNativeLib.so 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4c8 826aa064 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4cc 826aa078 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4d0 00000355 08-18 15:54:31.700: INFO/DEBUG(80): 591ce4d4 00000004 08-18 15:54:31.710: INFO/DEBUG(80): 591ce4d8 00011ebc 08-18 15:54:31.710: INFO/DEBUG(80): 591ce4dc b0003803 /system/bin/linker 08-18 15:54:31.750: INFO/ActivityManager(127): Displayed osg.AndroidExample/.osgViewer: +585ms 08-18 15:54:33.420: INFO/WindowManager(127): WIN DEATH: Window{41643590 SurfaceView paused=false} 08-18 15:54:33.420: ERROR/InputDispatcher(127): channel '413e5ae8 osg.AndroidExample/osg.AndroidExample.osgViewer (server)' ~ Consumer closed input channel or an error occurred. events=0x8 08-18 15:54:33.420: ERROR/InputDispatcher(127): channel '413e5ae8 osg.AndroidExample/osg.AndroidExample.osgViewer (server)' ~ Channel is unrecoverably broken and will be disposed! 08-18 15:54:33.420: DEBUG/Zygote(82): Process 17649 terminated by signal (4) 08-18 15:54:33.420: DEBUG/gralloc(81): Attempting to delete a locked buffer! 08-18 15:54:33.420: DEBUG/gralloc(81): Buffer 2a locks: (tid = 17658 (x1), usage = 0x200) 08-18 15:54:33.420: INFO/ActivityManager(127): Process osg.AndroidExample (pid 17649) has died. 08-18 15:54:33.420: INFO/WindowManager(127): WIN DEATH: Window{413e5ae8 osg.AndroidExample/osg.AndroidExample.osgViewer paused=false} 08-18 15:54:33.420: INFO/WindowManager(127): WINDOW DIED Window{413e5ae8 osg.AndroidExample/osg.AndroidExample.osgViewer paused=false} 08-18 15:54:33.450: WARN/InputManagerService(127): Got RemoteException sending setActive(false) notification to pid 17649 uid 10085
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org