Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
57 user(s) are online (43 user(s) are browsing Forums)

Members: 2
Guests: 55

emeck, trixie, more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

I have now built the latest ScummVM. Launcher starts seemingly ok in OpenGL (MiniGL) mode. What should I do to get the crash?

EDIT: okay, apparently Grim Fandango related.

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Yes, that is something really strange, OpwenGL mode in launcher seems to be not affected, maybe because it isn't really used other than for resizing and displaying the screen/window.

Once you start *any* game which uses OpenGL though, will make you crash.

You can either try Grim Demo or Monkey 4 demo, both crash as well.

Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

Happy to report that I can reproduce the crash. I don't think it is caused by intuition.h hack. It looks like OpenGL calls executed without context, before the crash:

[OS4_GL_MakeCurrent] Called window=0x00000000 context=0x00000000
[OS4_GL_DeleteContext] Called with context=0x6319D300
[OS4_GL_DeleteContext] Found MiniGL context, clearing window binding
[OS4_GL_GetProcAddress] Called for 'glGetString'
[OS4_GL_GetProcAddress] Called for 'glGetIntegerv'

So context was deleted right before this crash on glGetInteger. Issue might be in SDL or ScummVM, need some more investigation.

EDIT: here is a quick "patch". I think issue is in ScummVM because SDL_GL_GetAttribute is supposed to get information about "the current context" ( https://wiki.libsdl.org/SDL_GL_GetAttribute ) which doesn't exist (== nullptr) here:

https://github.com/scummvm/scummvm/blo ... glsdl-graphics3d.cpp#L182

I changed line 177 to:

if (_window->getSDLWindow() && _glContext) {

and Grim Fandango demo starts. Could you discuss about this with ScummVM developers?


Edited by Capehill on 2020/11/22 10:40:23
Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

I'll open a feature request with this change in place, best way to get their attention

Thank you

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information

Go to top
Re: Redeclaration error
Not too shy to talk
Not too shy to talk


See User information
The crash looks like the one I got 1 or 2 weeks ago on glGetIntegerv. I didn't investigate as I thought it was due to a lack of 3D capabilities (when I wanted to buy Warp3DSI drivers).

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@corto

Were you already using the latest minigl from os4depot back then?
Because then it might as well be a bug in minigl...

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Do you see anything in the minigl code that have caused this behaviour?
Judging by the additions for 3.24?

Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

It's not a MiniGL issue. I have been thinking about adding some checks in the SDL code that would make SDL_GL_GetProcAddress fail and eventually SDL_GL_GetAttribute fail (SDL_GL_GetAttribute calls SDL_GL_GetProcAddress, then glGetInteger), but it wouldn't fix the ScummVM issue of calling SDL_GL_GetAttribute without GL context. It would probably only hide the ScummVM issue by not crashing.

Based on this https://wiki.libsdl.org/SDL_GL_GetProcAddress , for example on Linux/X11 it's possible to query functions pointers even without context. On Windows it seems not.

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Could you maybe comment on the bug item I added.
It doesn't seem to create much interest and having to always add your workaround is a pain

Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

I need to make a Linux build. Sadly ScummVM dev didn't give any advice on the actual fix.

There is a patch for SDL as well, I tested it and it seems to hide the ScummVM issue. So, it should be part of 2.0.14 - some day.



Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Hmm, do you have a link to the future SDK fix?
Not talking about a binary, but a sdl github FR or similar?

I could add that to the bug report and maybe someone will get back to me about a temporary workaround?



Talking about linux builds...

Would a linux build help with the shared objects crash or is that a sole AmigaOS implementation flaw?

Sorry, jumping topics here.

Still looking for a way to work around that dreaded crash


Thanjs a bunch

Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

The easiest workaround for AmigaOS is to check _glContext pointer before making SDL_GL_GetAttribute queries. I just tested ScummVM on Linux and there is no GL context either when starting Grim Fandango demo (_glContext == nullptr).

Quote:

Would a linux build help with the shared objects crash or is that a sole AmigaOS implementation flaw?


I don't think Linux build helps here.

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Well, if there is an easy way to do it with an ifdef I'm all ears

Go to top
Re: Redeclaration error
Not too shy to talk
Not too shy to talk


See User information
@Raziel
Quote:

@corto

Were you already using the latest minigl from os4depot back then?
Because then it might as well be a bug in minigl...


I tested with a fresh SDK, including the default SDL1 library and MiniGL.

I haven't tried any investigations since.

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@corto

so nothing that was introduced lately then...

strange that i never stumbled over this before

Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel @corto

SDL1 is quite different regarding GL context handling. If you have some similar crash I would like to see the full stack trace, thank you.


Go to top
Re: Redeclaration error
Just can't stay away
Just can't stay away


See User information
@Raziel

Quote:

Well, if there is an easy way to do it with an ifdef I'm all ears


Dude, you had the simplest possible patch/workaround/whatever in your pull request already :) So please keep that in your local repo until SDL 2.0.14.

Of course it would be possible to wrap code between some silly

#ifndef __amigaos4__
//call whatever functions without GL context
#endif

But what is the point of that kind of "patch"? What are the expectations of getting GL attributes of the *current context*, *without* the current context?

Go to top
Re: Redeclaration error
Home away from home
Home away from home


See User information
@Capehill

Thank you, will wait for 2.0.14

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project