bowdidge / switchlist

Mac Switchlist generator for Model Railroads
http://www.vasonabranch.com/switchlist
1 stars 2 forks source link

Hang when manipulating trains going to deleted stations #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I got a hang in the train stops dialog when trying to change stations and 
remove a deleted station.  The sheet didn't finish drawing, and couldn't be 
cancelled, causing me to lose my layout.

Steps to reproduce are something like:
* Create a layout with two trains going to two towns with similar names.
* Delete one of the towns, and try to change the stops for the train going to 
that town to the other.
* Should hang.

Original issue reported on code.google.com by rwbowdi...@gmail.com on 29 Sep 2012 at 7:06

GoogleCodeExporter commented 9 years ago
The crash showed the following message:

2012-09-29 12:03:21.123 SwitchList[46033:903] NSConcreteAttributedString 
initWithString:: nil value
2012-09-29 12:03:23.604 SwitchList[46033:903] NSConcreteAttributedString 
initWithString:: nil value
2012-09-29 12:03:23.614 SwitchList[46033:903] NSConcreteAttributedString 
initWithString:: nil value
2012-09-29 12:03:32.708 SwitchList[46033:903] NSConcreteAttributedString 
initWithString:: nil value

That points to -[SwitchRouteDialogController 
tableView:objectValueForTableColumn:row:] as the likely offender because it's 
the only explicit place in SwitchList where NSAttributedStrings are created.  
However, that code appears to grab elements from the array correctly, and the 
town should never be nil (causing [town name] to never be nil).

Original comment by rwbowdi...@gmail.com on 29 Sep 2012 at 8:31