To reproduce the issue, load and save the attached layout in viewer mode. An error message occurs:
ERROR: Internal error: ../../../src/db/db/dbOASISWriter.cc:1833 amax >= 2 || bmax >= 2 was not true
The reason is the degenerated shape array which creates 7 overlapping rectangles. KLayout will optimize this but keep the shape array, which results in a single-shape array that can't be written to OASIS.
In scripts, a workaround is to use "oasis_recompress = true" on LoadLayoutOptions:
opt = RBA::LoadLayoutOptions::new
opt.oasis_recompress = true
opt.format = "OASIS"
layout.write("file.oas", opt)
x.oas.gz