V7.0 Overflowing Opening PCB

We recently updated to v7.0.0

Application: KiCad PCB Editor x86_64 on x86_64

Version: 7.0.0, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.0
	libcurl/7.87.0 OpenSSL/1.1.1t zlib/1.2.13 c-ares/1.18.1 nghttp2/1.51.0

Platform: Gentoo Linux, 64 bit, Little endian, wxGTK, KDE, x11

Build Info:
	Date: Feb 21 2023 13:36:55
	wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.81.0
	OCC: 7.7.0
	Curl: 7.87.0
	ngspice: 36
	Compiler: GCC 11.3.1 with C++ ABI 1016

Build settings:
	KICAD_USE_EGL=ON
	KICAD_SPICE=ON

We have a particular project that is throwing an overflow error when trying to view the PCB file, other projects seem to handle this as expected (we can view the PCB file).

This project was previously looked at using v6.0 with no issues. The errors shown are:

Memory Exhausted loading PCB '<filename>'
10:32:27: Overflow converting value 2592216027.191822 to i.
10:32:27: Overflow converting value -2592216027.191822 to i.

This is also reflected in constant ramp usage of RAM whilst trying to load the PCB file:

We have tried:

  • Ensuring there are no plugins loaded
  • Removed references to 3D models (search-replace on kicad_pcb file)
  • Removed large polygon pours (search-replace on kicad_pcb file)

Nothing seems to work, and I cant find a reference to 2592216027.191822 or -2592216027.191822 in the kicad_pcb file…
Has anyone encountered this before?

1 Like

Sometimes all it takes is to ask the question… :man_facepalming:

I continued removing items from the kicad_pcb file and ended up finding more (two in total) instances of zone items, each had a blank net_name…

(zone (net 0) (net_name "") (layer "F.Cu") (tstamp ...) (hatch edge 0.508)
    (connect_pads thru_hole_only (clearance 0.09144))
    (min_thickness 0.254) (filled_areas_thickness no)
    (fill yes (thermal_gap 0.508) (thermal_bridge_width 0.508))
    (polygon
      (pts
        (xy ...)
        ...
        (xy ...)
      )
    )
  )

I removed these, and reinstated previously deleted zone (ensuring all had a net_name) - and the PCB loads as expected…
This board was imported using altium2kicad tool, sometime at around KiCAD v5…
Perhaps these zones were in there from the conversion and KiCAD v6 didnt care…

2 Likes

This is worth raising as an issue.
KiCad is not supposed to crash
You can set the issue as confidential, so that only the developers can see it.

2 Likes

this is a nice find and investigation, thanks for the warning!

I’m currently working on a big board imported with altium2kicad and this could be the reason of
random crashes/grapical issue/slowing down/…

What is the time frame for that memory leak?
Are you interested in making a test case for this and creating an gitlab issue?

If you do not want to do this, then I can try to reproduce it and create the issue, but I don’t know how difficult it is to reproduce from the info you have given.

There are several options for making a test case. You can make the issue confidential as davidrsb mentioned. You can just upload the project as is if it’s not confidential, or you can remove all the proprietary stuff from the project and then upload it. This last is preferred, as smaller projects are easier to diagnose, and KiCad developers and their (free) time are a precious resources.

1 Like

What is the time frame for that memory leak?

I havent timed it, but I would say about a minute or so… During this time, pcbnew just hangs on

image

Are you interested in making a test case for this and creating an gitlab issue?

2 Likes

It was reported at 11:04u and a “fix committed” at 11:41u so it took 37 minutes to fix. Yet another example of the excellent work from the KiCad developers.

To get this version on your PC, you have to wait until V7.0.1 is released (Updates in the third digit are bug fixes, and upgrades should always be safe). Bug fix releases for KiCad have been made approximately once a month in 2022, and I expect this to continue at a similar rate.

2 Likes

excellent work from the KiCad developers

Yeah very grateful for their work…

I was slightly confused with the actual fix - as it seemed to be handled correctly on v5.0 and v6.0… But I dont have my head around the code, but Im glad I could help with bug reports…

For me, those zone definitions were unknown entries into the PCB file (probably from external import tooling), and removing made zero impact to my project.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.