Extraneous traces on 3d view & gerber, but not on pcbnew

The only thing I changed from the default setting when I created the copper text was the size of the text…I put in 0.04, which resulted in a message that implied that it was too small, but would be corrected, if I remember correctly.

I put text on copper because when I make boards myself, I don’t have silk screen capabilities, and I like the information to be part of all boards.

Try 4.5 mm unit format when creating gerbers.

Hm that’s odd. It seems the exporter for the 4.5 format does not have the same overflow behavior. (It removes the part of the textfield that would generate an integer overflow.)

I just tried the same schematic to generate a pcb with NO extra stuff like text on copper, and it did the same thing again, with those vertical lines on the 3-d and gerbers.

AAMOF, I tried for the first time, freeroute, and that generated the Reset with the negative value (I think they were negative), and when I removed the 3-line statement, the issue was fixed, just like before.

So, it appears that there’s more of a problem with the math, and it’s not related to entering incorrect values in the properties…

I have download the pcb file. Definitely it is not the 4.5 or 4.6 format.

Is there again something in there with either a large negative value or a large positive value?
(you need to look with a texteditor because pcb new will not show this things.)
Just search for: 2147 in your file if something is found this would be suspicious.

It was a large negative value…

I’m not really sure what you mean with that.

I thought it could have been a problem with the format, for any reason unknown to me.
I suggested to try it. But now I tried myself and I realized I was wrong. That’s all.

I have also deleted some lines and some texts, but the lines are still there. I don’t know what can cause those lines.

We found out that there is a text field on b.cu at a very odd position.
(y coordinate = -2147.483648)
The problem seems to be that this gets internally converted to a 32 bit signed integer with value -2147483648 = 0x80000000 which is the smallest value re-presentable in this number format.
The problem happens when the gerber exporter tries to create the upper half of the text field. (the one pointed more in y minus direction)
Because this numbers can not be represented in the 32 bit integer used, the text wraps around and continues at the maximum positive value representable.
(which results in 4 meter long lines in the gerber.)

after your last input i tested the export of a 4.5 gerber. This gerber seems to remove the half of the text that creates the overflow. The text is still there at this ludicrous y position.

The main question now is: Where does this value come from?
I doubt that it was done by the user himself. (It is exactly the minimum re-presentable value.)
So i fear some tool moved the text to this position. The question is what tool is responsible.

And of course: Can we find a way to reproduce this reliably such that we can give the developers a good bug report?

(There are two bugs here. One bug is the integer overflow, the other is the tool that moved the text.)

1 Like

I have found that the toxic kicad_pcb file triggers bad 3d and Gerber files in both Windows and Ubuntu 4.0.5

How an illegal value was created in the first place is the problem. It looks like KiCad needs to put a bounds check in of +/-2m
The starting point for me is that the text is rotated by an unusual value
The file describes the text with two points, there doesn’t seem to be any direct declaration of size, angle etc:

(gr_text Reset (at 117.602 93.218 330) (layer B.Cu)
(effects (font (size 1.016 1.016) (thickness 0.254)) (justify mirror))

and
(gr_text Reset (at 129.54 -2147.483648 180) (layer B.Cu)
(effects (font (size 1.016 1.016) (thickness 0.254)) (justify mirror))

1 Like

After experimenting with a test text, I see that these are actually two different text objects. The first is the visible one at 330 degrees rotation.
The second is vertical, far off screen and I have been unable to generate it so far

1 Like