pcb

Potential data loss when currently opened PCB file is modified on disk

Bug #1773852 reported by Dr M
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
Chad Parker

Bug Description

Running gsch2pcb with a previous existing pcb file would previously, remove and add parts. Now, it reinitializes the PCB file. All of my layout and routing, several hours of work, is gone!

Revision history for this message
Roland Lutz (rlutz) wrote :

Which versions of gsch2pcb and gnetlist are you running right now, and which versions were you running previously?

Could you please share a series of steps (and, if appropriate, example files) to reproduce the bug?

Changed in geda:
status: New → Incomplete
Revision history for this message
Dr M (drmcn) wrote : Re: [Bug 1773852] Re: gsch2pcb overwrites previous pcb file!

I am running the version that I recently downloaded and built from the
git hub,

     gsch2pcb -V returns  "gsch2pcb  1.6"

     gnetlist -V returns   "gEDA 1.9.2"

The previous versions are 1.6 and 1.8.2 from the Fedora repository.

On 05/28/2018 04:57 PM, Roland Lutz wrote:
> Which versions of gsch2pcb and gnetlist are you running right now, and
> which versions were you running previously?
>
> Could you please share a series of steps (and, if appropriate, example
> files) to reproduce the bug?
>
> ** Changed in: geda
> Status: New => Incomplete
>

Revision history for this message
Dr M (drmcn) wrote :

i lost the entire day of work on this, i really cant take time now to
create an example.

But, here are the steps:

1) create a schematic using gschem

2) create a pcb from the file using  gsch2pcb

3) follow the instructions from gsch2pcb to setup the pcb file, and then
edit the board to create the layout.

4) go back to gschem and change a foot print.

5) run gsch2pcb again

The result will be that the pcb file has been changed,  the layout is
gone.  The parts are in their original position.

On 05/28/2018 04:57 PM, Roland Lutz wrote:
> Which versions of gsch2pcb and gnetlist are you running right now, and
> which versions were you running previously?
>
> Could you please share a series of steps (and, if appropriate, example
> files) to reproduce the bug?
>
> ** Changed in: geda
> Status: New => Incomplete
>

Revision history for this message
Dr M (drmcn) wrote :

Actually, it just occurred to me what the problem might be.

I am not sure, but it might be that I did not  save the file first.

If so, that is a trap.   The pcb file needs to be locked against
accidental modification while the pcb editor is open.  I sometimes edit
the file deliberately in emacs while it is open in the pcb editor.
This use case with gsch2pcb is something else entirely.

On 05/28/2018 04:57 PM, Roland Lutz wrote:
> Which versions of gsch2pcb and gnetlist are you running right now, and
> which versions were you running previously?
>
> Could you please share a series of steps (and, if appropriate, example
> files) to reproduce the bug?
>
> ** Changed in: geda
> Status: New => Incomplete
>

Revision history for this message
Roland Lutz (rlutz) wrote : Re: gsch2pcb overwrites previous pcb file!

Ok, thank you for the clarification.

summary: - gsch2pcb overwrites previous pcb file!
+ Potential data loss when currently opened PCB file is modified on disk
affects: geda → pcb
Changed in pcb:
status: Incomplete → New
Revision history for this message
Dr M (drmcn) wrote :

I am just now finishing up a design with a few instances of a repeated circuit (several inputs on a DAQ board).

Since I wanted identical layouts, I had to stitch it together working with gschem, gsch2pcb, pcb and emacs. I used gsch2pcb to generate the net list, but had to copy and paste the layout and then edit the identifiers with emacs.

Working back and forth like that, you have to be very careful to save and backup the pcb file before running the next round, or at least not fall for the trap of reloading the file after running gsch2pcb.

The other issue is that copy and paste increments the part numbers. I am not ware of any control to have it mangle instead. Hence I need to use the editor no the pcb file.

So here we have a very mundane and very likely, use case, and a few pitfalls in trying to do it.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi,

The following link may give some ideas:

http://www.lucianifamily.org/geda/util/matrix/index.html#cfg-pcb

Kind regards,

Bert Timmerman.

Changed in pcb:
status: New → Triaged
Revision history for this message
Dr M (drmcn) wrote : Re: [Bug 1773852] Re: Potential data loss when currently opened PCB file is modified on disk

That looks very interesting indeed.  It seems to refer to a utility
sch-matrix, which I was unaware of.  It would have saved a lot of time
on a few projects, and shoulder pain as well.

Hopefully I'll remember to look into it the next time I have to do this.

Is there any document anywhere, that lists and summarizes each of the
capabilities available in the geda suite?

Thank you

On 06/03/2018 10:03 AM, Bert Timmerman wrote:
> Hi,
>
> The following link may give some ideas:
>
> http://www.lucianifamily.org/geda/util/matrix/index.html#cfg-pcb
>
> Kind regards,
>
> Bert Timmerman.
>
> ** Changed in: pcb
> Status: New => Triaged
>

Revision history for this message
Chad Parker (parker-charles) wrote :

Actually, we should have this discussion in this thread, not the one I previously replied to. Sorry about that. My previous reply:

Let's jump back to this thread for discussion on gsch2pcb.

Okay, so, the sequence of events as I understand it goes as follows:

1. create a schematic
2. run gsch2pcb
3. open layout and start editing
4. make changes to the schematic
5. run gsch2pcb
6. you get a message in pcb saying the file on disk has changed, and you reload it to get your schematic updates.
7. your layout edits are wiped out because they only existed in memory

It seems like one way to address this would be to add a warning message when changes are detected if the current layout is modified. Maybe a confirmation dialog. This is something we really should have anyway. Do you think that would have prevented your situation?

On Sun, Jun 10, 2018 at 3:35 PM, Dr M <email address hidden> wrote:
on the file management thing, with gsch2pcb overwriting my design, i
think that occurred when i had unsaved changes in the pcb editing
session, and so it was really my fault. pcb and emacs know when a file
has been changed while they have it open, and i still both together for
some more complicated situations, so a lock file that gsch2pcb would see
when the file is open by pcb might be a solution, but it would be
inconvenient to also lock-out the editor that i sometimes keep open in
parallel,

Revision history for this message
Chad Parker (parker-charles) wrote :

I've implemented this in branch LP1773852.

If data is changed in pcb, and then the file on disk is also changed, pcb will now give you a pop-up window warning that your layout data will be overwritten.

Changed in pcb:
importance: Undecided → Medium
milestone: none → pcb-4.2.0
Changed in pcb:
status: Triaged → Fix Committed
Changed in pcb:
assignee: nobody → Chad Parker (parker-charles)
Changed in pcb:
milestone: pcb-4.2.0 → pcb-4.1.3
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.