node-openvg icon indicating copy to clipboard operation
node-openvg copied to clipboard

createPBufferFromClientBuffer causes exception

Open aomega opened this issue 11 years ago • 0 comments

The createPBufferFromClientBuffer is causing a fatal exception.

I'm using node v0.10.22 Raspbian latest version upgraded/updated through apt-get Hard float

The error can be obtained using the openvg-canvas example shadows.js

pi@raspberrypi ~/tmp/node_modules/openvg-canvas $ node examples/shadows.js 
Loading typeface file: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf


#
# Fatal error in , line 0
# API call returned invalid object
#


==== Stack trace ============================================

Security context: 0x4bf09619 #0#
    1: checkShadowEffects(aka checkShadowEffects) [/home/pi/tmp/node_modules/openvg-canvas/lib/context.js:471] (this=0x4bf08091 )
    2: fillRect [/home/pi/tmp/node_modules/openvg-canvas/lib/context.js:495] (this=0x2e664a3d #1#,x=20,y=20,w=40,h=40)
    3: paint(aka paint) [/home/pi/tmp/node_modules/openvg-canvas/examples/shadows.js:39] (this=0x4bf08091 )
    4: /* anonymous */ [/home/pi/tmp/node_modules/openvg-canvas/examples/shadows.js:88] (this=0x2e63fc4d #2#,exports=0x2e63fc4d #2#,require=0x2e63fc29 #3#,module=0x2e63fc01 #4#,__filename=0x3384e15d ,__dirname=0x2e63fbed )
    6: _compile [module.js:456] (this=0x2e63fc01 #4#,content=0x3384ea9d #5#,filename=0x3384e15d )
    7: .js [module.js:474] (this=0x2e63fce1 #6#,module=0x2e63fc01 #4#,filename=0x3384e15d )
    8: load [module.js:356] (this=0x2e63fc01 #4#,filename=0x3384e15d )
    9: _load [module.js:312] (this=0x2e63fced #7#,request=0x3384fbbd ,parent=0x4bf08081 ,isMain=0x4bf080a1 )
   10: runMain [module.js:497] (this=0x2e63fced #7#)
   11: startup [node.js:119] (this=0x4bf096c1 #8#)
   12: /* anonymous */ [node.js:901] (this=0x4bf096c1 #8#,process=0x2e63fddd #9#)

The error occurs in the call to createPBufferFromClientBuffer. From my investigation, the openvg call returns a scalar value as an EGLSurface (i.e. not a pointer). i.e., it returns '2' and so it is some sort of handle. Then, when this gets wrapped by External::New(surface), it fails before returning to javascript.

There is also an error that gets output to the primary console:-

 Unhandled prefetch abort: breakpoint debug exception (0x002) at 0x004d1b4c 

Since there are screenshots of this sample working, maybe it is related to the version of node.js?

aomega avatar Dec 16 '13 21:12 aomega