[squeak-dev] [BUG]OGLWin32(Object)>>error:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Mar 1 22:01:20 UTC 2012


Most probably, some library was not found (I see the handle is 0).
If I open a browser on OGLWin32
    OGLWin32 browse.
In class definition, you see that handle is an instance variable.
Then looks at instance variable assignment (menu assignment... or
CTRL+a in class pane)
I get these two methods

OpenGL>>destroy
OpenGL>>initializeIn: bounds
	handle := self primCreateRenderer: 1 "B3DSoftwareRenderer" + 2
"B3DHardwareRenderer" + 4 "B3DStencilBuffer"
		x: bounds left y: bounds top w: bounds width h: bounds height.
	bufRect := bounds.
	handle ifNotNil:[glExt := OGLExtManager new ogl: self].
	^handle ifNotNil:[self]

If I browse implementors of primCreateRenderer:x:y:w:h:, I get
OpenGL>>primCreateRenderer: flags x: x y: y w: w h: h
	<primitive: 'primitiveCreateRendererFlags' module:'B3DAcceleratorPlugin'>
	^nil

It could be that your VM does not have the optional module
B3DAcceleratorPlugin...

I see you are using Squeak 4.1, and don't remember if it was already
available...
But you could search for top menu bar item  help->about this system.
If you have it, in the resulting window, select VM Modules and report
if B3DAcceleratorPlugin was loaded.
Also select VM General and report your results.

If you don't have this tool, then try

    SmalltalkImage current listBuiltinModules , SmalltalkImage current
listLoadedModules.

and

    SmalltalkImage current vmVersion.

Nicolas

Le 1 mars 2012 22:33, Chuck Hipschman <ckhipschman at gmail.com> a écrit :
> I'm pretty new to squeak, please let me know if I should be looking
> for help elsewhere, (and where that would be :) TIA
>
> I'm trying to follow a OpenGL tutorial posted on YouTube by user
> sparaig.  It's only 9 lines of code
>
> (Installer repository: 'http://source.squeak.org/FFI')
>        install: 'FFI-Pools';
>        install: 'FFI-Kernel';
>        install: 'FFI-Tests'.
>
> (Installer repository: 'http://www.squeaksource.com/CroquetGL')
>        install: '3DTransform';
>        install: 'OpenGL-Pools';
>        install: 'OpenGL-Core'.
>
> OpenGL example  "this is where the trouble begins"
>
> The transcript shows:
>
> reading http://source.squeak..org/FFI...
> reading http://source.squeak.org/FFI...
> finding FFI-Pools... found FFI-Pools-eem.3.mcz...
> loaded
> reading http://source.squeak.org/FFI...
> finding FFI-Pools... found FFI-Pools-eem.3.mcz...
> finding FFI-Kernel... found FFI-Kernel.threaded-eem.25.mcz...
> loaded
> reading http://source.squeak.org/FFI...
> finding FFI-Pools... found FFI-Pools-eem.3.mcz...
> finding FFI-Kernel... found FFI-Kernel.threaded-eem.25.mcz...
> finding FFI-Tests... found FFI-Tests-ar.5.mcz...
> loaded
> reading http://www.squeaksource.com/CroquetGL...
> finding 3DTransform... found 3DTransform-ar.21.mcz...
> loaded
> reading http://www.squeaksource.com/CroquetGL...
> finding 3DTransform... found 3DTransform-ar.21.mcz...
> finding OpenGL-Pools... found OpenGL-Pools-jcg.9.mcz...
> loaded
> reading http://www.squeaksource.com/CroquetGL...
> finding 3DTransform... found 3DTransform-ar.21.mcz...
> finding OpenGL-Pools... found OpenGL-Pools-jcg.9.mcz...
> finding OpenGL-Core... found OpenGL-Core-hmm.15.mcz...
> loaded
>
> and here's the output I get in the debugger
>
> 1 March 2012 2:12:18.278 pm
>
> VM: Win32 - Smalltalk
> Image: Squeak4.1 [latest update: #9957]
>
> SecurityManager state:
> Restricted: false
> FileAccess: true
> SocketAccess: true
> Working Dir C:\Documents and Settings\Chuck\My Documents\Squeak 4.1
> Trusted Dir C:\Documents and Settings\Chuck\My Documents\Squeak 4.1\Chuck
> Untrusted Dir C:\Documents and Settings\Chuck\My Documents\My Squeak
>
> OGLWin32(Object)>>error:
>        Receiver: an OGLWin32
>        Arguments and temporary variables:
>                aString:        'External function is invalid'
>        Receiver's instance variables:
>                handle:         0
>                bufRect:        0 at 0 corner: 400 at 400
>                glExt:  a *OGLExtManager
>                extensions:     nil
>                frontFace:      2305
>                maxPortalDepth:         5
>                changeTexture:  true
>                test:   false
>                timeStamp:      0
>                formManager:    nil
>                textureManager:         an OGLTextureManager
>                fontManager:    an OGLFontManager
>                shaderManager:  an OGLShaderManager
>                glListRegistry:         a WeakIdentityKeyDictionary()
>                isMirror:       false
>                inPortal3D:     false
>                camera:         nil
>                forceWire:      false
>                numVtx:         0
>                numPrims:       0
>                inGLBlock:      false
>                distance:       nil
>                harness:        nil
>                eventPointer:   nil
>                avatar:         nil
>                forcePick:      false
>                forceHilite:    nil
>                suppressPortals:        false
>                noSwap:         false
>                fogOn:  false
>                transparency:   1.0
>                matrixStack:    nil
>                portalDepth:    0
>                bufferObjects:  a Dictionary()
>
> OGLWin32(Object)>>externalCallFailed
>        Receiver: an OGLWin32
>        Arguments and temporary variables:
>                errCode:        17
>        Receiver's instance variables:
>                handle:         0
>                bufRect:        0 at 0 corner: 400 at 400
>                glExt:  a *OGLExtManager
>                extensions:     nil
>                frontFace:      2305
>                maxPortalDepth:         5
>                changeTexture:  true
>                test:   false
>                timeStamp:      0
>                formManager:    nil
>                textureManager:         an OGLTextureManager
>                fontManager:    an OGLFontManager
>                shaderManager:  an OGLShaderManager
>                glListRegistry:         a WeakIdentityKeyDictionary()
>                isMirror:       false
>                inPortal3D:     false
>                camera:         nil
>                forceWire:      false
>                numVtx:         0
>                numPrims:       0
>                inGLBlock:      false
>                distance:       nil
>                harness:        nil
>                eventPointer:   nil
>                avatar:         nil
>                forcePick:      false
>                forceHilite:    nil
>                suppressPortals:        false
>                noSwap:         false
>                fogOn:  false
>                transparency:   1.0
>                matrixStack:    nil
>                portalDepth:    0
>                bufferObjects:  a Dictionary()
>
> OGLWin32(OpenGL)>>glPixelStorei:with:
>        Receiver: an OGLWin32
>        Arguments and temporary variables:
>                pname:  3317
>                param:  4
>        Receiver's instance variables:
>                handle:         0
>                bufRect:        0 at 0 corner: 400 at 400
>                glExt:  a *OGLExtManager
>                extensions:     nil
>                frontFace:      2305
>                maxPortalDepth:         5
>                changeTexture:  true
>                test:   false
>                timeStamp:      0
>                formManager:    nil
>                textureManager:         an OGLTextureManager
>                fontManager:    an OGLFontManager
>                shaderManager:  an OGLShaderManager
>                glListRegistry:         a WeakIdentityKeyDictionary()
>                isMirror:       false
>                inPortal3D:     false
>                camera:         nil
>                forceWire:      false
>                numVtx:         0
>                numPrims:       0
>                inGLBlock:      false
>                distance:       nil
>                harness:        nil
>                eventPointer:   nil
>                avatar:         nil
>                forcePick:      false
>                forceHilite:    nil
>                suppressPortals:        false
>                noSwap:         false
>                fogOn:  false
>                transparency:   1.0
>                matrixStack:    nil
>                portalDepth:    0
>                bufferObjects:  a Dictionary()
>
> OGLWin32(OpenGL)>>beginFrame
>        Receiver: an OGLWin32
>        Arguments and temporary variables:
>
>        Receiver's instance variables:
>                handle:         0
>                bufRect:        0 at 0 corner: 400 at 400
>                glExt:  a *OGLExtManager
>                extensions:     nil
>                frontFace:      2305
>                maxPortalDepth:         5
>                changeTexture:  true
>                test:   false
>                timeStamp:      0
>                formManager:    nil
>                textureManager:         an OGLTextureManager
>                fontManager:    an OGLFontManager
>                shaderManager:  an OGLShaderManager
>                glListRegistry:         a WeakIdentityKeyDictionary()
>                isMirror:       false
>                inPortal3D:     false
>                camera:         nil
>                forceWire:      false
>                numVtx:         0
>                numPrims:       0
>                inGLBlock:      false
>                distance:       nil
>                harness:        nil
>                eventPointer:   nil
>                avatar:         nil
>                forcePick:      false
>                forceHilite:    nil
>                suppressPortals:        false
>                noSwap:         false
>                fogOn:  false
>                transparency:   1.0
>                matrixStack:    nil
>                portalDepth:    0
>                bufferObjects:  a Dictionary()
>
>
> --- The full stack ---
> OGLWin32(Object)>>error:
> OGLWin32(Object)>>externalCallFailed
> OGLWin32(OpenGL)>>glPixelStorei:with:
> OGLWin32(OpenGL)>>beginFrame
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> OGLWin32>>beginFrame
> [] in OpenGL class>>example
> BlockClosure>>ensure:
> OpenGL class>>example
> UndefinedObject>>DoIt
> Compiler>>evaluate:in:to:notifying:ifFail:logged:
> [] in SmalltalkEditor(TextEditor)>>evaluateSelection
> ...etc...
>


More information about the Squeak-dev mailing list