Possible regression in DRC: with_density influences join operation

edited February 26 in Verification

The following DRC script changes its behavior in hierarchical layouts after version 0.29.7:

report("drc")

deep

Activ = source.polygons("1/0")
Cont = source.polygons("6/0")

# commenting the following line produces the expected result
Activ.with_density(0.0 .. 0.35, tile_size(20.0.um))

Cont.output("Cont")
Activ.output("Activ")
Cont.join(Activ).output("Cont.join(Activ)")

In 0.29.7, the two hierarchical layers are properly joined. In later versions (I've checked 0.29.9 and 0.29.11), the join is missing shapes in lower hierarchy levels. Disabling the density check produces the correct/expected result! Interestingly, even Activ.dup.with_density(...) changes the behavior of the join operation!

I have compiled all versions from source on Arch Linux. Can anyone reproduce this issue? If required, I can also create a simple example layout.

Comments

  • Hi Andreas,

    sorry for the late reply.

    I can reproduce the issue on the attached layout.

    Interestingly, if I write the "join" output to a layer, everything is fine:

    deep
    
    Activ = source.polygons("1/0")
    Cont = source.polygons("6/0")
    
    Activ.with_density(0.0 .. 0.35, tile_size(20.0.um))
    
    Cont.output("Cont")
    Activ.output("Activ")
    Cont.join(Activ).output(100, 0)
    

    I have created a ticket for this case: https://github.com/KLayout/klayout/issues/1993

    Thanks for reporting that issue.

    Matthias

  • Hi Matthias,

    thank you for checking and creating the issue! It is interesting that the output to a layer is not affected. So maybe it's the RDB output?

    I thought about doing a git bisect but was afraid of the compile times :#
    Next time, I will try to provide a test layout right away.

    Andreas

  • No worries. I have found the root cause which was a dangling reference that the GC did not clean up (or not quickly enough).

    I fixed that and will release it in 0.29.12 soon.

    Matthias

  • Thank you very much!

    Andreas

Sign In or Register to comment.