SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

Mantis - Croquet
Viewing Issue Advanced Details
6338 Hedgehog major always 03-10-07 18:00 12-30-08 01:46
0006338: OpenGL GL_ARB_transpose_matrix / glLoadTransposeMatrixf: / glMultTransposeMatrixf:
Some graphics drivers do not support the ARB utilities we use.
1. Bert Freudenberg has proposed the following primitive call change ("[FIX] glLoadTransposeMatrixf" 5/3/06 [^]

!OGLExtManager class methodsFor: 'GL_ARB_transpose_matrix' stamp: 'bf 5/3/2006 11:28'!
glLoadTransposeMatrixf: m

    "This method was automatically generated."
    "void glLoadTransposeMatrixf(GLfloat* m);"
    <apicall: void 'glLoadTransposeMatrixfARB' (float*) > " was 'glLoadTransposeMatrixf'"
    ^self externalCallFailed
" ^self ogl glLoadMatrixf: m transposed."
! !

!OGLExtManager class methodsFor: 'GL_ARB_transpose_matrix' stamp: 'bf 5/3/2006 11:28'!
glMultTransposeMatrixf: m

    "This method was automatically generated."
    "void glMultTransposeMatrixf(GLfloat* m);"
    <apicall: void 'glMultTransposeMatrixfARB' (float*) > "was 'glMultTransposeMatrixf'"
    ^self externalCallFailed
" ^self ogl glMultMatrixf: m transposed."! !

2. It would be nice if this efficiently fell through on failure to the commented out code at the end of each. One proposal for doing so (Bert and Enrico Spinielli) is to catch the library load failure (once) and respond by generating the replacement method. ("GL_ARB_transpose_matrix extension and VM crashes on Hedgehog" July, 06, [^] [It wasn't clear to me whether the proposal would work right if you run Croquet on a strong machine using an image that was saved on weak machine during a session in which Croquet had been run.]

3. There seems to be dynamic/intermittent problems on some machines (always Dell? always laptops?) that are capable of loading the 1.3 extensions, but don't always do so. Success seems to be related to memory usage. This appears to be fixed (for me, anyway) by CroquetVM-Win32-1.0.5.

FYI, the hack workaround is to redefine the methods to use only the commented out code at the end of each.
related to 0003988new  VM crash on OGLTextureManager>uploadTexture:dirtyRect: 
related to 0004006resolved andreas OpenGL>>extensions 

Ross Boylan   
12-28-08 05:34   
Using the above fix, when I try to launch a FreeCAD (Cobalt) Master, things don't work. In OpenGL>>extensions the line
extensions := (self glGetString: GLExtensions) fromCString
produces a failure while trying to evaluate fromCString, I presume
because it is being addressed to invalid external memory.

I suspected some initialization might be necessary to get the addresses
of the new methods (glLoadTransposeMatrixfARB), so I tried
OGLExtManager initialize before trying to open the world, but this failed as before.

Both the symbols glLoadTransposeMatrixf and glLoadTransposeMatrixfARB
seem to be in (using emacs; nm says there are no symbols).

I'm running on Linux, Pentium 4 with the nvidia proprietary driver. My
image started as cobalt20081125, with the change noted above and fileins
for FreeCAD.

I initially succeeded in getting things to work (sort of) without the
glLoad... changes, but ran into trouble (failure to find glLoadTransposeMatrixf) when I attempted to restart an
image that had the FreeCAD master world opened.
Ross Boylan   
12-30-08 01:46   
I get the same error in an image in which I have not attempted to manually edit the glLoadTransposeMatrix methods.

I think (self glGetString: GLExtensions) is returning a null pointer; the ExternalData has a handle of @ 16r00000000.

I'm no longer convinced that my problem, and possibly that of the bug reporter, has much to do with glLoadTransposeMatrixf in particular. The initial doesNotUnderstand: appears to be by design, as the code attempts to create instance side methods out of class side ones (!). As noted in my previous entry, my seems to have the necessary functions. Maybe this is just the first external gl method that is invoked, and it reveals some general problem getting the library hooked up.