[SOLVED] Trouble viewing in Gerber Viewer

When I plot and open gerber files in Gerber Viewer, nothing is visible until I zoom out all the way. Then I see this:

I also the error saying, "Unexpected char 0x6b; Unexpected char 0x65 … " with about 50 similar items. I get these results with every file for a given plot set.

The Items lists are all fully populated. When opened in a text editor, the files looks as they should. File size is normal. When viewed in an online gerber viewer, the files look as they should.

Running with Windows on a ten-year-old Macbook in Bootcamp. Device has a discreet Nvidia graphics card that handles 3D modeling and rendering without a problem.

In Preferences \ Common \ Antialiasing, I have Accelerated graphics set to No antialiasing and Fallback graphics set to No antialiasing. In Preferences \ Gerber viewer \ Display options I have Rendering engine set to Fallback graphics. I’ve tried every combination of these settings.

Anyone have a suggestion? Appreciate the help.

Generally I would guess there is something wrong with the files (because you get file parsing error messages), not with your specific computer setup. But without the gerber files it’s only groping in the fog.

Please read this link for new members: New Member Information
If you follow the hints and instructions you could level-up yourself to a “basic forum member”. As such you are allowed to attach files in your thread.
The best option is to attach the complete project (project and gerber files), use “Archive project” from the kicad main manager. (maybe delete all backup from the resulting zip file).

Also the used kicad version is needed.

last note (not related to your specific problem): using special chars in filenames (in this case the “%”-character) will get you eventually in trouble - more sooner than later.

In your screenshot I see an X coordinate of over 7000. (Units are set to mm).


This is not possible in KiCad. KiCad works internally with 32 bit integers on a nanometer grid and that makes the ranges of coordinates from -2m to +2m. So something strange is happening here.

Just to be clear, Is this gerber file made with KiCad?

First, I recommend you to back up the whole KiCad project, including the gerber files. If it is a bug in KiCad, your project in this state has valuable information for debugging purposes.

How secretive is your project? If it is a bug, are you willing to upload / share this project with others?
Is it repeatable? If you create a new set of gerber files, are these also “damaged”?

Also, when bugs are suspected, always add your full version info. Copy it from: … / Help / About KiCad / Copy Version Info.

Success! The easy fix turned out to be the actual solution. I changed the file name, removing a “%” and spaces. All the gerber files open up normally now. Everything looks right, no “Unexpected char” errors. Pretty funny, pretty weird.

The coordinates of the board area are also in the normal range now. I believe the unusual coordinates in the screenshot were a result of how far out I had zoomed.

Thank you both for weighing in. Really appreciate your help.

But it ain’t over yet. If this is really just caused by the file name then this has the smell of a bug in KiCad. You can help with KiCad development by sharing more information about your project. The best you can do is to create a small test project (with for example two resistors connected together) that reproduces the bug, and then create a bug report for it on gitlab.

Reproduced the behavior in a small test project and shared on gitlab.

Thanks again for the help.


Congratulations with your (presumably) first bug report:

I also duplicated this behavior and added a post on gitlab to confirm this.

1 Like