Skip to content

Crash when PCell library is destroyed and cells are present which refer to it #596

@klayoutmatthias

Description

@klayoutmatthias

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions