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 when PCell library is destroyed and cells are present which refer to it #596

Closed
klayoutmatthias opened this issue Jun 29, 2020 · 0 comments
Assignees
Labels

Comments

@klayoutmatthias
Copy link
Collaborator

The following code

class MyLib < RBA::Library
  def initialize(pcell_classes)
    ...
    register("MyLib")
  end
end

$lib && $lib._destroy
$lib = MyLib::new

will crash the application on second execution if a cell referring to this library is present.

The reason is that "_destroy" will kill the library and leave the cells referring to it in an undefined state. Instead, just creating a new library is fine as "register" will replace all references to the old instance. So "_destroy" is not required.

The fix is to disallow "_destroy". To keep old code working, a dummy implementation shall be provided.

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

1 participant