Castle Editor closes on startup

After using it all day yesterday, tweaking the code and doing some experiments, I shut down the PC. Today when I try to compile and run the project the editor suddenly quits. The project itself compiles and starts correctly under Lazarus.
However, I have noticed this. If I compile or run the project without opening gamestatemain.castle-user-interface the project starts, if I open the graphical view the editor closes as soon as I try to compile.
I attach the log showing these steps: opening Editor, Open recent project, opening gamestatemain.castle-user-interface, Compile (and abrupt closing).

Sounds what I experienced too. When I compile with F9 from Lazarus and then go back to the CGE editor the editor closes. (crash?).

Thank you both – confirmed and fixed.


Well, workarounded – from all I found, it has to be a problem in LCL, specific to Windows, when it initializes WinAPI resource for the output list right before drawing it. So we had a critical problem on Windows → many thanks to you, it is now fixed.

It could occur in various situations, and was seemingly random – e.g. I did reproduce the crash after switching from Lazarus → CGE editor ( @Carring case) once, but doing exactly the same thing again, even after restarting system, worked OK… Hitting F9 right after opening the design (@valterb case) I was able to reproduce it always.

The fix covers all situations.

Committed to Fix editor crash that sometimes happened when using F9 in editor after · castle-engine/[email protected] · GitHub . I also just pushed a binary release update on , it is ready now. So just update CGE and the bug will be gone :slight_smile: