-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example28_networking uninitialized constant IO::WaitReadable + possible fix #4
Comments
Decided to commit the change. We can always go back if necessary. |
The relevant bit from the stack trace seems to be "uninitialized constant IO::WaitReadable". IO::WaitReadable is documented here: http://www.ruby-doc.org/core-1.9/classes/IO/WaitReadable.html. Certainly doesn't seem like an exception type. However, searching for "rescue IO::WaitReadable" yields results such as http://stackoverflow.com/questions/7127603/why-is-iowaitreadable-being-raised-differently-for-stdout-than-stderr-ruby-1 and http://ruby-doc.org/stdlib/libdoc/socket/rdoc/classes/TCPServer.html, so it seems like a valid construct. The second hit, http://lists.macosforge.org/pipermail/macruby-devel/2010-May/005127.html, is also interesting because it seems like a very similar bug report. I'd also hesitate to say Errno::EAGAIN is the correct fix until you've figured out what exceptions could possibly be raised by the begin block... References for Ruby exception handling (based on a quick search, not extensive study): |
Thanks for the info. I wasn't clear in my post about the reason I added Errno::EAGAIN. That was another unhandled exception I received after removing the IO::WaitReadable. I agree with your suggestion and am still unsure about this being the final solution, but wanted to commit these changes so we could see if it was a problem with something on my machine or not. I'll reopen the issue. |
I get an error when I try to run example28_networking (error occurs in chingu/lib/chingu/game_states/network_server.rb line 208). I'm not too familiar with ruby yet but it looks like an exception had an invalid type or something.
By changing line 208 to:
It works. Should I commit this or am I missing something?
The full error is here:
The text was updated successfully, but these errors were encountered: