Opened 20 months ago

Last modified 11 months ago

#14357 new defect

TETRAEDGE: Syberia (1/2) crash on startup with OpenGL ES 2 contexts

Reported by: raziel- Owned by:
Priority: high Component: Engine: Tetraedge
Version: Keywords:
Cc: Game: Syberia 1

Description

ScummVM 2.8.0git (Mar 21 2023 20:26:48)
Using SDL backend with SDL 2.26.1
Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 Theora AAC A/52 FreeType2 FriBiDi JPEG PNG GIF cloud (servers, local) ENet SDL2 TinyGL OpenGL (with shaders)

I know the game is not completely supported yet, but a call for testing was published, so...
I get a crash when starting Syberia (1 and 2).
I'm on Big Endian PPC (which might play a role).

I know that the attached crashlogs and ScummVM log might not really provide any usable details.
Adding them nonetheless.

Window/screen will open black, it crashes pretty early,
probably even during (or trying to begin to) reading the data(?)

Additional to the log output i also get these lines in the shell i start from

WARNING: SearchSet::add: archive 'shaders.dat' already present!
WARNING: SearchSet::add: archive 'gui-icons.dat' already present!
WARNING: SearchSet::add: archive 'shaders.dat' already present!
WARNING: TODO: TeCore::create: Finish implementing me.!

Syberia (Macintosh) [GoG]
Syberia 2 (Macintosh) [GoG]

AmigaOS4 - PPC - BigEndian
gcc (adtools build 11.3.0) 11.3.0

Attachments (5)

Crashlog_ScummVM_2023-03-23_08-54-10.txt (43.9 KB ) - added by raziel- 20 months ago.
Crashlog_ScummVM_2023-03-23_08-43-17.txt (43.2 KB ) - added by raziel- 20 months ago.
ScummVM_Syberia.txt (13.4 KB ) - added by raziel- 20 months ago.
Crashlog_ScummVM_2023-04-21_08-38-21.txt (43.7 KB ) - added by raziel- 19 months ago.
TeRendererOpenGL-init-warning-debug-diff.txt (1.7 KB ) - added by dwatteau 19 months ago.
@raziel-: The idea is to (locally) trigger a warning line after each call inside TeRendererOpenGL::init(), so that we can deduce which line is having a problem without a debugger; see this diff as a reference

Download all attachments as: .zip

Change History (20)

by raziel-, 20 months ago

Attachment: ScummVM_Syberia.txt added

comment:1 by mduggan, 20 months ago

This is likely the same as #14354 which I fixed yesterday. Could you try with a newer nightly?

comment:2 by mduggan, 20 months ago

Actually, looking at the crash log more closely it looks more likely that it's calling an OpenGL setup function that's not supported by your system - possibly glBlendFuncSeparate which I think is only available in OpenGL2.1 and above. There is an alternative I was previously using that provides slightly worse blending results but wouldn't crash, so maybe I should check if it's available before calling.

comment:3 by raziel-, 20 months ago

Take your time.
I won't be able to test anything before April anyway.

Thanks a lot for taking a look

comment:4 by mduggan, 20 months ago

Summary: TETRAEDGE: Syberia (1/2) crash on start/reading data(?)TETRAEDGE: Syberia (1/2) crash on startup on PPC

comment:5 by raziel-, 20 months ago

@mduggan

That missing function *is* part of OpenGL ES though, isn't it?

If the engine uses OGLES2 than it should work, right?

comment:6 by raziel-, 19 months ago

ScummVM 2.8.0git (Apr 19 2023 09:27:43)
Using SDL backend with SDL 2.26.1
Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 MikMod Theora AAC A/52 FreeType2 FriBiDi JPEG PNG GIF cloud (servers, local) ENet SDL2 TinyGL OpenGL (with shaders)

User picked target 'syberia-mac' (engine ID 'tetraedge', game ID 'syberia')...

Looking for a plugin supporting this target... Tetraedge Engine

WARNING: SearchSet::add: archive 'shaders.dat' already present!
Running Syberia (Macintosh)
MacOS/Syberia: 6951fb8f71fe06f34684564625f73cd8, 10640592 bytes.
WARNING: TODO: TeCore::create: Finish implementing me.!
TeLuaContext::global: Request for nil global firstWarpPath
Application::loadOptions options.xml

Still crashing...

comment:7 by dwatteau, 19 months ago

Thanks for testing this! I'll try testing this on my PPC big-endian environments where I have more debugging tools and OpenGL versions at my disposal, but this may take me some weeks.

comment:8 by raziel-, 19 months ago

Take your time...too much games in my backlog anyway :-D

comment:9 by dwatteau, 19 months ago

So, it doesn't crash on my late PowerBook G4 (but it has rendering issues, see Trac #14452) but that one runs OpenGL 2.0 on Leopard or OpenGL 2.1 on Debian/OpenBSD (Mesa).

I also have an older iBook G4 only having OpenGL 1.3, but I didn't have the time to do a build or test there yet.

comment:10 by raziel-, 19 months ago

@dwatteau

Really appreciated

comment:11 by dwatteau, 19 months ago

@raziel-: Happy to help on this kind of stuff!

It doesn't crash on my big-endian iBook G4 PPC running OSX Tiger either, although it's limited to OpenGL 1.3 (but there are the same rendering issues there too; see Trac #14452 referenced above).

INFO: OpenGL Vendor: ATI Technologies Inc.
INFO: OpenGL Renderer: ATI Radeon 9200 OpenGL Engine
INFO: OpenGL Version: 1.3 ATI-1.4.18
INFO: OpenGL Red bits: 8
INFO: OpenGL Green bits: 8
INFO: OpenGL Blue bits: 8
INFO: OpenGL Alpha bits: 8
INFO: OpenGL Z buffer depth bits: 24
INFO: OpenGL Double Buffer: 1
INFO: OpenGL Stencil buffer bits: 8
INFO: GLSL version: 1.10
OpenGL: GL context initialized
OpenGL version: 1.3 ATI-1.4.18
OpenGL vendor: ATI Technologies Inc.
OpenGL renderer: ATI Radeon 9200 OpenGL Engine
OpenGL: version 1.3
OpenGL: GLSL version string: 1.10
OpenGL: GLSL version: 0
OpenGL: Max texture size: 2048
OpenGL: NPOT texture support: 0
OpenGL: Shader support: 0
OpenGL: Shader support for engines: 0
OpenGL: Multitexture support: 1
OpenGL: FBO support: 0
OpenGL: Multisample FBO support: 0
OpenGL: Multisample max number: -1
OpenGL: Packed pixels support: 1
OpenGL: Packed depth stencil support: 0
OpenGL: Unpack subimage support: 1
OpenGL: OpenGL ES depth 24 support: 0
OpenGL: Texture edge clamping support: 1
OpenGL: Texture border clamping support: 1
OpenGL: Texture mirror repeat support: 1
OpenGL: Texture max level support: 1

@raziel-: Since the AmigaOS4 debugger looks a bit limited, maybe you could try editing engines/tetraedge/te/te_renderer_opengl.cpp in your local build, inside the TeRendererOpenGL::init() function, by adding some warning("function 1"); (and so on) after every function call there, so that we can confirm whether the glBlendFuncSeparate() call is the one triggering the crash?

comment:12 by raziel-, 19 months ago

@dwatteau

I need to get back to you on this.
Still at work but with some spare time coming up this weekend.

I may need additional help on the warnings though...I'm so bad at coding...or rather not existent :-)

by dwatteau, 19 months ago

@raziel-: The idea is to (locally) trigger a warning line after each call inside TeRendererOpenGL::init(), so that we can deduce which line is having a problem without a debugger; see this diff as a reference

comment:13 by raziel-, 19 months ago

@dwatteau

Thank you so much for the help.

Here's the log (the function in the warning is always the funcion that comes up, so in this case the warning is printed before glShadeModel(GL_SMOOTH) is called)

User picked target 'syberia-mac' (engine ID 'tetraedge', game ID 'syberia')...

Looking for a plugin supporting this target... Tetraedge Engine

Running Syberia (Macintosh)
MacOS/Syberia: 6951fb8f71fe06f34684564625f73cd8, 10640592 bytes.
WARNING: TODO: TeCore::create: Finish implementing me.!
TeLuaContext::global: Request for nil global firstWarpPath
Application::loadOptions options.xml
WARNING: GL init: hitting initGraphics3d(width, height)!
WARNING: GL init: hitting glDisable(GL_CULL_FACE)!
WARNING: GL init: hitting TeLightOpenGL::disableAll()!
WARNING: GL init: hitting glDisable(GL_COLOR_MATERIAL)!
WARNING: GL init: hitting glEnable(GL_DEPTH_TEST)!
WARNING: GL init: hitting glDepthMask(GL_TRUE)!
WARNING: GL init: hitting glShadeModel(GL_SMOOTH)!

comment:14 by ccawley2011, 11 months ago

Keywords: BigEndian PPC removed
Priority: normalhigh
Summary: TETRAEDGE: Syberia (1/2) crash on startup on PPCTETRAEDGE: Syberia (1/2) crash on startup with OpenGL ES 2 contexts

glShadeModel is part of the fixed function API from OpenGL ES 1.x and desktop OpenGL, so it won’t work with OpenGL ES 2 (which only supports shaders). Until a shader renderer is written, you’ll have to make do with GL4ES or use a different implementation of OpenGL.

The Tetraedge engine is unlikely to work on mobile devices without this, so I’ve increased the priority of this issue.

comment:15 by raziel-, 11 months ago

@ccawley2011

Thank you very much for taking a look.

Unfortunately my platform is *very* limited when it comes to GL.

Only OpenGL1.3 and GL4ES (albeit with a limited implementation) is, as far as I know, supported.

ScummVM however uses it's own code to parse and use the supported GL version.
(Don't ask me how, @lephilousophe (/me waves) did most of the work) :-)

Note: See TracTickets for help on using tickets.