ObjectArrayList IndexOutOfBounds exceptions

You can try an earlier version of mingw, I mean it used to work on our server. Only that requires a complete downgrading of the whole gcc compiler infrastructure :confused:

Well easier on windows than on other os, since it has no stuff that depends on it.

With gcc 4.7.0 it works at least. (I’m still useing that)



Anyway, I suggest really!! to simply replace the jbullet object pool with a thread safe one. This should fix most if not all of yout jbullet problems. I would never use the native bullet version on clients, only in enviroments I control, since else the compiling and compability issues quickly explode.



Eg. one method is fixed → 6 recompiles needed.

So, I got passed the -rdynamic problem!



I changed this file: /usr/share/cmake-2.8/Modules/Platform/Linux-GNU.cmake



… which had the line in it:



set(CMAKE_SHARED_LIBRARY_LINK_${lang}FLAGS “rdynamic”)



… to



set(CMAKE_SHARED_LIBRARY_LINK
${lang}_FLAGS “”)



… which was suggested here: http://www.cmake.org/Bug/view.php?id=5833



Suddenly, progress! Now I get stuck here:



[java]-compile-bullet-sources-linux-mingw:

[exec] OPENGL FOUND

[exec] /usr/lib/x86_64-linux-gnu/libGLU.so/usr/lib/x86_64-linux-gnu/libGL.so/usr/lib/x86_64-linux-gnu/libSM.so/usr/lib/x86-- WARNING: you are using the obsolete ‘GLU’ package, please use ‘OpenGL’ instead

[exec] – Configuring done

[exec] _64-linux-gnu/libICE.so/usr/lib/x86_64-linux-gnu/libX11.so/usr/lib/x86_64-linux-gnu/libXext.so

[exec] GLUT FOUND

[exec] /usr/lib/x86_64-linux-gnu/libglut.so

[exec] You have changed variables that require your cache to be deleted.

[exec] Configure will be re-run and you may have to reset some variables.

[exec] The following variables have changed:

[exec] CMAKE_C_COMPILER= i686-w64-mingw32-gcc

[exec] CMAKE_CXX_COMPILER= i686-w64-mingw32-g++

[exec]

[exec] – The C compiler identification is GNU 4.6.3

[exec] – The CXX compiler identification is GNU 4.6.3

[exec] – Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc

[exec] – Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc – works

[exec] – Detecting C compiler ABI info

[exec] – Detecting C compiler ABI info - done

[exec] – Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++

[exec] – Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ – works

[exec] – Detecting CXX compiler ABI info

[exec] – Detecting CXX compiler ABI info - done

[exec] OPENGL FOUND

[exec] /usr/lib/libGL.so

[exec] GLUT NOT FOUND not found, trying to use MINGW glut32

[exec] ‘Win64usingGlut/glut64.lib’

[exec] GLUT NOT FOUND

[exec] – Found OpenGL: /usr/lib/libGL.so

[exec] – WARNING: you are using the obsolete ‘GLU’ package, please use ‘OpenGL’ instead

[exec] – Could NOT find GLUT (missing: GLUT_glut_LIBRARY)

[exec] – WARNING: you are using the obsolete ‘GLU’ package, please use ‘OpenGL’ instead

[exec] – Found GLUT: /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Glut/glut64.lib

[exec] CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

[exec] Please set them or make sure they a-- Configuring incomplete, errors occurred!

[exec] re set and tested correctly in the CMake files:

[exec] OPENGL_glu_LIBRARY (ADVANCED)

[exec] linked by target “AppAllBulletDemos” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/AllBulletDemos

[exec] linked by target “AppConvexDecompositionDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConvexDecompositionDemo

[exec] linked by target “AppCcdPhysicsDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/CcdPhysicsDemo

[exec] linked by target “AppBulletXmlImportDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/BulletXmlImportDemo

[exec] linked by target “AppConstraintDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConstraintDemo

[exec] linked by target “AppSliderConstraintDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/SliderConstraintDemo

[exec] linked by target “AppGenericJointDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/GenericJointDemo

[exec] linked by target “AppRaytracer” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/Raytracer

[exec] linked by target “AppRagdollDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/RagdollDemo

[exec] linked by target “AppForkLiftDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ForkLiftDemo

[exec] linked by target “AppBasicDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/BasicDemo

[exec] linked by target “AppRollingFrictionDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/RollingFrictionDemo

[exec] linked by target “AppRaytestDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/RaytestDemo

[exec] linked by target “AppVoronoiFractureDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/VoronoiFractureDemo

[exec] linked by target “AppGyroscopicDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/GyroscopicDemo

[exec] linked by target “AppFractureDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/FractureDemo

[exec] linked by target “AppBox2dDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/Box2dDemo

[exec] linked by target “AppBspPhysicsDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/BspDemo

[exec] linked by target “AppMovingConcaveDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/MovingConcaveDemo

[exec] linked by target “AppVehicleDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/VehicleDemo

[exec] linked by target “AppUserCollisionAlgorithm” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/UserCollisionAlgorithm

[exec] linked by target “AppCharacterDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/CharacterDemo

[exec] linked by target “AppSoftBodyDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/SoftDemo

[exec] linked by target “AppCollisionInterfaceDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/CollisionInterfaceDemo

[exec] linked by target “AppConcaveConvexCastDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConcaveConvexcastDemo

[exec] linked by target “AppSimplexDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/SimplexDemo

[exec] linked by target “AppMotorDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/DynamicControlDemo

[exec] linked by target “AppConvexHullDistanceDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConvexHullDistance

[exec] linked by target “AppDoublePrecisionDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/DoublePrecisionDemo

[exec] linked by target “AppConcaveDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConcaveDemo

[exec] linked by target “AppCollisionDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/CollisionDemo

[exec] linked by target “AppContinuousConvexCollisionDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ContinuousConvexCollision

[exec] linked by target “AppConcaveRayCastDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/ConcaveRaycastDemo

[exec] linked by target “AppLinearConvexCastDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/GjkConvexCastDemo

[exec] linked by target “AppMultiMaterialDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/MultiMaterialDemo

[exec] linked by target “AppSerializeDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/SerializeDemo

[exec] linked by target “AppInternalEdgeDemo” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/InternalEdgeDemo

[exec] linked by target “AppBenchmarks” in directory /home/phr00t/jme3src/jmonkeyengine-read-only/bullet-2.81-rev2613/Demos/Benchmarks

[exec]



BUILD FAILED

/home/phr00t/jme3src/jmonkeyengine-read-only/engine/build.xml:10: The following error occurred while executing this line:

/home/phr00t/jme3src/jmonkeyengine-read-only/engine/nbproject/build-bullet-natives.xml:628: exec returned: 1



Total time: 9 seconds[/java]



Not sure how to get GLUT for MinGW on Ubuntu working, which I assume is the problem… is there an option somewhere to set it to OpenGL, then it would ignore “GLUT”…?

2 Likes
Anyway, I suggest really!! to simply replace the jbullet object pool with a thread safe one


Can this be done in the main branch...? I don't really want to modify jbullet myself directly, do I? Is the object pool the only thing causing multithreading problems..?

Building native works fine on my windows machine. I had to install cmake and mingw, one thing i have to change every time i build it is to remove sh from my ‘path’

@zzuegg said:
Building native works fine on my windows machine. I had to install cmake and mingw, one thing i have to change every time i build it is to remove sh from my 'path'


Did you build all 2.8.1 native platforms? May you share the builds? :)
@phr00t said:
I changed this file: /usr/share/cmake-2.8/Modules/Platform/Linux-GNU.cmake

... which had the line in it:

set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "rdynamic")

... to

set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")

... which was suggested here: http://www.cmake.org/Bug/view.php?id=5833


Cool, gonna try that on the build server, then you get the binaries in the nightly version. The version of jbullet that jme actually uses is at https://code.google.com/p/jbullet-jme/source/browse/#svn%2Ftrunk%2Fjbullet-jme
@phr00t said:
Did you build all 2.8.1 native platforms? May you share the builds? :)


I guess, at least the lib includes:

Windows:
bulletjme64.dll
billetjme.dll

macosx:
libbulletjme.jnilib

linux:
libbulletjme64.so
libbulletjme.so


Sure, if thats what you are searching for i can upload them somewhere

btw, i builded bullet-2.80-rev2531

That fix did it, thanks @phr00t, the nightly now contains builds of the bullet binaries for all platforms again :slight_smile:

1 Like

and there was much rejoicing :slight_smile:



http://www.youtube.com/watch?v=enSYlCEz5VI

@normen said:
That fix did it, thanks @phr00t, the nightly now contains builds of the bullet binaries for all platforms again :)


Sweet! I will just pick up the nightly build tomorrow and go from there. Will it be using the 2.8.1 sources?

nope, 2.80

Welp, just for fun, I still tried to continue compiling natives myself. I got passed the OPENGL_glu_LIBRARY junk by modifying the following section to look like this (in bullet-2.8.1/CMakeLists.txt):



[java]# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system

This should be the case.


FIND_PACKAGE(OpenGL)
# IF (OPENGL_FOUND)
# MESSAGE("OPENGL FOUND")
# MESSAGE(${OPENGL_LIBRARIES})
# ELSE (OPENGL_FOUND)
# MESSAGE("OPENGL NOT FOUND")
SET(OPENGL_gl_LIBRARY opengl32)
SET(OPENGL_glu_LIBRARY glu32)
# ENDIF (OPENGL_FOUND)[/java]

... so OPENGL_glu_LIBRARY will be defined even if OPENGL_FOUND.

However, when compiling -nativelib-linux-64, this happens:

[java][cc] /home/phr00t/jme3src/jmonkeyengine-read-only/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp: In member function ‘virtual btScalar Java_com_jme3_bullet_PhysicsSpace_rayTest_1native(JNIEnv*, jobject, jobject, jobject, jlong, jobject)::AllRayResultCallback::addSingleResult(btCollisionWorld::LocalRayResult&, bool)’:
[cc] /home/phr00t/jme3src/jmonkeyengine-read-only/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp:451:146: error: invalid conversion from ‘const btCollisionObject*’ to ‘btCollisionObject*’ [-fpermissive]
[cc] /home/phr00t/jme3src/jmonkeyengine-read-only/engine/src/bullet-native/jmeBulletUtil.h:48:17: error: initializing argument 6 of ‘static void jmeBulletUtil::addResult(JNIEnv*, jobject, btVector3, btVector3, btScalar, btCollisionObject*)’ [-fpermissive][/java]

sooooooooooooo I will just assume continuing this is a waste of time and pick up nightly tomorrow (and be happy with 2.8.0 for now) :P

You seem to do something wrong generally, did you follow the instructions in the built-bullet-native.txt and the properties file?

I’ve just been using “ant build-bullet-natives”…



I did modify the bullet.properties for the newest bullet build, but that was it.



Doing the “build for linux” instructions seem to run without error, but I’m not sure what was made or where it put things :stuck_out_tongue: It also completed pretty fast, so I don’t think it built for all platforms…?

@phr00t said:
I've just been using "ant build-bullet-natives"...

I did modify the bullet.properties for the newest bullet build, but that was it.

Doing the "build for linux" instructions seem to run without error, but I'm not sure what was made or where it put things :P It also completed pretty fast, so I don't think it built for all platforms...?

It can only build linux and windows on linux, all other platforms can only build their own versions.
@normen said:
It can only build linux and windows on linux, all other platforms can only build their own versions.


The "ant build-bullet-natives" -- is that suppose to build all platforms, though (e.g. MacOSX too)? Any ideas on how to get passed that -nativelib-linux-64 error..? :/
@phr00t said:
The "ant build-bullet-natives" -- is that suppose to build all platforms, though (e.g. MacOSX too)? Any ideas on how to get passed that -nativelib-linux-64 error..? :/


disable cross-platform build in the properties file
@normen said:
disable cross-platform build in the properties file


That would disable building for other platforms, though? Then I couldn't have a complete build of 2.8.1 (or whatever later version I decide to build) for release to the public?