#1447: Crash - Assertion failed in RoxorVM::pop_current_exception --------------------------------+------------------------------------------- Reporter: msabramo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: crash, GCD --------------------------------+------------------------------------------- Using the extra debug logging that I mentioned in #1446, I took the app that I was working on that was crashing (http://urbancoding.github.com/jenx/) and reduced it down quite a bit. I will attach a tarball with the Xcode project (I attempted to reproduce the problem in a simple command-line RSpec, but I couldn't). When I run the attached tarball with a MacRuby with the change mentioned in #1446, I get this output: {{{ GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".Setting environment variable "MANPATH_WITHOUT_PERLBREW" to null value. Setting environment variable "SHMUX_SSH_OPTS" to null value. tty /dev/ttys004 [Switching to process 63033 thread 0x0] 2012-02-04 12:33:49.342 Jenx[63033:903] Could not find image named 'refresh'. 2012-02-04 12:33:49.344 Jenx[63033:903] Could not find image named 'projects'. 2012-02-04 12:33:49.348 Jenx[63033:903] Could not connect the action ensure_connection: to target of class Jenx 2012-02-04 12:33:49.348 Jenx[63033:903] Could not connect the action show_preferences_window: to target of class Jenx 2012-02-04 12:33:49.457 Jenx[63033:903] switch_to_module - mod = #<PreferencesGeneralViewController:0x2005be7a0> 2012-02-04 12:33:49.477 Jenx[63033:903] Could not connect the action save_preferences: to target of class PreferencesGeneralViewController 2012-02-04 12:33:49.478 Jenx[63033:903] PreferencesGeneralViewController.load_projects - Calling all_projects - url = "http://anunresolvablehostname.com/foobar"... 2012-02-04 12:33:49.489 Jenx[63033:903] Creating JenxConnectionManager... 2012-02-04 12:33:49.499 Jenx[63033:903] JenxConnectionManager.initialize calling async... 2012-02-04 12:33:49.501 Jenx[63033:903] JenxConnectionManager.initialize @value = nil 2012-02-04 12:33:49.506 Jenx[63033:903] .value waiting... *** Dispatch block exited prematurely because of an uncaught exception: /Users/marca/Library/Developer/Xcode/DerivedData/jenx- gcpqjcbitzazsievjxaddpxmrtnb/Build/Products/Debug/jenx.app/Contents/Resources/JenxConnection.rb:42:in `block': getaddrinfo: nodename nor servname provided, or not known (SocketError) from /Users/marca/Library/Developer/Xcode/DerivedData/jenx- gcpqjcbitzazsievjxaddpxmrtnb/Build/Products/Debug/jenx.app/Contents/Resources/JenxConnectionManager.rb:15:in `block' 2012-02-04 12:33:49.626 Jenx[63033:903] .value about to return @value = nil 2012-02-04 12:33:49.627 Jenx[63033:903] 1 - connection_result.value = 2012-02-04 12:33:49.628 Jenx[63033:903] .value waiting... 2012-02-04 12:33:49.628 Jenx[63033:903] .value about to return @value = nil 2012-02-04 12:33:49.629 Jenx[63033:903] .value waiting... 2012-02-04 12:33:49.630 Jenx[63033:903] .value about to return @value = nil 2012-02-04 12:33:49.630 Jenx[63033:903] 2 - connection_result.value = 2012-02-04 12:33:49.631 Jenx[63033:903] .value waiting... 2012-02-04 12:33:49.631 Jenx[63033:903] .value about to return @value = nil 2012-02-04 12:33:49.632 Jenx[63033:903] PreferencesGeneralViewController.load_projects - Called all_projects DONE. @all_projects = nil RoxorVM::pop_current_exception (vm.cpp:3607) - Warning: Assertion about to fail: ((size_t)pos < current_exceptions.size()); pos = 1; current_exceptions.size() = 1 current_exceptions[1]: "#<NoMethodError: undefined method `[]' for nil:NilClass>" Assertion failed: ((size_t)pos < current_exceptions.size()), function pop_current_exception, file vm.cpp, line 3616. sharedlibrary apply-load-rules all Current language: auto; currently objective-c }}} So most likely the crash is related to uncaught exceptions inside a Grand Central Dispatch (GCD) queue. -- Ticket URL: <http://www.macruby.org/trac/ticket/1447> MacRuby <http://macruby.org/>