-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
NullPointerException in IRClosure #1741
Comments
@donv Yeah that would be excellent. |
Finally got down to look at this again. The file in question is activity Java::org.ruboto.test_app.RubotoTestAppActivity
setup do |activity|
start = Time.now
loop do
@text_view = activity.findViewById(42)
break if @text_view || (Time.now - start > 60)
sleep 1
end
assert @text_view
end
test('initial setup') do |activity|
assert_equal 'What hath Matz wrought?', @text_view.text
end
test('button changes text', :ui => false) do |activity|
button = activity.findViewById(43)
clicked_at = nil
activity.run_on_ui_thread do
button.performClick
clicked_at = Time.now
end
sleep 0.1 until clicked_at && (@text_view.text == 'Broadcast received!' || (Time.now - clicked_at) > 10)
assert_equal 'Broadcast received!', @text_view.text
end The stack trace now is:
@enebo any ideas? |
@donv I only looked at this for a few minutes but I suspect however we setup eval via embedding might not be passing in an enclosing IRScope (which is where the NPE is from). Once I stabilze my current parser work I will try and set up a test for this. I believe however ruboto calls through scriptingcontainer must be exposing a bug since we cut over to IR. |
Hi @enebo ! I am still getting this. Have you stabilised the parser? Any chance you could look at this again? It is the only known issue preventing using master with Ruboto. |
Can you link ruboto ScriptingContainer code to this issue? If I can see how you are invoking scriptingcontainer hopefully I can reproduce this on Java and make a testcase. The line makes it clear we are missing the parent scope. So my educated guess is probably right that how we hook up scriptingcontainer is passing in a null parent scope. |
Hi @enebo ! Sorry for the delay. I finally got Ruboto 1.2.0 out, so I have a bit more time :) My backlog is huge! Here is a link to the code to set up the ScriptingContainer. Please ask if I can clarify it. https://github.com/ruboto/ruboto/blob/master/assets/src/org/ruboto/JRubyAdapter.java#L127 |
@donv could you remove the passes and try again. I am curious if there is On Wed, Oct 15, 2014 at 5:01 PM, Uwe Kubosch notifications@github.com
blog: http://blog.enebo.com twitter: tom_enebo |
let's call this one resolved by now 👴 |
Got the exception below when using master in Ruboto today. I can probably find which source file was loaded if it would be helpful.
The text was updated successfully, but these errors were encountered: