Opened 6 years ago

Last modified 6 years ago

#1014 new Bug Report

Canvas freezes if a Port is removed from a Module that has multiple ports and has any edges connected

Reported by: anonymous Owned by: David Robillard
Priority: major Component: Ganv
Keywords: Cc:

Description

The port is removed but the canvas becomes unresponsive.

Note that this is triggered for me if there is any edge connected to any port of the module when a port is being removed. The edge does not have to be connected to the port being removed. The behavior is a bit different if a connected Port is removed.

The correct function to remove a Port wasn't 100% clear to me. It seemed as if I should just be able to delete the Ganv::Port which would unref the GanvPort? and trigger cleanup. However I also tried getting the module's ItemClass? and calling 'remove' directly using the module and port gobj()ects. This resulted in the same freezing issue. The latter method is used in the program I attached to demonstrate. Hopefully my understanding is correct.

The attached program presents a menu to remove any of the ports. Removing ports 4 and 5 will produce the freezing behavior that I described (provided that they're removed from the module first). Removing (connected) ports 1 and 2 will leave the edges dangling and if the other connected module is moved the edge will be 'attracted' to the remaining port on the module from which the port was removed. No problems will result from removing ports 3 or 6 since the owning module has no edges.

Thanks.

Attachments (1)

portremovetest.tar (10.0 KB) - added by anonymous 6 years ago.
test program

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by anonymous

Attachment: portremovetest.tar added

test program

comment:1 Changed 6 years ago by anonymous

I haven't attempted to fix. I'm using a workaround of removing and recreating all the module's edges myself whenever I have to remove a port.

comment:2 Changed 6 years ago by David Robillard

Component: BLOPGanv
Summary: Ganv: 1.4.2 Canvas freezes if a Port is removed from a Module that has multiple ports and has any edges connectedCanvas freezes if a Port is removed from a Module that has multiple ports and has any edges connected
Note: See TracTickets for help on using tickets.