codelite icon indicating copy to clipboard operation
codelite copied to clipboard

[Bug]: Codelite crashing when opening

Open rvalainz opened this issue 11 months ago • 17 comments

What happened?

Using F41, after updates "sudo dnf update" codelite opens up and crashes which freezes my laptop. It takes few minutes to Force quit it and after that my keyboard stops working. Tried to read logs from journalctl, but couldn't find anything interesting there. I'm a beginner on Linux and Fedora is my first distro so I don't really know how to troubleshoot something like this yet. It was working fine few days before.

Codelite was installed using RPM following Codelite guide: https://docs.codelite.org/downloads/download/#codelite-rpms

Version

17.0.0

Operating system

Linux

Steps to reproduce

No response

Relevant log output

No response

rvalainz avatar Jan 09 '25 13:01 rvalainz

Maybe systemd has recorded the codedump for you...

Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

UffeJakobsen avatar Jan 09 '25 13:01 UffeJakobsen

which CodeLite version?

Can you launch codelite from a terminal and under a debugger?

eranif avatar Jan 09 '25 16:01 eranif

Maybe systemd has recorded the codedump for you...

Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

Showing that no Core Dumps were found when using "coredumpctl list codelite" but the coredumpctl list shows Codelite workspaces being present.

rvalainz avatar Jan 09 '25 18:01 rvalainz

which CodeLite version?

Can you launch codelite from a terminal and under a debugger?

17.0-1 which I downloaded from here https://repos.codelite.org/rpms-17.0/fedora/41/.

I'm running codelite from terminal, but don't know how to run it from a debugger. Although i'm not getting any error logs on Gnome log app which are related to Codelite.

rvalainz avatar Jan 09 '25 18:01 rvalainz

Maybe systemd has recorded the codedump for you... Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

Showing that no Core Dumps were found when using "coredumpctl list codelite" but the coredumpctl list shows Codelite workspaces being present.

I'm not really sure what you mean by "Codelite workspaces being present" - can you provide parts of output from coredumpctl listas an example ?

UffeJakobsen avatar Jan 09 '25 18:01 UffeJakobsen

Maybe systemd has recorded the codedump for you... Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

Showing that no Core Dumps were found when using "coredumpctl list codelite" but the coredumpctl list shows Codelite workspaces being present.

I'm not really sure what you mean by "Codelite workspaces being present" - can you provide parts of output from coredumpctl listas an example ?

"Sun 2024-12-29 09:48:59 EET 12224 1000 1000 SIGABRT present /home/rainersv/cpp-workspaces/eka-cpp-md/build-Debug/bin/eka-cpp-md-3 35.2K Sun 2024-12-29 09:49:19 EET 12301 1000 1000 SIGABRT present /home/rainersv/cpp-workspaces/eka-cpp-md/build-Debug/bin/eka-cpp-md-3 35.2K Sun 2024-12-29 09:51:33 EET 12667 1000 1000 SIGABRT present /home/rainersv/cpp-workspaces/eka-cpp-md/build-Debug/bin/eka-cpp-md-3 35.2K" These are workspaces created in codelite, but I don't know if they are related to codelite crashing. Also I don't get any errors in "Problem Reporting" app.

rvalainz avatar Jan 09 '25 18:01 rvalainz

Maybe systemd has recorded the codedump for you... Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

Showing that no Core Dumps were found when using "coredumpctl list codelite" but the coredumpctl list shows Codelite workspaces being present.

I'm not really sure what you mean by "Codelite workspaces being present" - can you provide parts of output from coredumpctl listas an example ?

These are workspaces created in codelite, but I don't know if they are related to codelite crashing. Also I don't get any errors in "Problem Reporting" app.

Ah now I got it - these are crash reports of your own programs (projects) - they are not in any way related to the Codelite crashes

UffeJakobsen avatar Jan 09 '25 18:01 UffeJakobsen

Maybe systemd has recorded the codedump for you... Try the following commands: coredumpctl list coredumpctl list codelite coredumpctl info codelite

Showing that no Core Dumps were found when using "coredumpctl list codelite" but the coredumpctl list shows Codelite workspaces being present.

I'm not really sure what you mean by "Codelite workspaces being present" - can you provide parts of output from coredumpctl listas an example ?

These are workspaces created in codelite, but I don't know if they are related to codelite crashing. Also I don't get any errors in "Problem Reporting" app.

Ah now I got it - these are crash reports of your own programs (projects) - they are not in any way related to the Codelite crashes

Do you know how to open codelite under debugger as @eranif mentioned?

rvalainz avatar Jan 09 '25 18:01 rvalainz

Okay, so, I managed to open codelite fron CLI with "codelite -w="random"" and everything seems fine until I try to open any of my workspaces. Then it stops responding and keyboard doesn't work. When my focus window is anything else and not Codelite then it comes back to working and I noticed a message in Gnome Logs seen in picture. Screenshot From 2025-01-09 20-42-12

rvalainz avatar Jan 09 '25 18:01 rvalainz

Try this command from your terminal:

gdb -f -ex "run" -ex "thr apply all bt" -ex "inf thr" -ex "bt" -ex "quit" --args codelite

When CodeLite crashes thread overview and all thread stacks are dumped in your terminal

UffeJakobsen avatar Jan 10 '25 13:01 UffeJakobsen

Try this command from your terminal:

gdb -f -ex "run" -ex "thr apply all bt" -ex "inf thr" -ex "bt" -ex "quit" --args codelite

When CodeLite crashes thread overview and all thread stacks are dumped in your terminal

Ran the code, opened codelite. When I open codelite, it tries to open a workspace straight away, could there be problem with my workspace? image

rvalainz avatar Jan 10 '25 18:01 rvalainz

Try this command from your terminal:

gdb -f -ex "run" -ex "thr apply all bt" -ex "inf thr" -ex "bt" -ex "quit" --args codelite

When CodeLite crashes thread overview and all thread stacks are dumped in your terminal

Ran the code, opened codelite. When I open codelite, it tries to open a workspace straight away, could there be problem with my workspace?

I guess that option "Load last session at startup" is enabled ?

Menu path "Settings" / "Preferences" / "Misc" / "Load last session at startup"

Not sure how you can change this option if CL crashes immediately... But you could edit file ~/.codelite/config/codelite.conf - look for option RestoreLastSession

UffeJakobsen avatar Jan 10 '25 18:01 UffeJakobsen

Try this command from your terminal:

gdb -f -ex "run" -ex "thr apply all bt" -ex "inf thr" -ex "bt" -ex "quit" --args codelite

When CodeLite crashes thread overview and all thread stacks are dumped in your terminal

Ran the code, opened codelite. When I open codelite, it tries to open a workspace straight away, could there be problem with my workspace?

I guess that option "Load last session at startup" is enabled ?

Menu path "Settings" / "Preferences" / "Misc" / "Load last session at startup"

Not sure how you can change this option if CL crashes immediately... But you could edit file ~/.codelite/config/codelite.conf - look for option RestoreLastSession

Okay. When I run "codelite -g="gnu" it opens Codelite where I can choose what debugger to use and it doesn't crash. I turned off "Load last session at startup" and now it works fine when I close and open codelite. I can open workspaces from the big button at the startup. But when I try to open workspace from "Recently opened workspaces" then it crashes. Why such a behaviour?

rvalainz avatar Jan 10 '25 18:01 rvalainz

On Linux, after a CodeLite crash, CodeLite usually writes this file before it vanishes: ~/.codelite/crash.log If this file exists, please post its content here

If this file does not exist, run CodeLite under debugger and see why it crashes.

To start CodeLite under debugger:

gdb /path/to/codelite

Once the prompt is back, type:

run

Try and make CodeLite crash again, once it does, the debugger should capture it. Type inside gdb's prompt:

thread apply all bt

Post it here.

eranif avatar Jan 10 '25 18:01 eranif

I run it under debugger and can't recreate the problem anymore, it works fine as nothing ever happened.. I can open workspaces from both - big gray button and "Recently opened workspaces". Strange..

rvalainz avatar Jan 10 '25 19:01 rvalainz

Do you have the ~/.codelite/crash.log file from previous runs?

eranif avatar Jan 10 '25 20:01 eranif

If you don't the crash.log file. another option is to run CodeLite normally as you did before and let it get the situation where "codelite is not responding" when you have this message, attach a debugger to it:

gdb -p $(pidof codelite)

once gdb is attached, run the same command as before:

thread apply all bt

eranif avatar Jan 10 '25 20:01 eranif