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

Crash in debug mode when placing a "slow cell" #984

Closed
iqmtestd opened this issue Jan 23, 2022 · 3 comments
Closed

Crash in debug mode when placing a "slow cell" #984

iqmtestd opened this issue Jan 23, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@iqmtestd
Copy link

iqmtestd commented Jan 23, 2022

Hi @klayoutmatthias,

Klayout crashes in debug mode when a drag-and-drop operation is too fast compared to the pcell's runtime.

To reproduce press down the mouse button on a "slow cell", drag it to the layout and release the button before the cell appears. I've added a sleep call to the Circle pcell sample to make it slow enough. This also happens with the latest KLayout compiled from master.

An obvious workaround is to be patient with the mouse button :)

Thanks,
David

image

@klayoutmatthias
Copy link
Collaborator

Thank you for reporting this issue.

I can reproduce it, but a quick debugging did not reveal an obvious reason. The crash happens somewhere inside Qt. I'll try to further debug the problem.

I don't see it happening with the debugger open, so a quick workaround is not to use drag and drop, but use the toolbar's "instance" mode to create an instance with the debugger open.

Matthias

@klayoutmatthias
Copy link
Collaborator

Update: apparently that is a problem in Qt 5.12.8 (or other versions). A pointer is set to null, but it's not tested before accessing it.

The workaround I found is to disable the Ruby or Python debugger during drag operations - this means you will not be able to debug PCell code when you drag & drop a PCell into the window. I think this makes even some sense as during drag and drop the mouse cursor is captured by the system. Accessing the debugger is not really in line with the UI system. I guess this is also one of the reasons why the mentioned pointer becomes null.

@klayoutmatthias klayoutmatthias self-assigned this Jan 30, 2022
@klayoutmatthias klayoutmatthias added this to the 0.27.8 milestone Jan 30, 2022
@klayoutmatthias
Copy link
Collaborator

0.27.8 is released which should fix this problem.

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

No branches or pull requests

2 participants