X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Mon, 5 Jun 2017 09:54:02 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: geda-user AT delorie DOT com X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: [geda-user] [pcb] semi-bugreport: buffer layers, broken paste Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Reply-To: geda-user AT delorie DOT com Hi PCB developers, during the subcircuit rework, I figured the concept of how the original code (and mainline) handles buffer layers is broken. The root of the problem is that buffers are sort of independent of the board being edited, while they do assume the layer stack is the same in buffers and in the board but nothing guarantees that. This causes no problem most of the time, but breaks as soon as: - the buffer is used to copy some data from one board to another, with a different layer stack - a board with different layer stack is loaded into the buffer - the layer stack of the current board is modified while a buffer is not empty The result is pasting objects on random layers - I could easily make copper turn into silk or change from top layer to bottom layer. After spending many hours on getting this fixed in pcb-rnd I think I have a full understanding of the problem now. If any of the PCB developers are interested in the details (why exactly it breaks, how to produce test cases for the bug, options for a fix) please visit me on pcb-rnd's IRC channel[1] to have a discussion so then you can write a proper bugreport. (I'm not trying to type the whole thing here becuase it's long, would take a lot of time and I am not sure anyone is interested. The fix is non-trivial and one may say "it was good for the past ~2 decades so it should be good for another 2" and then typing a long description would be waste of time.) Regards, Igor2 [1] server: repo.hu; port: 6667; channel: #pcb-rnd