|
Re: Redeclaration error |
Posted on: 2020/11/21 17:51
#21 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/21 19:17
#22 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@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. |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/22 9:36
#23 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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
|
|
|
Re: Redeclaration error |
Posted on: 2020/11/22 11:58
#24 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@Capehill
I'll open a feature request with this change in place, best way to get their attention Thank you |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/22 18:51
#25 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@Capehill
https://github.com/scummvm/scummvm/pull/2637 was rejected Bug item is here https://bugs.scummvm.org/ticket/11968 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/22 22:26
#26 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2007/3/30 18:39 Posts: 287
|
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).
|
|
|
Re: Redeclaration error |
Posted on: 2020/11/23 10:48
#27 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@corto
Were you already using the latest minigl from os4depot back then? Because then it might as well be a bug in minigl... |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/24 16:35
#28 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@Capehill
Do you see anything in the minigl code that have caused this behaviour? Judging by the additions for 3.24? |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/24 16:53
#29 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/24 17:28
#30 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@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 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/24 18:28
#31 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/24 18:33
#32 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@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 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/25 16:31
#33 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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:
I don't think Linux build helps here. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/25 16:38
#34 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@Capehill
Well, if there is an easy way to do it with an ifdef I'm all ears |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/26 7:49
#35 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2007/3/30 18:39 Posts: 287
|
@Raziel
Quote:
I tested with a fresh SDK, including the default SDL1 library and MiniGL. I haven't tried any investigations since. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/26 8:16
#36 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@corto
so nothing that was introduced lately then... strange that i never stumbled over this before |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Redeclaration error |
Posted on: 2020/11/26 17:54
#37 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@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. |
|
|
Re: Redeclaration error |
Posted on: 2020/11/26 17:59
#38 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1203
|
@Raziel
Quote:
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? |
|
|
Re: Redeclaration error |
Posted on: 2020/11/28 10:56
#39 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3946
|
@Capehill
Thank you, will wait for 2.0.14 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||