After gsch2pcb, pcb fails to open the new pcb file

Bug #1771726 reported by Dr M on 2018-05-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Undecided
Unassigned
geda (Ubuntu)
Undecided
Unassigned

Bug Description

New design, run gsch2pcb on the gschem file and produces a pcb file. pcb fails to open the file, or rather it closes immediately without displaying anything

Dr M (drmcn) wrote :

Another test, created a new pcb file and manually copied the elements loaded into the .new.pcb file by gsch2pcb, and again the pcb program fails to open the pcb. The elements are all standard elements from the geda tree.

Dr M (drmcn) wrote :

Running it from the command line, here is the error message:

LoadPCB: Failed to load existing file "TDAQ_LT1226CurrentAmpBoard.pcb". Is it supported PCB file?

Note that before copying the element files into it, pcb opened the file without problems.

Dr M (drmcn) wrote :

Found the source of the problem. There are three bugs that come together to produce this behavior

1) The footprint files "DIODE_LAY 300.fp", and other in different sizes, have a space in the file name.

2) The space in the file name breaks gsch2pcb, resulting in corrupted elements in the pcb file.

3) The pcb file, on encountering the corrupt elements, outputs no error message, except to say it cant load the file.

Chad Parker (parker-charles) wrote :

Thanks Mitch.

Point 1 is sort of iffy. In general, it would be nice to support spaces in filenames. Whether we like it or not, the computing world is moving in a direction where it is expected that you can do this.

Point 2 is the real problem here, that gsch2pcb doesn't produce the correct output as a result of there being a space in the footprint filename. The bug is in the gsch2pcb.scm gnetlist backend... written in scheme... Maybe I can get one of the gschem/gnetlist developers to fix this.

Point 3 is a bug in pcb, that pcb provides no explanation as to why it failed to load the file. Unfortunately, this may be a difficult bug to fix as our parser is not easy to work with. I'll have to dig into this at some point, but it's going to take a fair bit of time to work out.

Possible workarounds:
1. Forego putting the footprint into gschem, and then add the footprint manually in pcb using File > Load element data to paste-buffer and then renaming the element with the correct refdes.

2. Create a copy of the offending footprint files, rename them without spaces, label the parts with those footprint names in gschem, and then point gsch2pcb at your local footprint library with the renamed parts.

Changed in pcb:
status: New → Confirmed
milestone: none → pcb-4.2.0
Dr M (drmcn) wrote :

I am using the ALF footprints for the diode. Those are pretty good.

The DIODE_LAY footprints have another "gotcha", the drill holes are too small.

Roland Lutz (rlutz) wrote :

> 2) The space in the file name breaks gsch2pcb, resulting in corrupted elements in the pcb file.

Could you please provide me with an example broken output file, as well as a manually patched working output file, so I can fix this in gsch2pcb?

Sure, please see attached.  Chad asked me for this also.

It might be of interest that gsch2pcb from the fedora repository did not
fail in this way, even though it shows the same version number.

On 05/22/2018 05:04 PM, Roland Lutz wrote:
>> 2) The space in the file name breaks gsch2pcb, resulting in corrupted
> elements in the pcb file.
>
> Could you please provide me with an example broken output file, as well
> as a manually patched working output file, so I can fix this in
> gsch2pcb?
>

Roland Lutz (rlutz) wrote :

> Sure, please see attached.

Which is which?

> It might be of interest that gsch2pcb from the fedora repository did not fail in this way, even though it shows the same version number.

This is weird. Are the gnet-gsch2pcb.scm files identical?

Dr M (drmcn) wrote :

Oops, wrong attachment.  Here is the correct attachment.  The pcb file
has the errant element, see line 44.

The scm files are different.  Please see second attachment.

On 05/22/2018 06:28 PM, Roland Lutz wrote:
>> Sure, please see attached.
> Which is which?
>
>> It might be of interest that gsch2pcb from the fedora repository did
> not fail in this way, even though it shows the same version number.
>
> This is weird. Are the gnet-gsch2pcb.scm files identical?
>

Roland Lutz (rlutz) wrote :

> Here is the correct attachment.

The files are identical, just differently named.

> The scm files are different. Please see second attachment.

I have run both versions of gnet-gsch2pcb.scm on your example schematic and got the same output:

    ...
    PKG_JUMPER1.fp(JUMPER1.fp,CONN1,unknown)
    PKG_JUMPER1.fp(JUMPER1.fp,CONN2,unknown)
    PKG_DIODE_LAY(DIODE_LAY-300.fp,D1,unknown,300.fp)
    ...

> gsch2pcb from the fedora repository did not fail in this way

Could you please provide me with the correct output from the Fedora gsch2pcb?

Roland Lutz (rlutz) wrote :

More specifically, should the output be

    PKG_DIODE_LAY 300(DIODE_LAY-300.fp,D1,unknown,300.fp)

or

    PKG_DIODE_LAY_300(DIODE_LAY-300.fp,D1,unknown,300.fp)

or

    PKG_DIODE_LAY-300(DIODE_LAY-300.fp,D1,unknown,300.fp)

or something else?

Dr M (drmcn) wrote :

There is a pcb file, in the zip file, that has the errant output.

On May 23, 2018 7:01 AM, "Roland Lutz" <email address hidden> wrote:

> More specifically, should the output be
>
> PKG_DIODE_LAY 300(DIODE_LAY-300.fp,D1,unknown,300.fp)
>
> or
>
> PKG_DIODE_LAY_300(DIODE_LAY-300.fp,D1,unknown,300.fp)
>
> or
>
> PKG_DIODE_LAY-300(DIODE_LAY-300.fp,D1,unknown,300.fp)
>
> or something else?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1771726
>
> Title:
> After gsch2pcb, pcb fails to open the new pcb file
>
> Status in pcb:
> Confirmed
> Status in geda package in Ubuntu:
> New
>
> Bug description:
> New design, run gsch2pcb on the gschem file and produces a pcb file.
> pcb fails to open the file, or rather it closes immediately without
> displaying anything
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pcb/+bug/1771726/+subscriptions
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers