Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate components #3653

Closed
NilsRo opened this issue Mar 30, 2020 · 6 comments
Closed

Duplicate components #3653

NilsRo opened this issue Mar 30, 2020 · 6 comments

Comments

@NilsRo
Copy link

NilsRo commented Mar 30, 2020

Current Behaviour

Hi,

I have dublicate components which share same connections in vreadboard and circuit view.

2020-03-31_01-00-40

Build:
CD-498-0-a1ffcea 2019-12-01 (Qt 5.12.3)

Operating System:
Windows 10

Steps to reproduce:
Happens sometimes.

Expected Behaviour

No dublicate components

PSU1 Adapterplatine.zip

@vanepp
Copy link
Contributor

vanepp commented Apr 15, 2020

There in fact are no duplicate components. If in breadboard I select Routing->select all wires and then press delete (to delete all the wires) then switch to schematic and Routing select all traces and delete (to delete all wires) only the components are left:

Capture
Capture1
Capture3

so far so good, except there are more connectors in pcb than schematic or breadboard. However that is because Fritzing will load components on top of one another and you may have to drag them apart.

Capture4

Here the connector circled in red was placed on top of the connector circled in blue and will connect all its pins to the second connector creating unwanted connections.

Capture5

Similarly in schematic these three connectors (circled in red blue and black) were positioned on top of each other creating unwanted connections

Capture6

Pcb was actually ok, other than the 1mm connector (circled in red) needs to have its pad sizes changed to .01 by .01 to make pads that do not over lap (the red circle in Inspector on the lower right of the screen.) There are no duplicate components only ones that were on top of each other. I'd probably argue that the multiple J1s are a bug (but I couldn't reproduce it the last time I tried) but in this case they are in different sizes of connectors and thus may be OK.

Peter

@NilsRo
Copy link
Author

NilsRo commented Jul 26, 2020

Hi.

@vanepp

I now can reproduce the issue. If you use the mouse scrollwheel to change the type of a component fast the component will be dublicated with shared connectors (not visible but connected in the background). So if one of the components is deleted the original wires will be deleted as well. You can see that in the attached video. At the end all "new" components created has green connectors. So Also PCB, ... will be wrong.

2020-07-26 11-40-51.zip

Sicherheitsschaltung Ladekoffer - V2-1 20200725.zip

Cheers,
Nils

@vanepp
Copy link
Contributor

vanepp commented Nov 1, 2020

Yes, easily reproducable. Simplest case is a single rectifier diode. Drag a diode in to pcb, select the diode then in Inspector select the type field to produce the drop down menu, then select it again (which causes it to blank out, which is likely a bug as well!) like this:

Capture

then with the type field selected, scroll quickly with the wheel and new parts appear (which they shouldn't!)

Capture1

What looks to be happening is the first change spawns a thread to make the requested change, but the scroll wheel is fast enough (unlike a usual human response of moving the mouse and clicking which is why we usually don't see this) to spawn a new thread to make another change before the first change has completed using the same moduleId. That appears to produce new instances of the same part (which may be the normal response) without deleting the original part as may normally happen. I think this causes internal routing corruption, because I have managed to hang Fritzing by making connections among the newly generated parts, and I suspect that all three are sharing the same data structure or possibly net names. One possible solution is to implement a busy flag (which has its own problems likely) that is set at the start of the first change and cleared when the change is completed. Then the later changes (no matter the timing) would wait til the busy flag is cleared indicating the firt change has completed before starting the next. This would imply a mechanism to queue requests til the busy flag is clear, but I expect there likely is such a mechanism in Qt.

Peter

@failiz
Copy link
Contributor

failiz commented Jan 8, 2021

This is a duplicate of #1431. Merge?
I think the best/easiest solution would be to disable the wheel for the properties and leave the wheel only for scrolling in the inspector pane

@failiz
Copy link
Contributor

failiz commented Mar 12, 2021

Close in favor of #1431

@KjellMorgenstern
Copy link
Member

Thanks @vanepp and @NilsRo for reproducing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants