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
This code segfaults on typical layer lists:
lv = pya.LayoutView.current() to_delete = [] for l in lv.each_layer(): if l.source_layer % 2 == 0: to_delete.append(l) for l in to_delete: l.delete()
Reason: deleting a layer will invalidate the following iterators. That's reasonable, but the program should not segfault. The solution is to reverse:
... to_delete.reverse() for l in to_delete: l.delete()
The text was updated successfully, but these errors were encountered:
Implemented #368: no segfault but exception if accessing invalid laye…
e95ced6
…r iterator
Merge pull request #388 from KLayout/issue-368
6e02f1f
Will be released soon with 0.26.1
Sorry, something went wrong.
klayoutmatthias
No branches or pull requests
This code segfaults on typical layer lists:
Reason: deleting a layer will invalidate the following iterators. That's reasonable, but the program should not segfault. The solution is to reverse:
The text was updated successfully, but these errors were encountered: