-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Violation When Renaming A Component #543
Comments
Thank for you for reporting! Quick investigation now shows the crash is somewhere deep inside GTK2 widgetset implementation in LCL. I wasn't able to pinpoint it better now. Lazarus debugger doesn't show anything useful (goes to assembler view), VS Code debugger shows that GTK2 routine When CGE editor is recompiled to use Qt5 widgetset on Linux, everything works OK. I've been wondering about switching CGE editor widgetset to Qt5 already, as we already had some crashes in GTK2 with ugly workarounds (but at least the previous ones had a workaround). The main downside of using Qt5 will be that users need to install I'll see how to deal with this:
|
This was getting increasingly annoying lately so I'm happy it's as simple as compiling with qt5. I was a bit wary at first because of #391, but it seems it's all good and fixed now. It also resolves my other problem from #426. Seems like a single dependency is not too high of a price for all these issues resolved, but it's good to have an alternative as well just in case. |
I'm talking with Jenkins now to provide automatic build of CGE editor with Qt5 widgetset in our official downloads on https://castle-engine.io/download . For start, we'll have The old issue #391 should no longer pose any problem, as my fix https://gitlab.com/freepascal.org/lazarus/lazarus/-/merge_requests/95 was merged to Lazarus and it's available since Lazarus 2.2.4 onward. @bbrtj Though I see your #546 -- I'll investigate it soon, thank you for testing qt5 version! |
FYI, I retested this issue with latest FPC + Lazarus from the GitLab |
I tried to reproduce this on Linux Mint 21.1 Cinnamon using fpc/lazarus fixes branch and master. But it looks like it works without any problems for me (maybe I'm lucky one but never had this error). Maybe it depends on the graphical environment? To be precise, I also have these warnings ( |
Notes about things done/tested around this:
|
Unfortunately today I had to disable building At this point I think Snap or Flatpak, as mentioned above, are the only hope to distribute binaries compiled with LCL Qt5 backend reasonably (so that users are not surprised with crashes). |
Sorry it took so long -- it's bad that I spent so much time wondering "can we maybe use LCL Qt5 widgetset" without delivering a fix/workaround for CGE editor + LCL GTK2 widgetset. I debugged the problem now, and actually found an identical (8-years-old) Lazarus issue: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/28840 . I send the details of my findings there and a trivial testcase (simple LCL application using I also found some workaround -- but it requires modifying LCL. I did it in our Docker images , see castle-engine/castle-engine-docker@c4ffe37 . It's far from perfect (everyone who compiles CGE will need to have such hacked LCL), but it's the best solution we have now, unless LCL developers will help. At least official builds on https://castle-engine.io/download will be good. I'll test everything once again when new Docker images are ready and new CGE builds done with them are tested. |
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/28840 has been fixed in Lazarus with big thanks to Juha Manninen. Our Docker images ( https://castle-engine.io/docker ) contain Lazarus with this patch applied, and thus our downloads ( https://castle-engine.io/download ) have editor with this bug fixed. For people who compile editor by themselves, the need to use such patched Lazarus with Linux/FreeBSD is mentioned on https://castle-engine.io/supported_compilers.php . So, done, tested, all good and closing! The fix will appear in the upcoming Lazarus releases, so with time the procedure to build our editor will be simpler, we will just tell sthg like you must use Lazarus >= 3.6. |
Lazarus 3.5 (which you can get from |
When renaming a component in the Hierarchy list, clicking away from the rename field will generate an Access Violation. The console output shows:
(castle-editor:13893): GLib-GObject-CRITICAL **: 00:09:17.444: ../glib/gobject/gsignal.c:1285: no emission of signal "button-release-event" to stop for instance '0x6b349b0'
System Details:
OS - Manjaro x64
Kernel - 6.4.6-3-rt8
Steps to reproduce:
Screenshots
Renaming A Component
Access Violation
The text was updated successfully, but these errors were encountered: