When I run the following routine where view is LayoutView
def change_layer_properties_node( view, gds_layer, name ) properties_iterator = view.begin_layers while properties_iterator != view.end_layers properties = properties_iterator.current if properties.source_layer( true ) == gds_layer new_properties = properties.dup new_properties.name = name RBA::MessageBox::info( "Layer Info","Changine #{properties.name} to #{name}", RBA::MessageBox::b_ok )
view.set_layer_properties( properties_iterator, new_properties ) end properties_iterator = properties_iterator.next end end
I crash if I take out the MessageBox line. If I click really quickly on the OK in the message box I will crash after just changing 3 or 4 layer names. However if I click slowly, I can get through my entire list. When I crash (under OS X 10.6.4) I get the following message
I tried to reproduce the problem on Ubuntu but have not been successful to do so.
As a wild guess, I'd try to stray in calls to "view.update_content" because that should synchronize all the internal states. I'd try to insert at least one call after "set_layer_properties".
Are you able to create a stack trace and send that to me via the email address listed on the contacts page?
I'll look at the stack trace if you happen to get one. I don't have experience with the OS X version myself but so far I felt there is no much difference between Linux and OS X.
Your descriptions indicates that it might be a problem with the asynchronous drawing thread. If you put KLayout into the synchronous mode (use -x on the command line), there is no such thread and that should avoid the problem, although that's not a real solution ...