@User: As noted in the thread (which I wrote before reading your comment above), my recommended solution is exactly what you did: Exit and re-enter magic between the gds write and gds read. I gave a heads-up to Ahmed to fix the script in openlane. The crash behavior is gone now, but the behavior of reading back in a bunch of cells from a GDS file that are already in memory appears to be somewhat undefined, or at least unknown.