Bug 2169876 - It crashes when started
Summary: It crashes when started
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kicad
Version: 37
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Steven A. Falco
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-14 22:27 UTC by Tom Trebisky
Modified: 2023-04-10 16:01 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-04-10 16:01:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
eeschema.json (8.00 KB, text/plain)
2023-02-15 22:32 UTC, Steven A. Falco
no flags Details
pcbnew.json (13.38 KB, text/plain)
2023-02-15 22:33 UTC, Steven A. Falco
no flags Details

Description Tom Trebisky 2023-02-14 22:27:05 UTC
Description of problem:
KiCAD has been installed via dnf from fedora packages.  It will start and give the first screen, but when you select "schematic capture" it exits without any error message.  Same result if you select "PCB editor"


Version-Release number of selected component (if applicable):
6.0.11-3

How reproducible:
Always


Steps to Reproduce:
1. Install kicad using dnf
2. type "kicad" at command line
3. click on the "schematic capture" icon

Actual results:
Something useful


Expected results:
KiCAD exits/crashes


Additional info:
over a year ago I used KiCAD 5 with complete success.  I run Xfce (and always have)

Comment 1 Steven A. Falco 2023-02-14 22:49:23 UTC
I have 6.0.11-3 running here on Fedora 37.  Both schematic and PCB tools work.  I'm using KDE under X11 (not Wayland).

I'll need more information in order to help you.  First, I don't know if you are trying to open an old project or if you are starting a new one.  So, please try opening one of the demo projects.  I just tried the PIC Programmer demo, and that one worked fine.

Second, if you run KiCad from the command line under gdb, you should get a crash dump or backtrace, which will help diagnose the issue.

Comment 2 Tom Trebisky 2023-02-14 23:18:39 UTC
I have not done anything special, so I am almost certainly running Wayland rather than X11.

I first tried File -- New Project and it seemed to be happy starting a new project.  Then when I click on Schematic Capture it vanishes.
I tried again with a demo project.  Picked "microwave" for no particular reason.  That seemed to go OK, but again
  when I click on schematic capture, it vanishes.

I appreciate you trying to help.  I now type "gdb kicad" on the command line and again select the microwave demo project.
When I click on Schematic Capture it vanishes and I see this:

(gdb) run
Starting program: /usr/bin/kicad 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe3bff6c0 (LWP 675432)]
[New Thread 0x7fffe33fe6c0 (LWP 675433)]
[New Thread 0x7fffe2bfd6c0 (LWP 675434)]
[Thread 0x7fffe2bfd6c0 (LWP 675434) exited]
[New Thread 0x7fffe2bfd6c0 (LWP 675435)]
[New Thread 0x7fffe22dd6c0 (LWP 675436)]
[Thread 0x7fffe2bfd6c0 (LWP 675435) exited]
[New Thread 0x7fffe22dd6c0 (LWP 675437)]
[Thread 0x7fffe22dd6c0 (LWP 675436) exited]
[New Thread 0x7fffe2bfd6c0 (LWP 675438)]
[Thread 0x7fffe22dd6c0 (LWP 675437) exited]
[Thread 0x7fffe2bfd6c0 (LWP 675438) exited]
[New Thread 0x7fffe2bfd6c0 (LWP 675439)]
[New Thread 0x7fffe22dd6c0 (LWP 675440)]
[New Thread 0x7fffe18cb6c0 (LWP 675441)]
[New Thread 0x7fffe10ca6c0 (LWP 675442)]
[Thread 0x7fffe18cb6c0 (LWP 675441) exited]
[New Thread 0x7fffe18cb6c0 (LWP 675443)]
[Thread 0x7fffe10ca6c0 (LWP 675442) exited]
[New Thread 0x7fffe10ca6c0 (LWP 675444)]
[Thread 0x7fffe18cb6c0 (LWP 675443) exited]
[Thread 0x7fffe10ca6c0 (LWP 675444) exited]
[New Thread 0x7fffe10ca6c0 (LWP 675445)]
[New Thread 0x7fffe18cb6c0 (LWP 675446)]
[Thread 0x7fffe10ca6c0 (LWP 675445) exited]
[Thread 0x7fffe18cb6c0 (LWP 675446) exited]
[New Thread 0x7fffe18cb6c0 (LWP 675447)]
[New Thread 0x7fffe10ca6c0 (LWP 675448)]
[Thread 0x7fffe18cb6c0 (LWP 675447) exited]
[New Thread 0x7fffe18cb6c0 (LWP 675449)]
[Thread 0x7fffe10ca6c0 (LWP 675448) exited]
[New Thread 0x7fffe10ca6c0 (LWP 675450)]
[Thread 0x7fffe18cb6c0 (LWP 675449) exited]
[Thread 0x7fffe10ca6c0 (LWP 675450) exited]
[New Thread 0x7fffe10ca6c0 (LWP 675451)]
[New Thread 0x7fffe18cb6c0 (LWP 675452)]
[Thread 0x7fffe10ca6c0 (LWP 675451) exited]
[Thread 0x7fffe18cb6c0 (LWP 675452) exited]
[Thread 0x7fffe22dd6c0 (LWP 675440) exited]
[New Thread 0x7fffe22dd6c0 (LWP 675456)]
[New Thread 0x7fffe18cb6c0 (LWP 675457)]
[New Thread 0x7fffe10ca6c0 (LWP 675458)]
[Thread 0x7fffe18cb6c0 (LWP 675457) exited]
[Thread 0x7fffe10ca6c0 (LWP 675458) exited]
[New Thread 0x7fffe10ca6c0 (LWP 675459)]
[New Thread 0x7fffe18cb6c0 (LWP 675460)]
[New Thread 0x7fffcbfff6c0 (LWP 675461)]
[Thread 0x7fffe18cb6c0 (LWP 675460) exited]
[New Thread 0x7fffe18cb6c0 (LWP 675462)]
[Thread 0x7fffcbfff6c0 (LWP 675461) exited]
[New Thread 0x7fffcbfff6c0 (LWP 675463)]
[Thread 0x7fffe18cb6c0 (LWP 675462) exited]
[Thread 0x7fffcbfff6c0 (LWP 675463) exited]
[Thread 0x7fffe22dd6c0 (LWP 675456) exited]
[New Thread 0x7fffe22dd6c0 (LWP 675466)]
[Thread 0x7fffe22dd6c0 (LWP 675466) exited]
[Detaching after vfork from child process 675467]
[Detaching after vfork from child process 675469]
[Detaching after vfork from child process 675471]
[Detaching after vfork from child process 675473]
[Detaching after vfork from child process 675475]
[Detaching after vfork from child process 675477]
[Detaching after vfork from child process 675502]
[Detaching after vfork from child process 675521]
[Detaching after vfork from child process 675543]
[New Thread 0x7fffe22dd6c0 (LWP 675568)]
[Thread 0x7fffe22dd6c0 (LWP 675568) exited]
[Thread 0x7fffe10ca6c0 (LWP 675459) exited]
[Thread 0x7fffe2bfd6c0 (LWP 675439) exited]
[Thread 0x7fffe3bff6c0 (LWP 675432) exited]
[Thread 0x7ffff31d7ac0 (LWP 675428) exited]
[Thread 0x7fffe33fe6c0 (LWP 675433) exited]
[New process 675428]
[Inferior 1 (process 675428) exited with code 01]
(gdb)

Comment 3 Steven A. Falco 2023-02-15 16:49:13 UTC
I'll ask the KiCad lead devs to see if they have any thoughts on this.  But without more info, it will be tough to diagnose.

You might try running the individual tools directly from a shell prompt to see if any addition info is reported.  The schematic editor is "eeschema" and the pcb editor is "pcbnew".

A few other things to try:

1) Perhaps this is caused by your video driver, although I'm surprised there are no error messages.  KiCad has two rendering engines, called "accelerated graphics" and "fallback graphics".  To switch to "fallback graphics" is a bit tricky because if the gui won't open, you cannot use the normal preferences menus to switch.  But you can edit two files: ~/.config/kicad/6.0/eeschema.json and ~/.config/kicad/6.0/pcbnew.json to switch to fallback graphics.

In each file, search for "canvas_type".  A value of "1" means "accelerated graphics" and "2" means "fallback graphics".  Support for fallback graphics will be removed at some point, so switching this setting is not generally recommended, but it is worth a try to see if it helps you.

2) Try logging in under X11 rather than Wayland.  I think there are bugs with Wayland, although personally I am able to use either one in the virtual machines that I use for testing.

3) Since KiCad 7.0.0 has now been released, you might try it.  I cannot release 7.0.0 into Fedora 36/37 because it is a major version bump, but I do make it available via Copr, as described here: 

https://www.kicad.org/download/fedora/

4) Lastly, if all else fails, you could try the 7.0.0 flatpak:

https://www.kicad.org/download/flatpak/

Comment 4 Tom Trebisky 2023-02-15 19:21:52 UTC
I am happy to do all I can to provide additional info.  I do have to point out that it is unfortunate that KiCAD itself doesn't give any errors, but simply exits.

I am using an Nvidia GeForce GT 1030 card and am using the Nvidia driver, which reports itself as version 525.78.01.  I should point out that I have done so for several years and without the least bit of trouble up to now.

I also just learned (much to my surprise) that I am running X11 and not Wayland as per "loginctl" as follows:

loginctl
SESSION  UID USER SEAT  TTY
     10 1004 tom  seat0
loginctl show-session 10
Desktop=xfce
Type=x11

When I type either eeschema or pcbnew, they both just silently exit.  Whether I should invoke them with arguments or how to do so is unknown to me.

I look at the JSON file you suggest and find "canvas_type" already set to 2.  So I set it to 1.  No change after doing so.  And I set it back to 2 -- it still does not work.

I look at the JSON file for pcbnew and find "canvas_type" set to 1, so I set it to 2.  And voila - I get something now when I select PCB editor, in fact I am looking
at the PIC programmer PCB and it looks like what I might desire and expect.  In fact if I now type "pcbnew" on the command line it opens the PCB editor nicely.

So thanks for the help so far.  Maybe this additional information is helpful?  I am glad to do whatever I can to aid in troubleshooting this.  I'll go try KiCAD 7 as you suggest,
I had downloaded the source and started to explore building it, but I got stuck where it wanted more recent wxBase3 libraries than are in the Fedora 37 packages.
(it wants wxWidgets 3.2.1 and the fedora package version is 3.0.5).

Comment 5 Tom Trebisky 2023-02-15 19:24:38 UTC
I did not make clear in the above that it is eeschema that won't fire up no matter if canvas type is 1 or 2.

pcbnew now launches after I changed the canvas type from 1 to 2

Comment 6 Tom Trebisky 2023-02-15 21:21:58 UTC
And to be "thorough" I just did a dnf erase kicad, followed by cd ~/.config ; rm -rf kicad, then dnf install kicad.

Now nothing works.  Well I get the first screen with various choices but neither the schematic editor nor the pcb editor will
start.  Also, when I look at ~/.config/kicad there are no specific json files for eeschema or pcbnew, only a kicad.json, this
does have the canvas type (set to 2), setting it to 1 yields no improvement.

Comment 7 Tom Trebisky 2023-02-15 21:39:59 UTC
And I just did a "dnf erase kicad" then followed the instructions to install KiCAD 7 from "copr".

I get exactly the same results as with KiCAD 6 - I can get the first "main screen" but trying to launch eeschema or pcbnew both simply
exit with no message.

Comment 8 Steven A. Falco 2023-02-15 22:32:44 UTC
Created attachment 1944434 [details]
eeschema.json

Comment 9 Steven A. Falco 2023-02-15 22:33:18 UTC
Created attachment 1944435 [details]
pcbnew.json

Comment 10 Steven A. Falco 2023-02-15 22:57:47 UTC
I attached my json files from 6.0 - they may help you get back to a working version of 6.0 pcbnew, at least.  You will have to change the canvas_type to 2, because the attached files are configured for accelerated graphics.

I'm starting to think that it is something in the proprietary Nvidia driver.  I have an Nvidia 1060 but I am using the open source nouveau driver that comes with Fedora.  I had problems (unrelated to KiCad) with the proprietary driver, so I gave up on it.

Please go back to KiCad 6.0 and copy in the json files I attached.  Then try gdb again but type "bt" after the crash.  That should give a backtrace, which may have more info that will help the upstream developers diagnose the issue.

As to building 7.0 yourself, Fedora does have the necessary libraries, but you have to remove the wxGTK3-devel-3.0.5 package; otherwise cmake finds that one first, and won't use the wxGTK-devel-3.2.1 package.  Don't try to remove wxGTK3 itself, as too much else needs it. :-)

Comment 11 Tom Trebisky 2023-02-17 00:41:44 UTC
I am going to be busy with some other things for a while, so will need to put this on hold until next week.

I don't think the gdb backtrace will tell us anything.  The gdb log above just shows it starting a process (no doubt eeschema) and that process does an exit(1);
If we ran gdb on eeschema, that would just show a "normal exit" when it calls exit(1).  Running strace or some such might be more informative, but what I would
really like to do at this stage is build from source and focus on eeschema and see what logic there causes it to call exit with status 1 and give up.

I ran the nouveau driver when I first got my 1030 card and the performance was terrible (i.e. miserable, wretched, as well as bad -- and slow too).

Comment 12 Steven A. Falco 2023-02-17 14:57:36 UTC
No problem - whenever you are ready to resume.

Sorry you had so much trouble with nouveau.  I use hot-plugged SAS drives for backups, and when I tried the proprietary Nvidia driver the kernel threw an error and refused to mount them. Switching to nouveau fixed that for me.  At least we have choices...

Comment 13 Tom Trebisky 2023-04-10 15:29:43 UTC
Here I am back again, but with good news.

Several weeks ago I had uninstalled kicad with the intent of building from source and not wanting a variety of versions around leading to confusion.  I never got too far with that due to
library issues as discussed a bit above.  Last night I decided to just do:

dnf install kicad

once again and see what happens.  This installs kicad 1:7.0.1-2 and the wonderful thing is that it just works!!
So this is good on two counts.  One is that it works (always important) and secondly it is Kicad 7 rather than 6.

So my needs are now entirely satisfied.  No telling what the trouble was with KiCAD 6.  I will have to say that just silently exiting
without giving some kind of error message is less than wonderful (to put it mildly), but on with the show using Kicad 7.

Comment 14 Steven A. Falco 2023-04-10 16:01:08 UTC
Excellent news!  I'm glad you are able to run KiCad 7.


Note You need to log in before you can comment on or make changes to this bug.