Ok, that’s a good start: crash in OpenGL driver, so probably related to the code changes in OpenGL backend in Gideros. It would be nice to get a full stack trace though
@hgy29 Tried to recreate the issue making a new project but everything works as it should. I will try with bigger sprite sheets, animations and events and see what happens. In my game though the problem persists. In my previous game where I used sepperate images instead of spite sheets it loads fine with no problems.
I will try to trigger it with my own projects, meanwhile I think you already used QtCreator, can you try to make it crash under debugger on your side ?
I installed Qt and all and managed to build Gideros Studio
Now the question is: how do I run Gideros in Qt Creator to make the Player crash to have some logs?
I opened C:\dev\gideros_dev202406\ui\ui.pro in QtCreator but I don't think that's the one I should be opening Oh that worked!
... but I cannot start the Player, when I click "start local player" nothing happens. The other icons work fine (Color Picker, export, ...)
Now the question is: how do I run Gideros in Qt Creator to make the Player crash to have some logs?
You need to run player/player.pro. If your project needs some plugins, you may have to compile them from their respective .pro files (they are all in plugins folder, either directly under each plugin source subdirectory or inside source/Desktop). Then gather all dlls built for the plugins and put them in Plugins subdirectory of the newly built player
So there must be a plugin that crashes the player on me or as hgy29 said:
The kind of crashes you are getting looks like a crash on stop, usually caused by a delayed event or some objects that can't be deallocated. It is easy to figure out when run under a debugger, but obviously it has to happen.
some more feedback Gideros Player doesn't crash on my windows 10 I tried to make it crash but it was happy running every time.
The Gideros Player seems to crash on my windows 11 machine only.
PS: my win10 runs on a 10 years old laptop with an integrated graphics card!
PS2: I am so happy because when I last tried running Gideros on my laptop, I couldn't see a thing on the Gideros Player, the Player was only grey, no image at all, only sounds. Now with latest Gideros 2024.6 (built from GH) the Player is working as expected I can develop again when I am on the road
- offical Gideros: running my project Player crashes - GH Gideros build: running my project Player doesn't crash - a mix of offical Gideros Studio + Player GH build: running my project Player doesn't crash
I tried copying Gideros Player.exe from my GH build to windows Program Files but then the player crashes again.
So what works so far is running official Gideros Studio with my GH Gideros Player, I can run my project and the player doesn't crash at all
I consider my issue fix, sorry for all the inconveniences
PS: I already did a clean install of Gideros but crash still happening PS2: with Gideros there is always a way
@pie thanks for the info, unfortunatelly I cannot make it crash with such a simple code.
There is my sample on github which does certainly make the player crash on my windows 11 machine (I haven't tried it on my windows 10 laptop, I will do it asap and report back). Have you tried it on your machine?
pie, the issue is when developing the game, you code, you run it, you debug, you run it, the player crashes
It is in the development/debugging phase that the player constantly crashes. It is hard to pinpoint when this happens though (enter frame, bug in the code, player not releasing some refs, ...). Apparently it has something to do with OpenGL.
For example in my github code, if you run, stop, run, stop, ... the code in Gideros Studio, the player will crash (quite quickly on my side).
I did not do many edits in your code but running and stopping it several times it never crashed on my win 10. What I did notice though is that the texture memory increases at every level, as if you are not freeing resources:
function monitorMem()collectgarbage()local mam =math.floor(collectgarbage("count"))local texM = application:getTextureMemoryUsage()print("RAM: "..mam.." Kb. \nTexture RAM: "..texM.." Kb")end
put this function somewhere, and call it somewhere like here in your levelX
-- app keys handlerfunction LevelX:myKeysPressed()
self:addEventListener(Event.KEY_DOWN, function(e)if e.keyCode == KeyCode.ESC then scenemanager:changeScene("menu", 1, transitions[2], easings[2])endif e.keyCode == KeyCode.P then ispaused =not ispaused end-- modifierlocal modifier = application:getKeyboardModifiers()local alt =(modifier & KeyCode.MODIFIER_ALT)>0-- validateif(not alt and e.keyCode == KeyCode.ENTER)then-- print memory!
monitorMem()elseif alt and e.keyCode == KeyCode.ENTER then-- switch full screen
ismyappfullscreen =not ismyappfullscreen
application:setFullScreen(ismyappfullscreen)endend)end
Yes I noticed it too and I am wondering if this code is still (was ever) valid?
EDIT: isn't magical Gideros supposed to free those unused textures for me?
collectgarbage()
As far as I can tell it is still valid, but it might not work if there are still objects referenced, I believe that the same happens for the "collect" variant.
I think that gideros might not free your stuff because you are reloading LevelX directly, therefore the same scene stays in place and only some variable change. If I recall correctly the last time I used scenemanager I had to put a transition scene between levels to let gideros collect stuff: you can even listen to Event.REMOVED_FROM_STAGE to clean up everything by hand, call collectgarbage, remove listeners etc. A transition scene between levels giving scores or with a piece of storyline is a classic element though,
Comments
Likes: MoKaLux, pie
Now the question is: how do I run Gideros in Qt Creator to make the Player crash to have some logs?
I opened C:\dev\gideros_dev202406\ui\ui.pro in QtCreator but I don't think that's the one I should be openingOh that worked!... but I cannot start the Player, when I click "start local player" nothing happens. The other icons work fine (Color Picker, export, ...)
I will try to build Gideros Debug from Qt.
Likes: MoKaLux
I need to link Scintilla and Lexilla somewhere
I will try building the Player.pro and report back God's willing!
I tested with an almost empty project and the Player doesn't crash at all.
I will try to make it crash and get some logs?
Without any plugins this doesn't crash:
not so usefull log from the crash in release mode:
I tried really hard to make it crash under debug but it wouldn't crash
PS: added plugins: json, bump
PS2: I tested it with my project beat'em up https://github.com/mokalux/beu_cbump_tecs
PS3: will try to make it crash in debug
hope this could somehow shed some light on the problem?
I post the log for debug mode but no crash:
Gideros Player doesn't crash on my windows 10 I tried to make it crash but it was happy running every time.
The Gideros Player seems to crash on my windows 11 machine only.
PS: my win10 runs on a 10 years old laptop with an integrated graphics card!
PS2: I am so happy because when I last tried running Gideros on my laptop, I couldn't see a thing on the Gideros Player, the Player was only grey, no image at all, only sounds. Now with latest Gideros 2024.6 (built from GH) the Player is working as expected I can develop again when I am on the road
good news Gideros Player doesn't seem to crash no moreI didn't do anything special except messing with building Gideros stuff, but now I am using official release and so far so good.
So you can consider this issue closed, sorry for the inconveniencesPS: windows 11
PS2: back to using my favorite framework/engine , all my gratitude to the devs
EDIT: nope it now crashes
- offical Gideros: running my project Player crashes
- GH Gideros build: running my project Player doesn't crash
- a mix of offical Gideros Studio + Player GH build: running my project Player doesn't crash
I tried copying Gideros Player.exe from my GH build to windows Program Files but then the player crashes again.
So what works so far is running official Gideros Studio with my GH Gideros Player, I can run my project and the player doesn't crash at all
I consider my issue fix, sorry for all the inconveniences
PS: I already did a clean install of Gideros but crash still happening
PS2: with Gideros there is always a way
My GH player sometimes crashes when I fiddle with my code for a certain period of time (~5 mins), then run the project => crash
Maybe some things are accumulating (not freed) then the player crashes?
PS: I can live with that
PS2: it also sometimes crashes on pressing Stop in Gideros Studio
I think I nailed it: my Players crash everytime there is a bug in my code!!!
Example:
Hope this can help
ie.
Likes: MoKaLux
There is my sample on github which does certainly make the player crash on my windows 11 machine (I haven't tried it on my windows 10 laptop, I will do it asap and report back). Have you tried it on your machine?
https://github.com/mokalux/beu_cbump_tecs
Thank you mister pie
It is in the development/debugging phase that the player constantly crashes. It is hard to pinpoint when this happens though (enter frame, bug in the code, player not releasing some refs, ...). Apparently it has something to do with OpenGL.
For example in my github code, if you run, stop, run, stop, ... the code in Gideros Studio, the player will crash (quite quickly on my side).
What I did notice though is that the texture memory increases at every level, as if you are not freeing resources:
Likes: MoKaLux
You may have found something pie, thank you for the feedback, really appreciated
EDIT: isn't magical Gideros supposed to free those unused textures for me?
EDIT: the crash may happen when an external file is changed too? my two cents
EDIT2: to answer you @pie , I have a Tiled map in a folder, when I edit that file then run the player => crash
No, this is not the issue, I am sorry I cannot help further
Likes: MoKaLux
I think that gideros might not free your stuff because you are reloading LevelX directly, therefore the same scene stays in place and only some variable change.
If I recall correctly the last time I used scenemanager I had to put a transition scene between levels to let gideros collect stuff: you can even listen to Event.REMOVED_FROM_STAGE to clean up everything by hand, call collectgarbage, remove listeners etc.
A transition scene between levels giving scores or with a piece of storyline is a classic element though,
I use that reload one scene stuff in most (if not all) of my apps, and it is working for me pretty good (I only need to update this one file).
Now I need to find that thread where they talked about this scenemanager trick and implement it in my workflow.
Thank you for pointing that out, much appreciated
EDIT: I found the thread I was talking about https://forum.giderosmobile.com/discussion/3468/debug-menu-module-source-code-released
EDIT2: for info, how they manage scenemanager , this is their main.lua file:
I ran that code over and over again (play/stop/play...) and the official Gideros Player didn't crash at all
I will try to implement their method in my workflow and report back on Gideros Player crashing no more?
My issue seems to be related to how I handled scenemanager. Applying BiorhythmGames way, I managed to cut the crashes almost entirely
Thank you very much mister pie for pointing me in the right direction, you are a star
How I implemented it (main.lua):
PS: bonus for your transitions and easings https://mokalux.itch.io/gideros-all-scene-transitions
PS2: I haven't checked the ram for possible textures leak yet!
Likes: pie