Re: [osg-users] ffmpeg and OSG
Hi Donn, On 8 February 2012 01:37, Donn Washburn n5...@comcast.net wrote: It seems that ffmpeg is alway lately being a problem in recent distros. I have Flightgear to compile and the most current vesion of openSuSE fails to compile. So thinking it is a bad ffmpeg source I downloaded and compiled ffmpeg after removing all the old libav* Enclosed is a copy of the tail end a OSG version. Which version of ffmpeg is causing problems? Which version of the OSG are you compiling against? With the OSG we've had to keep making amendments to keep things compiling against the evolution of the ffmpeg source, so generally OSG svn/trunk will have the most current fixes to address the compilation issues. If ffmpeg has moved on since then, then we'll need to look at further changes. As a general note, does Flightgear need video? If not then you won't need to compile the OSG against ffmpeg. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Referenced::unref() thread safety
Thanks for your answer Robert, My test app was clearly a misuse of ref_ptr. So, I retested it with observer_ptr instead of C pointer. With the head revision, I haven't been able to reproduce the warning thanks to this test in the ObserverSet::addRefLock() function : if (refCount == 1) { // The object is in the process of being deleted, but our // objectDeleted() method hasn't been run yet (and we're // blocking it -- and the final destruction -- with our lock). _observedObject-unref_nodelete(); return 0; } When assigning an observer_ptr to a ref_ptr in my second thread, the simultaneous destruction of the pointed object is well checked and then the refCount is not incremented. The ref_ptr is set to NULL. All works fine. With the 2.9.5 version, there was no ref_ptr constructor taking an observer_ptr argument. So we have to be careful also when using observer_ptr. It could lead to misuse of ref_ptr too, since we need to use the observed C pointer to assign it to ref_ptr. Indeed, the warning is reproduced with the following assignment in my test: _imageRefPtr = _imageObserverPtr.get(); Thanks again 2012/2/7 Robert Osfield robert.osfi...@gmail.com HI Mikael, Thanks for the details. Your comment about the delete not being mutexed made me think about why the ref count could get to zero and then have the thread progress to delete, and one shouldn't progress to delete as long as the ref count is non zero. This led me to wonder just how with your code this could happen and I think the crux of it is that in your test app you are creating an object using a C pointer to it, then letting different threads assign and reset ref_ptr independently. For the case where it crashes my guess is that the main thread creates the MyThread and this stores a C pointer to the Image, then the main thread calls startThread() which returns to main which then assigns and resets the ref_ptr, if this assign/reset happens before the MyThread::run() gets going and creates it's own ref to the Image then it'll be deleted before it gets a chance to increment the ref count. This isn't a bug in ref counting, it's a bug in your code - MyThread should never have been written with a C pointer in the first place, as this opens the door to the sequence I've explain and problem you are seeing. So I think this example is good one for demonstrating how dangerous it is to use C pointers and ref_ptr's without taking proper care about sequencing of the creation and assignments. These types of errors are very hard to spot, even on an example as small of yours it's not obvious, so taking a full scale app it becomes very hard to spot these problems indeed. The best defence is to be very careful anytime you pass C pointers around, and especially carefully when you retain C pointers for use later. Robert. On 7 February 2012 13:50, mikael lemercier mika.lemerc...@gmail.com wrote: 2012/2/7 Robert Osfield robert.osfi...@gmail.com Also what hardware, OS, dev environment are you working on? I'm working on: - Hardware : Intel Core i7-2600 - OS : Windows 7 - Dev environment : Visual 2010 - Build config : x64 I also reproduced the problem on: - Hardware : Intel Core i7-2600 - OS : OpenSuse 11.1 - Dev environment : Eclipse Could you also check whether the OSG is using atomic ref counting or OpenThreads::Mutex version? include/OpenThreads/Config will reveal which should be being used. It's using atomic ref counting in my case : _OSG_REFERENCED_USE_ATOMIC_OPERATIONS is defined. But the problem might also exist with Mutex, since in both cases the delete part is not locked. Could you also outline how you are running your tests. To reproduce the problem, without any interference from my work, I inserted my test file directly in the osg solution. I just replaced osgviewer.cpp by my test file (joined with my first message). As I said before, I also added a sleep() of 1s to the Referenced::unref() function so that the created thread has time to increment the refCount before the main thread calls the delete. ___ 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
Re: [osg-users] [3rdparty] SpeedTree 6.0 integration
Hi, hybr Thank you! I hadn't thought of the view and projection matrices - I was focused on still active shader programs (which I later ruled out, though). Also, I will try gDebugger to see if that can shed some light on the issue. Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45334#45334 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg and OSG
On 02/08/2012 03:12 AM, Robert Osfield wrote: Hi Donn, On 8 February 2012 01:37, Donn Washburnn5...@comcast.net wrote: It seems that ffmpeg is alway lately being a problem in recent distros. I have Flightgear to compile and the most current vesion of openSuSE fails to compile. So thinking it is a bad ffmpeg source I downloaded and compiled ffmpeg after removing all the old libav* Enclosed is a copy of the tail end a OSG version. Which version of ffmpeg is causing problems? Which version of the OSG are you compiling against? With the OSG we've had to keep making amendments to keep things compiling against the evolution of the ffmpeg source, so generally OSG svn/trunk will have the most current fixes to address the compilation issues. If ffmpeg has moved on since then, then we'll need to look at further changes. As a general note, does Flightgear need video? If not then you won't need to compile the OSG against ffmpeg. Robert. One mixed version is the openSuSE factory 12.1 version and a SVN/GIT version (current) from ffmpegs site.. About one year ago I had the same problem. ffmpeg-0.9.1-1.1.x86_64 -openSuSE does renumber and installs them by lib64s (libav* +libsws*) gstreamer-0_10-ffmpeg-0.10.11-1000.4.x86_64 They also failed The following is a SVN/GIT number set /usr/lib64/libavcodec.so.54.1.100 on this machine currently. There has been others versions going back to about 1 year. Please note openSuSE only has libav codec53, libavfilter1, libformat52, libavutil51 and libswscale0. NO libpostproc or the others If you need more please let me know. -- 73 de Donn Washburn 307 Savoy StreetEmail: n5...@comcast.net Sugar Land, TX 77478 LL# 1.281.242.3256 Ham Callsign N5XWB HAMs : n5...@arrl.net VoIP via Skype:n5xwbg BMWMOA #:4146 Ambassador http://counter.li.org #279316 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] SpeedTree 6.0 integration
Hi, I had similar problem with using geometry shader. Setting parametr GL_GEOMETRY_VERTICES_OUT_EXT with correct number of vertices helped... Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45340#45340 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg and OSG
On 02/08/2012 07:39 AM, Donn Washburn wrote: One mixed version is the openSuSE factory 12.1 version and a SVN/GIT version (current) from ffmpegs site.. About one year ago I had the same problem. ffmpeg-0.9.1-1.1.x86_64-openSuSE does renumber and installs them by lib64s (libav* +libsws*) gstreamer-0_10-ffmpeg-0.10.11-1000.4.x86_64 They also failed The following is a SVN/GIT number set /usr/lib64/libavcodec.so.54.1.100 on this machine currently. There has been others versions going back to about 1 year. Please note openSuSE only has libav codec53, libavfilter1, libformat52, libavutil51 and libswscale0. NO libpostproc or the others If you need more please let me know. Just a note that ffmpeg seems to be under new management these days, and they are making an effort to keep things stable for longer. The current versions of ffmpeg are 0.7.11 (ABI compatible with the 0.6 version), 0.8.10, 0.9.1, and 0.10. All of these versions are now actively maintained (though new features only show up on the latest branch, obviously). Instead of using ffmpeg SVN, you might consider picking a stable release that is already compatible with OSG. It's not as necessary to use SVN to get the best version of ffmpeg as it used to be. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg and OSG
On 02/08/2012 10:46 AM, Jason Daly wrote: On 02/08/2012 07:39 AM, Donn Washburn wrote: One mixed version is the openSuSE factory 12.1 version and a SVN/GIT version (current) from ffmpegs site.. About one year ago I had the same problem. ffmpeg-0.9.1-1.1.x86_64-openSuSE does renumber and installs them by lib64s (libav* +libsws*) gstreamer-0_10-ffmpeg-0.10.11-1000.4.x86_64 They also failed The following is a SVN/GIT number set /usr/lib64/libavcodec.so.54.1.100 on this machine currently. There has been others versions going back to about 1 year. Please note openSuSE only has libav codec53, libavfilter1, libformat52, libavutil51 and libswscale0. NO libpostproc or the others If you need more please let me know. Just a note that ffmpeg seems to be under new management these days, and they are making an effort to keep things stable for longer. The current versions of ffmpeg are 0.7.11 (ABI compatible with the 0.6 version), 0.8.10, 0.9.1, and 0.10. All of these versions are now actively maintained (though new features only show up on the latest branch, obviously). Instead of using ffmpeg SVN, you might consider picking a stable release that is already compatible with OSG. It's not as necessary to use SVN to get the best version of ffmpeg as it used to be. --J _ I did try ffmpeg-0.10 and OSG did make it. However, at about 92% it complained about ffmpeg to about 96%. The errors are depreciated and warning as I remember -- 73 de Donn Washburn 307 Savoy StreetEmail: n5...@comcast.net Sugar Land, TX 77478 LL# 1.281.242.3256 Ham Callsign N5XWB HAMs : n5...@arrl.net VoIP via Skype:n5xwbg BMWMOA #:4146 Ambassador http://counter.li.org #279316 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ffmpeg and OSG
On 02/08/2012 06:34 PM, Donn Washburn wrote: I did try ffmpeg-0.10 and OSG did make it. However, at about 92% it complained about ffmpeg to about 96%. The errors are depreciated and warning as I remember Those are probably because OSG isn't ready for ffmpeg-0.10 yet (it just came out last month). You might want to try the 0.7.x or possibly the 0.8.x release. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] OSG for Android build on Fedora cpp errors
you're a wonderful person, this one was starting to get really frustrating [hard linking the libraries, misspelling them to confirm it would err when it couldn't find em]... now if i could only figure out why the demo shows up as only a blue screen with the three buttons 02-09 01:20:54.274: D/ATRecorder(11129): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@40533c78 02-09 01:20:54.434: D/libEGL(11129): loaded /system/lib/egl/libGLES_android.so 02-09 01:20:54.464: D/libEGL(11129): loaded /system/lib/egl/libEGL_adreno200.so 02-09 01:20:54.504: D/libEGL(11129): loaded /system/lib/egl/libGLESv1_CM_adreno200.so 02-09 01:20:54.524: D/libEGL(11129): loaded /system/lib/egl/libGLESv2_adreno200.so 02-09 01:20:54.554: W/EGLview(11129): creating OpenGL ES 2.0 context 02-09 01:20:54.694: D/dalvikvm(11129): Trying to load lib /mnt/asec/osg.AndroidExample-2/lib/libosgNativeLib.so 0x4051da00 02-09 01:20:55.365: D/dalvikvm(11129): Added shared lib /mnt/asec/osg.AndroidExample-2/lib/libosgNativeLib.so 0x4051da00 02-09 01:20:55.365: D/dalvikvm(11129): No JNI_OnLoad found in /mnt/asec/osg.AndroidExample-2/lib/libosgNativeLib.so 0x4051da00, skipping init 02-09 01:20:55.365: E/OSGANDROID(11129): Initializing geometry 02-09 01:20:55.365: E/Osg Viewer(11129): Testing 02-09 01:20:55.365: W/Osg Viewer(11129): Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile 02-09 01:21:05.135: W/KeyCharacterMap(11129): Can't open keycharmap file 02-09 01:21:05.135: W/KeyCharacterMap(11129): Error loading keycharmap file '/system/usr/keychars/atmel-touchscreen.kcm.bin'. hw.keyboards.65539.devname='atmel-touchscreen' 02-09 01:21:05.135: I/KeyCharacterMap(11129): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 02-09 01:21:05.995: W/IInputConnectionWrapper(11129): showStatusIcon on inactive InputConnection 02-09 01:21:06.046: W/IInputConnectionWrapper(11129): InputConnection = android.view.inputmethod.BaseInputConnection@40532938, active client = false -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45351#45351 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] OSG for Android build on Fedora cpp errors
results the same on my acer iconia a500 (tegra 2) and my droid incredible og. compiled for armeabi (not v7a). the buttons produce feedback on the screen so i assume at least that much is working... just doesn't seem to be loading the model (the real concern of this endeavour) any ideas? i had to screw around with some include directory configs when building osg but it got through the process without errors once the x11/gles/egl/glib headers were found. i built on an ubuntu 32-bit VM, running eclipse indigo (setup adt/sequoyah to just launch the app) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45352#45352 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org