Opened 4 years ago

Closed 4 years ago

#11768 closed defect (fixed)

GRIM: Framebuffer is not complete! status: 36054!

Reported by: lmerckx Owned by: aquadran
Priority: high Component: Graphics
Version: Keywords:
Cc: Game: Grim Fandango

Description (last modified by lmerckx)

For GRIM engine, this error occurs with OpenGL and OpenGLES in fullscreen mode (tested on x64 and Raspberry PI2 and 3).

After some debugging, I came to the conclusion that OpenGLSdlGraphics3dManager::createOrUpdateScreen() is called before the initSize method.
So, variables _engineRequestedWidth and _engineRequestedHeight are still 0; which leads to the creation of a 0x0 frame buffer.
And causes the error and a black screen at startup.

A simple test like this at the beginning of createOrUpdateScreen() works but it is perhaps not the good solution:

if ((_engineRequestedWidth == 0) || (_engineRequestedHeight == 0))
  return;

Change History (7)

comment:1 by lmerckx, 4 years ago

Description: modified (diff)

comment:2 by joeraz, 4 years ago

I am also experiencing this issue, running on Windows 10. It has happened for me with both daily builds 2.3.0git9310-g3fc7fc285e and 2.3.0git9333-g0582662f64.

comment:3 by lmerckx, 4 years ago

To help understanding the problem, here is a "stack trace" of the call:

From engine.cpp::initGraphics3d(), a call g_system->setGraphicsMode(...) is done.
Here are the classes and methods called from there:

OSystem_SDL::setGraphicsMode() -> 
    SdlGraphics3dManager::setDefaultFeatureState() -> 
    OpenGLSdlGraphics3dManager::setFeatureState(kFeatureFullscreenMode) -> 
    OpenGLSdlGraphics3dManager::createOrUpdateScreen()

And so, createOrUpdateScreen() is called but initSize() has not been called yet, and _engineRequestedWidth/_engineRequestedHeight are not initialized !

comment:4 by lmerckx, 4 years ago

Still debugging ...

removing the lines

			if (sdlGraphicsManager)
				sdlGraphics3dManager->setDefaultFeatureState();

in backends/platform/sdl/sdl.cpp, around lines 795, also works.

It seems better because these lines have been added lately to the original ResidualVM code.
Are they really needed ? Because they call createOrUpdateScreen() as side-effect before the end of initialization ...

Last edited 4 years ago by lmerckx (previous) (diff)

comment:5 by aquadran, 4 years ago

Game: Grim Fandango
Priority: normalhigh

comment:7 by aquadran, 4 years ago

Owner: set to aquadran
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.