Closed GoogleCodeExporter closed 8 years ago
One clarification above (logging this separately too): I commented out Line 17
in DroidAR/src/gl2/GLSurfaceView.java:
//setEGLContextClientVersion(2);
Because this throws the error:
Description Resource Path Location Type
The method setEGLContextClientVersion(int) is undefined for the type
GL2SurfaceView GL2SurfaceView.java /DroidAR/src/gl2 line 17 Java Problem
Original comment by sami....@gmail.com
on 18 Mar 2012 at 3:23
Solved the undefined setEGLContextClientVersion(2) problem by recompiling with
Android 3.1 (was using Android 1.6 before)
Recompiled ModelAdapters again as well with Android API 3.1 - crash is still
there
Original comment by sami....@gmail.com
on 18 Mar 2012 at 3:29
Did you move the resources to the correct folder of your project? You need all
ressources you want to use in your own project. Compare your project to
ModelLoaderAdapters, there you can see where they are located
Original comment by simon.heinen
on 18 Mar 2012 at 4:52
I did not create my own project - ran ModelLoaderAdapters directly - as soon as
I click the "Cancel Accuracy test" icon, this exception appears... any model is
not loaded at all
Original comment by sami....@gmail.com
on 18 Mar 2012 at 4:55
Ah right i'm sorry I didn't commit the libgdx models with the model loader. you
will have to copy them from their projects to the ModelLoaderAdapters project
manually. I didn't want to commit their 3d models to my repository without
their permission, that's why you have to copy these files manually if you want
to test it.
Original comment by simon.heinen
on 18 Mar 2012 at 5:18
Thanks - BTW what is the correct location to copy them? <root>/data/assets/ ?
Original comment by sami....@gmail.com
on 19 Mar 2012 at 6:31
If you don't want to change the code of the ModelLoaderAdapters project just
create an assets folder in the project folder (ModelLoaderAdapters\assets) and
put the models in there
Original comment by simon.heinen
on 19 Mar 2012 at 8:06
Well, it turned out libs/armeabi and armeabi-v7 folders were empty - putting
the requisite library there resolved the crash
I can now see a circular shape (pedestal for demo'ing model?) but cannot load
the shape itself - I copied robot-mesh.xml and robot.jpg from here:
http://libgdx.googlecode.com/svn/trunk/extensions/model-loaders/model-loaders-an
droid/assets/data/models/ and changed that line in the code
The apk is attached here
this is the output:
03-19 13:50:45.422: D/dalvikvm(19567): No JNI_OnLoad found in
/data/data/de.rwth/lib/libgdx.so 0x4051d748, skipping init
03-19 13:50:45.422: D/WindowManagerImpl(19567): finishRemoveViewLocked,
mViews[2]: com.android.internal.policy.impl.PhoneWindow$DecorView@40566c38
03-19 13:50:45.603: D/dalvikvm(19567): GC_CONCURRENT freed 196K, 46% free
3096K/5639K, external 28K/512K, paused 7ms+40ms
03-19 13:50:45.783: D/ModelCreator(19567): Trying to load robot-mesh.xml
03-19 13:50:45.943: D/dalvikvm(19567): GC_FOR_MALLOC freed 211K, 47% free
3157K/5895K, external 1K/512K, paused 22ms
03-19 13:50:46.263: I/dalvikvm(19567): Could not find method
javax.xml.bind.JAXBContext.newInstance, referenced from method
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreMesh
03-19 13:50:46.263: W/dalvikvm(19567): VFY: unable to resolve static method
11217: Ljavax/xml/bind/JAXBContext;.newInstance
([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
03-19 13:50:46.263: D/dalvikvm(19567): VFY: replacing opcode 0x71 at 0x0008
03-19 13:50:46.263: D/dalvikvm(19567): VFY: dead code 0x000b-0038 in
Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/OgreXmlLoader;.loadOgreMesh
(Ljava/io/InputStream;)Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Mesh;
03-19 13:50:46.263: I/dalvikvm(19567): Could not find method
javax.xml.bind.JAXBContext.newInstance, referenced from method
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreSkeleton
03-19 13:50:46.263: W/dalvikvm(19567): VFY: unable to resolve static method
11217: Ljavax/xml/bind/JAXBContext;.newInstance
([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
03-19 13:50:46.263: D/dalvikvm(19567): VFY: replacing opcode 0x71 at 0x0008
03-19 13:50:46.263: D/dalvikvm(19567): VFY: dead code 0x000b-0038 in
Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/OgreXmlLoader;.loadOgreSkeleton
(Ljava/io/InputStream;)Lcom/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Skel
eton;
03-19 13:50:46.273: D/szipinf(19567): Initializing inflate state
03-19 13:50:46.273: E/ModelCreator(19567): Could not load model
03-19 13:50:46.273: W/System.err(19567):
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file 'robot-mesh.xml'
03-19 13:50:46.273: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMeshes(OgreXmlLoade
r.java:68)
03-19 13:50:46.273: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.load(OgreXmlLoader.java
:88)
03-19 13:50:46.283: W/System.err(19567): at
de.rwth.ModelLoader.loadModelFromFile(ModelLoader.java:94)
03-19 13:50:46.283: W/System.err(19567): at
de.rwth.ModelLoader.render(ModelLoader.java:126)
03-19 13:50:46.283: W/System.err(19567): at
gl.GL1Renderer.onDrawFrame(GL1Renderer.java:107)
03-19 13:50:46.283: W/System.err(19567): at
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1367)
03-19 13:50:46.283: W/System.err(19567): at
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1122)
03-19 13:50:46.283: W/System.err(19567): Caused by:
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load meshes
03-19 13:50:46.283: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMesh(OgreXmlLoader.
java:83)
03-19 13:50:46.283: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMeshes(OgreXmlLoade
r.java:66)
03-19 13:50:46.283: W/System.err(19567): ... 6 more
03-19 13:50:46.283: W/System.err(19567): Caused by:
java.lang.NoClassDefFoundError: javax.xml.bind.JAXBContext
03-19 13:50:46.283: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadOgreMesh(OgreXmlLoa
der.java:347)
03-19 13:50:46.283: W/System.err(19567): at
com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader.loadMesh(OgreXmlLoader.
java:79)
03-19 13:50:46.283: W/System.err(19567): ... 7 more
03-19 13:50:46.283: D/ModelCreator(19567): Result of trying is:
03-19 13:50:46.283: D/ModelCreator(19567): fileName=robot-mesh.xml
03-19 13:50:46.283: D/ModelCreator(19567): textureFileName=robot.jpg
03-19 13:50:46.283: D/ModelCreator(19567): model=null
03-19 13:50:46.283: D/ModelCreator(19567): keyFramedModel=null
03-19 13:50:46.283: D/ModelCreator(19567): skeletonModel=null
03-19 13:50:46.293: D/ModelCreator(19567):
texture=com.badlogic.gdx.graphics.Texture@40524ae0
Original comment by sami....@gmail.com
on 19 Mar 2012 at 8:52
Attachments:
knight.md2/knight.jpg loaded fine..
p.s. there was a typo in assets.txt - fix:
t:assets.txt
i:robot.jpg
b:robot-mesh.xml
i:knight.jpg
b:knight.md2
Original comment by sami....@gmail.com
on 19 Mar 2012 at 10:41
Ok I fixed the missing libs in the armeabi and armeabi-v7 folders, thanks for
reporting this bug, I think I forgot to commit them.
I always had problems to load all the meshes, I think its a bug in the
OgreXmlLoader of libgdx. It might also be that some initialization is missing
from my side, I didn't have the time jet, to find it out. If you find a
solution to load all model types correctly, let me know.
Original comment by simon.heinen
on 19 Mar 2012 at 11:52
Sure, will do
Original comment by sami....@gmail.com
on 19 Mar 2012 at 12:05
Original issue reported on code.google.com by
sami....@gmail.com
on 18 Mar 2012 at 2:27