Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bond Error: Failed during completion action #27

Closed
pmros opened this Issue Dec 30, 2012 · 4 comments

Comments

Projects
None yet
2 participants

pmros commented Dec 30, 2012

I have a project called troshka that use bond. It used to work fine but it fails lately. This is the error:

Bond Error: Failed during completion action '/^Object$/+/(\S+|\([^\)]*\)|'[^']*'|"[^"]*"|\/[^\/]*\/|(?:%q|%r|%Q|%w|%s|%)?\[[^\]]*\]|(?:proc|lambda|%q|%r|%Q|%w|%s|%)?\s*\{[^\}]*\})\.(\w*(?:\?|!)?)$/' with 'can't convert nil into String'.
Completion Info: Matches completion for object with ancestor matching /^Object$/.

I'm trying something like this:

Bond.agent.call '"".s'

Thank you for bond.

pmros commented Jan 12, 2013

I respond to myself. I have more information but no solution.
bond 0.4.2 works ok for me but 0.4.3 fails because this pull request [https://github.com/cldwalker/bond/pull/25]. This line [https://github.com/cldwalker/bond/blob/master/lib/bond/missions/object_mission.rb#L41] launch a TypeException (can't convert nil to String). klass method returns eigen class ok but klass("").instance_methods give me that exception.

Sadly, I'm not be able to reproduce this error in few lines but bond fails this way in my project troshka [https://github.com/pmros/troshka]. I don't know why ruby launch that exception. Troshka doesn't redefine ruby core class methods.

Solution: You could catch TypeError exception at at default_action method, not only klass method.

Thank you again.

Owner

cldwalker commented Jan 24, 2013

Thanks for the bug report. I don't have time to look at this but I'm open to a pull with tests.

@pmros pmros referenced this issue Jan 27, 2013

Closed

TypeError fix #28

pmros commented Feb 10, 2013

At last, I got it!
The problem is Qt4 library. A small script that reproduce the error:

require 'bond'
require 'Qt4'

Bond.start
l = Bond.agent.call '"".', '"".'
puts l

If you remove second line, it works OK.
Please accept my pull request.

Owner

cldwalker commented Jan 2, 2014

I'm closing since this isn't a Bond bug. If you figure out what Qt4 is doing that is causing the issue feel free to continue the conversation.

@cldwalker cldwalker closed this Jan 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment