{"action":"created","issue":{"url":"https://api.github.com/repos/zenspider/graphics/issues/7","labels_url":"https://api.github.com/repos/zenspider/graphics/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/zenspider/graphics/issues/7/comments","events_url":"https://api.github.com/repos/zenspider/graphics/issues/7/events","html_url":"https://github.com/zenspider/graphics/issues/7","id":106212000,"number":7,"title":"Segfault","user":{"login":"JoshCheek","id":77495,"avatar_url":"https://avatars.githubusercontent.com/u/77495?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshCheek","html_url":"https://github.com/JoshCheek","followers_url":"https://api.github.com/users/JoshCheek/followers","following_url":"https://api.github.com/users/JoshCheek/following{/other_user}","gists_url":"https://api.github.com/users/JoshCheek/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshCheek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshCheek/subscriptions","organizations_url":"https://api.github.com/users/JoshCheek/orgs","repos_url":"https://api.github.com/users/JoshCheek/repos","events_url":"https://api.github.com/users/JoshCheek/events{/privacy}","received_events_url":"https://api.github.com/users/JoshCheek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-13T11:45:25Z","updated_at":"2015-09-23T01:23:00Z","closed_at":null,"body":"Tried out the example from the readme\r\n\r\nThe exception:\r\n\r\n```\r\n$ ruby f2.rb\r\nruby f2.rb\r\n2015-09-13 05:43:05.960 ruby[98903:507] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating CGSWindow on line 263'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x00007fff94a2c25c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff8dab2e75 objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff94a2c10c +[NSException raise:format:] + 204\r\n\t3   AppKit                              0x00007fff8ba36eb5 _NSCreateWindowWithOpaqueShape2 + 1403\r\n\t4   AppKit                              0x00007fff8ba35a41 -[NSWindow _commonAwake] + 3720\r\n\t5   AppKit                              0x00007fff8b911420 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 882\r\n\t6   AppKit                              0x00007fff8b9108a2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1054\r\n\t7   AppKit                              0x00007fff8b910478 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45\r\n\t8   libSDL-1.2.0.dylib                  0x000000010c04b0f4 -[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 279\r\n\t9   libSDL-1.2.0.dylib                  0x000000010c048a6a QZ_SetVideoMode + 1172\r\n\t10  libSDL-1.2.0.dylib                  0x000000010c03fdfa SDL_SetVideoMode + 907\r\n\t11  sdl_ext.bundle                      0x000000010c003cce Screen_s_open + 158\r\n\t12  ruby                                0x000000010bcebf8b vm_call_cfunc + 1547\r\n\t13  ruby                                0x000000010bceb300 vm_call_method + 880\r\n\t14  ruby                                0x000000010bcd025d vm_exec_core + 12605\r\n\t15  ruby                                0x000000010bcdfaa1 vm_exec + 129\r\n\t16  ruby                                0x000000010bce845e vm_call0_body + 830\r\n\t17  ruby                                0x000000010bcd8633 rb_funcallv + 211\r\n\t18  ruby                                0x000000010bbfc3e9 rb_class_new_instance + 41\r\n\t19  ruby                                0x000000010bcebf8b vm_call_cfunc + 1547\r\n\t20  ruby                                0x000000010bceb300 vm_call_method + 880\r\n\t21  ruby                                0x000000010bcd025d vm_exec_core + 12605\r\n\t22  ruby                                0x000000010bcdfaa1 vm_exec + 129\r\n\t23  ruby                                0x000000010bce0a98 rb_iseq_eval_main + 504\r\n\t24  ruby                                0x000000010bb9cec4 ruby_exec_internal + 148\r\n\t25  ruby                                0x000000010bb9cdee ruby_run_node + 78\r\n\t26  ruby                                0x000000010bb54f8f main + 79\r\n\t27  libdyld.dylib                       0x00007fff904f45fd start + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\nfish: 'ruby f2.rb' terminated by signal SIGABRT (Abort)\r\n```\r\n\r\nThe dependencies:\r\n\r\n```\r\n$ sh rubysdl_setup.sh\r\n+ brew uninstall libogg\r\nUninstalling /usr/local/Cellar/libogg/1.3.2... (95 files, 672K)\r\n+ brew uninstall libvorbis\r\nUninstalling /usr/local/Cellar/libvorbis/1.3.5... (155 files, 2.6M)\r\n+ brew uninstall libpng\r\nUninstalling /usr/local/Cellar/libpng/1.6.18... (17 files, 1.3M)\r\nlibpng 1.5.18, 1.6.10, 1.6.16, 1.6.17 are still installed.\r\nRemove them all with `brew uninstall --force libpng`.\r\n+ brew uninstall sdl\r\nUninstalling /usr/local/Cellar/sdl/1.2.15... (223 files, 2.1M)\r\n+ brew uninstall sdl_ttf\r\nUninstalling /usr/local/Cellar/sdl_ttf/2.0.11... (8 files, 96K)\r\n+ brew uninstall sdl_mixer\r\nUninstalling /usr/local/Cellar/sdl_mixer/1.2.12... (8 files, 420K)\r\n+ brew uninstall sdl_image\r\nUninstalling /usr/local/Cellar/sdl_image/1.2.12_1... (8 files, 140K)\r\n+ gem uninstall -ax rsdl\r\n\r\nYou have requested to uninstall the gem:\r\n\trsdl-0.1.5\r\n\r\ngraphics-1.0.0b1 depends on rsdl (~> 0.1)\r\nIf you remove this gem, these dependencies will not be met.\r\nContinue with Uninstall? [yN]  y\r\nRemoving rsdl\r\nSuccessfully uninstalled rsdl-0.1.5\r\n+ gem uninstall -ax rubysdl\r\n\r\nYou have requested to uninstall the gem:\r\n\trubysdl-2.2.0\r\n\r\ngraphics-1.0.0b1 depends on rubysdl (~> 2.2)\r\nIf you remove this gem, these dependencies will not be met.\r\nContinue with Uninstall? [yN]  y\r\nSuccessfully uninstalled rubysdl-2.2.0\r\n+ gem uninstall -ax graphics\r\nSuccessfully uninstalled graphics-1.0.0b1\r\n+ brew install sdl\r\n==> Downloading https://homebrew.bintray.com/bottles/sdl-1.2.15.mavericks.bottle.2.tar.gz\r\nAlready downloaded: /Library/Caches/Homebrew/sdl-1.2.15.mavericks.bottle.2.tar.gz\r\n==> Pouring sdl-1.2.15.mavericks.bottle.2.tar.gz\r\n🍺  /usr/local/Cellar/sdl/1.2.15: 223 files, 2.1M\r\n+ brew install sdl_mixer --with-smpeg\r\n==> Installing dependencies for sdl_mixer: smpeg\r\n==> Installing sdl_mixer dependency: smpeg\r\n==> Downloading https://homebrew.bintray.com/bottles/smpeg-0.4.5.mavericks.bottle.tar.gz\r\n######################################################################## 100.0%\r\n==> Pouring smpeg-0.4.5.mavericks.bottle.tar.gz\r\n🍺  /usr/local/Cellar/smpeg/0.4.5: 22 files, 700K\r\n==> Installing sdl_mixer\r\n==> Downloading http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz\r\n######################################################################## 100.0%\r\n==> ./configure --prefix=/usr/local/Cellar/sdl_mixer/1.2.12\r\n==> make install\r\n🍺  /usr/local/Cellar/sdl_mixer/1.2.12: 8 files, 428K, built in 25 seconds\r\n+ brew install sdl_ttf\r\n==> Installing dependencies for sdl_ttf: libpng\r\n==> Installing sdl_ttf dependency: libpng\r\n==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.18.mavericks.bottle.tar.gz\r\nAlready downloaded: /Library/Caches/Homebrew/libpng-1.6.18.mavericks.bottle.tar.gz\r\n==> Pouring libpng-1.6.18.mavericks.bottle.tar.gz\r\n🍺  /usr/local/Cellar/libpng/1.6.18: 17 files, 1.3M\r\n==> Installing sdl_ttf\r\n==> Downloading https://homebrew.bintray.com/bottles/sdl_ttf-2.0.11.mavericks.bottle.2.tar.gz\r\nAlready downloaded: /Library/Caches/Homebrew/sdl_ttf-2.0.11.mavericks.bottle.2.tar.gz\r\n==> Pouring sdl_ttf-2.0.11.mavericks.bottle.2.tar.gz\r\n🍺  /usr/local/Cellar/sdl_ttf/2.0.11: 8 files, 96K\r\n+ brew install sdl_image\r\n==> Downloading https://homebrew.bintray.com/bottles/sdl_image-1.2.12_1.mavericks.bottle.1.tar.gz\r\nAlready downloaded: /Library/Caches/Homebrew/sdl_image-1.2.12_1.mavericks.bottle.1.tar.gz\r\n==> Pouring sdl_image-1.2.12_1.mavericks.bottle.1.tar.gz\r\n🍺  /usr/local/Cellar/sdl_image/1.2.12_1: 8 files, 140K\r\n```\r\n\r\nThe gem:\r\n\r\n```\r\n$ gem install graphics  --pre\r\nFetching: rubysdl-2.2.0.gem (100%)\r\nBuilding native extensions.  This could take a while...\r\nSuccessfully installed rubysdl-2.2.0\r\nFetching: rsdl-0.1.5.gem (100%)\r\nBuilding native extensions.  This could take a while...\r\nSuccessfully installed rsdl-0.1.5\r\nFetching: graphics-1.0.0b1.gem (100%)\r\nSuccessfully installed graphics-1.0.0b1\r\n3 gems installed\r\n```\r\n\r\nCode being run (taken from the readme, I only added the first line):\r\n\r\n```ruby\r\nrequire 'graphics'\r\nclass Ball < Graphics::Body\r\n  def initialize w\r\n    super\r\n\r\n    # ...\r\n  end\r\n\r\n  def draw\r\n    w.angle x, y, a, 10+3*m, :red\r\n    w.circle x, y, 5, :white, :filled\r\n  end\r\n\r\n  def update\r\n    fall\r\n    move\r\n    bounce\r\n  end\r\n\r\n  # ...\r\nend\r\n\r\nclass BounceSimulation < Graphics::Simulation\r\n  attr_accessor :bs\r\n\r\n  def initialize\r\n    super 640, 640, 16, \"Bounce\"\r\n\r\n    self.bs = populate Ball\r\n  end\r\n\r\n  def update n\r\n    bs.each(&:update)\r\n  end\r\n\r\n  def draw n\r\n    clear\r\n    bs.each(&:draw)\r\n    fps n\r\n  end\r\n\r\n  # ...\r\nend\r\n\r\nBounceSimulation.new.run\r\n```"},"comment":{"url":"https://api.github.com/repos/zenspider/graphics/issues/comments/142467787","html_url":"https://github.com/zenspider/graphics/issues/7#issuecomment-142467787","issue_url":"https://api.github.com/repos/zenspider/graphics/issues/7","id":142467787,"user":{"login":"zenspider","id":9832,"avatar_url":"https://avatars.githubusercontent.com/u/9832?v=3","gravatar_id":"","url":"https://api.github.com/users/zenspider","html_url":"https://github.com/zenspider","followers_url":"https://api.github.com/users/zenspider/followers","following_url":"https://api.github.com/users/zenspider/following{/other_user}","gists_url":"https://api.github.com/users/zenspider/gists{/gist_id}","starred_url":"https://api.github.com/users/zenspider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenspider/subscriptions","organizations_url":"https://api.github.com/users/zenspider/orgs","repos_url":"https://api.github.com/users/zenspider/repos","events_url":"https://api.github.com/users/zenspider/events{/privacy}","received_events_url":"https://api.github.com/users/zenspider/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T01:23:00Z","updated_at":"2015-09-23T01:23:00Z","body":"try `rsdl f2.rb` instead of `ruby`?"}}