From: Jonathan P. <jp...@dc...> - 2005-11-22 20:15:41
|
On 22 Nov 2005, at 18:06, Dave Baldwin wrote: > I occasionally get this error: > > /Library/Frameworks/RubyCocoa.framework/Versions/A/Resources/ruby/ > osx/objc/oc_wrapper.rb:80:in `NSApplicationMain': NSApplicationMain > - RBException_NoMethodError - undefined method `%' for nil:NilClass > (OSX::OCException) > from /Users/dave/Chips/DES/mediaUI/build/Development/tui.app/ > Contents/Resources/rb_main.rb:22 > > I haven't been able to reproduce it reliably but if you look in the > line in question it should be impossible to get this error as far > as I can see: > > > 79: m_args.each_with_index do |val, index| > 80: if (index % 2) == 0 then <<<< > error on this line > 81: args.push(val) > 82: else > 83: mname += "_#{val.to_s}" > 84: end > 85: end That is indeed strange. Perhaps you could add some code in at line 80 that explicitly checks if index is nil, and if so dumps contents of m_args and val? Also, if possible, try with ruby 1.8.2. Perhaps it's something introduced in 1.8.3 that's triggering the problem. Cheers Jonathan |