[osg-users] OSG based WebKit plugin - Mac OSX - Crash

2011-06-19 Thread Gino
Good evening to everybody.
I'm currently finishing my OSG plugin for WebKit based browsers... 
But I'm having a trouble:
Sometimes, during testing, it crashes unpredictably , with the following 
crashlog:

Process: WebKitPluginHost [4642]
Path:
/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app/Contents/MacOS/WebKitPluginHost
Identifier:  com.apple.WebKit.PluginHost
Version: 6533.20 (6533.20.20)
Build Info:  WebKitPluginHost-75332020~1
Code Type:   X86 (Native)
Parent Process:  WebKitPluginAgent [380]

PlugIn Path:   /usr/local/lib/osg.framework/Versions/66/osg
PlugIn Identifier: osg
PlugIn Version:??? ()

Date/Time:   2011-05-23 15:33:59.499 +0200
OS Version:  Mac OS X 10.6.7 (10J869)
Report Version:  6

Interval Since Last Report:  426612 sec
Crashes Since Last Report:   80
Per-App Interval Since Last Report:  71487 sec
Per-App Crashes Since Last Report:   58
Anonymous UUID:  147D37FA-E541-46DE-8C6E-C4EFDFACF4A4

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   GLEngine0x14062832 gleRunVertexSubmitImmediate 
+ 722
1   GLEngine0x140624fc gleLLVMArrayFunc + 60
2   GLEngine0x140624b4 gleSetVertexArrayFunc + 116
3   GLEngine0x1404b3c9 
gleDrawArraysOrElements_ExecCore + 1216
4   GLEngine0x13fd4e23 glDrawElements_Exec + 834
5   libGL.dylib 0x95d12050 glDrawElements + 52
6   osg 0x1399c4c2 
osg::DrawElementsUShort::draw(osg::State&, bool) const + 1058
7   osg 0x139036fc 
osg::Geometry::drawImplementation(osg::RenderInfo&) const + 4588
8   osgUtil 0x13c070af 
osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*) + 607
9   osgUtil 0x13c00627 
osgUtil::RenderBin::drawImplementation(osg::RenderInfo&, osgUtil::RenderLeaf*&) 
+ 343
10  osgUtil 0x13c094d7 
osgUtil::RenderStage::drawImplementation(osg::RenderInfo&, 
osgUtil::RenderLeaf*&) + 647
11  osgUtil 0x13c0984d 
osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&, bool&) 
+ 125
12  osgUtil 0x13c0cb6a 
osgUtil::RenderStage::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 1914
13  osgUtil 0x13c17f88 osgUtil::SceneView::draw() + 
600
14  osgViewer   0x13e1d32c 
osgViewer::Renderer::cull_draw() + 972
15  osg 0x13939d1a 
osg::GraphicsContext::runOperations() + 234
16  osgViewer   0x13e6762e 
osgViewer::ViewerBase::renderingTraversals() + 5246
17  libFunCored.dylib   0x1466608a CoreBase::RenderScene() + 
210 (CoreBase.cpp:308)

... ... ... ... ... ...

I'm using actually OSG version 2.9.9, OSX 10.6.7
The technologies that I'm using are ImageIO cocoaevents and core animation...
After some google-ing, I found on the Irrlicht forum, a very similar bugreport.
It seems that they corrected it by introducing the following ifdef, in order to 
manage better the size argument in the glColorPointer

//#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra)
#ifdef GL_BGRA
const GLint colorSize=(FeatureAvailable[IRR_ARB_vertex_array_bgra] || 
FeatureAvailable[IRR_EXT_vertex_array_bgra])?GL_BGRA:4;
#else
const GLint colorSize=4;
#endif

...

glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), 
&(static_cast(vertices))[0].Color);

This could be my case too?
Any further tip or suggestion?
Thanks in advance
G.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG based WebKit plugin - Mac OSX - Crash

2011-06-19 Thread Robert Osfield
Hi Gino,

What form is your colour data? A Vec3Array?  A Vec4Array?  A Vec4ubArary?

With all of these the format will be RGB or RGBA so BGRA will not be
appropriate.  The code segments look like a hacks around drivers bugs
to me as they don't seem related to what I'd expect the OSG to be
passing.

As a general comment I would strongly suggest you upgrade to the
svn/trunk, OSG-3.0.0-rc1 as this will contain lots of bugs fixes and
improvements over that was in 2.9.9.  If it does come to applying a
fix to the OSG it'll be svn/trunk or the OSG-3.0 so you usage of 2.9.9
just clouds the issue.

Robert.

On Sun, Jun 19, 2011 at 5:00 PM, Gino  wrote:
> Good evening to everybody.
> I'm currently finishing my OSG plugin for WebKit based browsers...
> But I'm having a trouble:
> Sometimes, during testing, it crashes unpredictably , with the following 
> crashlog:
>
> Process:         WebKitPluginHost [4642]
> Path:            
> /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app/Contents/MacOS/WebKitPluginHost
> Identifier:      com.apple.WebKit.PluginHost
> Version:         6533.20 (6533.20.20)
> Build Info:      WebKitPluginHost-75332020~1
> Code Type:       X86 (Native)
> Parent Process:  WebKitPluginAgent [380]
>
> PlugIn Path:       /usr/local/lib/osg.framework/Versions/66/osg
> PlugIn Identifier: osg
> PlugIn Version:    ??? ()
>
> Date/Time:       2011-05-23 15:33:59.499 +0200
> OS Version:      Mac OS X 10.6.7 (10J869)
> Report Version:  6
>
> Interval Since Last Report:          426612 sec
> Crashes Since Last Report:           80
> Per-App Interval Since Last Report:  71487 sec
> Per-App Crashes Since Last Report:   58
> Anonymous UUID:                      147D37FA-E541-46DE-8C6E-C4EFDFACF4A4
>
> Exception Type:  EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x
> Crashed Thread:  0  Dispatch queue: com.apple.main-thread
>
> Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
> 0   GLEngine                            0x14062832 
> gleRunVertexSubmitImmediate + 722
> 1   GLEngine                            0x140624fc gleLLVMArrayFunc + 60
> 2   GLEngine                            0x140624b4 gleSetVertexArrayFunc + 116
> 3   GLEngine                            0x1404b3c9 
> gleDrawArraysOrElements_ExecCore + 1216
> 4   GLEngine                            0x13fd4e23 glDrawElements_Exec + 834
> 5   libGL.dylib                         0x95d12050 glDrawElements + 52
> 6   osg                                 0x1399c4c2 
> osg::DrawElementsUShort::draw(osg::State&, bool) const + 1058
> 7   osg                                 0x139036fc 
> osg::Geometry::drawImplementation(osg::RenderInfo&) const + 4588
> 8   osgUtil                             0x13c070af 
> osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*) + 607
> 9   osgUtil                             0x13c00627 
> osgUtil::RenderBin::drawImplementation(osg::RenderInfo&, 
> osgUtil::RenderLeaf*&) + 343
> 10  osgUtil                             0x13c094d7 
> osgUtil::RenderStage::drawImplementation(osg::RenderInfo&, 
> osgUtil::RenderLeaf*&) + 647
> 11  osgUtil                             0x13c0984d 
> osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&, 
> bool&) + 125
> 12  osgUtil                             0x13c0cb6a 
> osgUtil::RenderStage::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 1914
> 13  osgUtil                             0x13c17f88 osgUtil::SceneView::draw() 
> + 600
> 14  osgViewer                           0x13e1d32c 
> osgViewer::Renderer::cull_draw() + 972
> 15  osg                                 0x13939d1a 
> osg::GraphicsContext::runOperations() + 234
> 16  osgViewer                           0x13e6762e 
> osgViewer::ViewerBase::renderingTraversals() + 5246
> 17  libFunCored.dylib                   0x1466608a CoreBase::RenderScene() + 
> 210 (CoreBase.cpp:308)
>
> ... ... ... ... ... ...
>
> I'm using actually OSG version 2.9.9, OSX 10.6.7
> The technologies that I'm using are ImageIO cocoaevents and core animation...
> After some google-ing, I found on the Irrlicht forum, a very similar 
> bugreport.
> It seems that they corrected it by introducing the following ifdef, in order 
> to manage better the size argument in the glColorPointer
>
> //#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra)
> #ifdef GL_BGRA
>        const GLint colorSize=(FeatureAvailable[IRR_ARB_vertex_array_bgra] || 
> FeatureAvailable[IRR_EXT_vertex_array_bgra])?GL_BGRA:4;
> #else
>        const GLint colorSize=4;
> #endif
>
> ...
>
> glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), 
> &(static_cast(vertices))[0].Color);
>
> This could be my case too?
> Any further tip or suggestion?
> Thanks in advance
> G.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
__

Re: [osg-users] OSG based WebKit plugin - Mac OSX - Crash

2011-07-18 Thread Gino
Hi Robert! Thank you for your prompt replay, and sorry for my late one.
I upgraded to OSG 3.0 and now everything seems to be ok.
:)
G.



Il giorno 19.giu.2011, alle ore 18:59, Robert Osfield ha scritto:

> Hi Gino,
> 
> What form is your colour data? A Vec3Array?  A Vec4Array?  A Vec4ubArary?
> 
> With all of these the format will be RGB or RGBA so BGRA will not be
> appropriate.  The code segments look like a hacks around drivers bugs
> to me as they don't seem related to what I'd expect the OSG to be
> passing.
> 
> As a general comment I would strongly suggest you upgrade to the
> svn/trunk, OSG-3.0.0-rc1 as this will contain lots of bugs fixes and
> improvements over that was in 2.9.9.  If it does come to applying a
> fix to the OSG it'll be svn/trunk or the OSG-3.0 so you usage of 2.9.9
> just clouds the issue.
> 
> Robert.
> 
> On Sun, Jun 19, 2011 at 5:00 PM, Gino  wrote:
>> Good evening to everybody.
>> I'm currently finishing my OSG plugin for WebKit based browsers...
>> But I'm having a trouble:
>> Sometimes, during testing, it crashes unpredictably , with the following 
>> crashlog:
>> 
>> Process: WebKitPluginHost [4642]
>> Path:
>> /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app/Contents/MacOS/WebKitPluginHost
>> Identifier:  com.apple.WebKit.PluginHost
>> Version: 6533.20 (6533.20.20)
>> Build Info:  WebKitPluginHost-75332020~1
>> Code Type:   X86 (Native)
>> Parent Process:  WebKitPluginAgent [380]
>> 
>> PlugIn Path:   /usr/local/lib/osg.framework/Versions/66/osg
>> PlugIn Identifier: osg
>> PlugIn Version:??? ()
>> 
>> Date/Time:   2011-05-23 15:33:59.499 +0200
>> OS Version:  Mac OS X 10.6.7 (10J869)
>> Report Version:  6
>> 
>> Interval Since Last Report:  426612 sec
>> Crashes Since Last Report:   80
>> Per-App Interval Since Last Report:  71487 sec
>> Per-App Crashes Since Last Report:   58
>> Anonymous UUID:  147D37FA-E541-46DE-8C6E-C4EFDFACF4A4
>> 
>> Exception Type:  EXC_BAD_ACCESS (SIGBUS)
>> Exception Codes: KERN_PROTECTION_FAILURE at 0x
>> Crashed Thread:  0  Dispatch queue: com.apple.main-thread
>> 
>> Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
>> 0   GLEngine0x14062832 
>> gleRunVertexSubmitImmediate + 722
>> 1   GLEngine0x140624fc gleLLVMArrayFunc + 60
>> 2   GLEngine0x140624b4 gleSetVertexArrayFunc + 
>> 116
>> 3   GLEngine0x1404b3c9 
>> gleDrawArraysOrElements_ExecCore + 1216
>> 4   GLEngine0x13fd4e23 glDrawElements_Exec + 834
>> 5   libGL.dylib 0x95d12050 glDrawElements + 52
>> 6   osg 0x1399c4c2 
>> osg::DrawElementsUShort::draw(osg::State&, bool) const + 1058
>> 7   osg 0x139036fc 
>> osg::Geometry::drawImplementation(osg::RenderInfo&) const + 4588
>> 8   osgUtil 0x13c070af 
>> osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*) + 607
>> 9   osgUtil 0x13c00627 
>> osgUtil::RenderBin::drawImplementation(osg::RenderInfo&, 
>> osgUtil::RenderLeaf*&) + 343
>> 10  osgUtil 0x13c094d7 
>> osgUtil::RenderStage::drawImplementation(osg::RenderInfo&, 
>> osgUtil::RenderLeaf*&) + 647
>> 11  osgUtil 0x13c0984d 
>> osgUtil::RenderStage::drawInner(osg::RenderInfo&, osgUtil::RenderLeaf*&, 
>> bool&) + 125
>> 12  osgUtil 0x13c0cb6a 
>> osgUtil::RenderStage::draw(osg::RenderInfo&, osgUtil::RenderLeaf*&) + 1914
>> 13  osgUtil 0x13c17f88 
>> osgUtil::SceneView::draw() + 600
>> 14  osgViewer   0x13e1d32c 
>> osgViewer::Renderer::cull_draw() + 972
>> 15  osg 0x13939d1a 
>> osg::GraphicsContext::runOperations() + 234
>> 16  osgViewer   0x13e6762e 
>> osgViewer::ViewerBase::renderingTraversals() + 5246
>> 17  libFunCored.dylib   0x1466608a CoreBase::RenderScene() + 
>> 210 (CoreBase.cpp:308)
>> 
>> ... ... ... ... ... ...
>> 
>> I'm using actually OSG version 2.9.9, OSX 10.6.7
>> The technologies that I'm using are ImageIO cocoaevents and core animation...
>> After some google-ing, I found on the Irrlicht forum, a very similar 
>> bugreport.
>> It seems that they corrected it by introducing the following ifdef, in order 
>> to manage better the size argument in the glColorPointer
>> 
>> //#if defined(GL_ARB_vertex_array_bgra) || defined(GL_EXT_vertex_array_bgra)
>> #ifdef GL_BGRA
>>const GLint colorSize=(FeatureAvailable[IRR_ARB_vertex_array_bgra] || 
>> FeatureAvailable[IRR_EXT_vertex_array_bgra])?GL_BGRA:4;
>> #else
>>const GLint colorSize=4;
>> #endif
>> 
>> ...
>> 
>> glColorPointer(colorSize, GL_UNSIGNED_BYTE, sizeof(S3DVertex), 
>> &(stat