Re: [ruboto] load error: uri/common -- java.lang.StackOverflowError: null

169 views
Skip to first unread message

Uwe Kubosch

unread,
Apr 8, 2013, 3:01:04 AM4/8/13
to rub...@googlegroups.com
On 2013-04-08, at 05:26, John Carter <cye...@gmail.com> wrote:

> Excuse the Ruboto newbie... so may be a dumb question.

Newbies are especially welcome! Bring on the questions!


> Attempting to
> require 'net/http'
>
> And getting the following java exception trace in adb logcat. All suggestions / pointers most welcome
>
> I/System.out(29305): LoadError: load error: uri/common -- java.lang.StackOverflowError: null

This is a common problem. You should try the release candidate which loads the activity scripts with a larger stack.

Ruboto 0.11.0 final should be out later today with the same improvement.


--
Uwe Kubosch
u...@kubosch.no
http://kubosch.no/




John Carter

unread,
Apr 11, 2013, 11:07:55 PM4/11/13
to rub...@googlegroups.com
Thanks for your reply...

Just had an opportunity to get back to this and update.

Didn't help unfortunately.

However I have just spotted something in the new log output about _shrinking_ the stack, I wonder if the two matters are related?
D/dalvikvm(10679): GC_FOR_MALLOC freed 1304K, 22% free 15108K/19143K, external 24K/520K, paused 183ms
D/dalvikvm(10679): GC_FOR_MALLOC freed 1629K, 22% free 15447K/19655K, external 24K/520K, paused 178ms
I/dalvikvm(10679): threadid=9: stack overflow on call to Lorg/joni/ScannerSupport;.peek:I
I/dalvikvm(10679):   method requires 20+20+16=56 bytes, fp is 0x455dc32c (44 left)
I/dalvikvm(10679):   expanding stack end (0x455dc300 to 0x455dc000)
I/dalvikvm(10679): Shrank stack (to 0x455dc300, curFrame is 0x455dd348)
I/System.out(10679): LoadError: load error: uri/common -- java.lang.StackOverflowError: null
I/System.out(10679):   require at org/jruby/RubyKernel.java:1027
I/System.out(10679):   require at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36
I/System.out(10679):    (root) at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/1.9/uri.rb:104
I/System.out(10679):   require at org/jruby/RubyKernel.java:1027
I/System.out(10679):    (root) at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1
I/System.out(10679):   require at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36
I/System.out(10679):   require at org/jruby/RubyKernel.java:1027
I/System.out(10679):    (root) at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/1.9/net/http.rb:23
I/System.out(10679):    (root) at jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1
W/dalvikvm(10679): threadid=9: thread exiting with uncaught exception (group=0x4001d5a0)
E/AndroidRuntime(10679): FATAL EXCEPTION: Thread-12
E/AndroidRuntime(10679): org.jruby.embed.EvalFailedException: (LoadError) load error: uri/common -- java.lang.StackOverflowError: null
E/AndroidRuntime(10679):     at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:133)
E/AndroidRuntime(10679):     at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1264)
E/AndroidRuntime(10679):     at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1257)
E/AndroidRuntime(10679):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(10679):     at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(10679):     at org.ruboto.JRubyAdapter.runScriptlet(JRubyAdapter.java:213)
E/AndroidRuntime(10679):     at org.ruboto.ScriptLoader$1.run(ScriptLoader.java:82)
E/AndroidRuntime(10679):     at java.lang.Thread.run(Thread.java:1027)
E/AndroidRuntime(10679): Caused by: org.jruby.exceptions.RaiseException: (LoadError) load error: uri/common -- java.lang.StackOverflowError: null
E/AndroidRuntime(10679):     at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
E/AndroidRuntime(10679):     at RUBY.require(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
E/AndroidRuntime(10679):     at RUBY.(root)(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/1.9/uri.rb:104)
E/AndroidRuntime(10679):     at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
E/AndroidRuntime(10679):     at RUBY.(root)(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1)
E/AndroidRuntime(10679):     at RUBY.require(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
E/AndroidRuntime(10679):     at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
E/AndroidRuntime(10679):     at RUBY.(root)(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/1.9/net/http.rb:23)
E/AndroidRuntime(10679):     at RUBY.(root)(jar:file:/data/app/org.ruboto.core-1.apk!/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:1)
W/ActivityManager( 1338):   Force finishing activity org.ruboto.example.gps/.GpsActivity
D/StatusBarPolicy( 1421): onSignalStrengthsChanged
W/ActivityManager( 1338): Activity pause timeout for HistoryRecord{40ac6178 org.ruboto.example.gps/.GpsActivity}
D/Sensors ( 1338): Enable akm: en = 0

donV

unread,
Apr 20, 2013, 8:46:07 PM4/20/13
to rub...@googlegroups.com
Hi John!

Did you try this with Ruboto 0.11.0 ?

Reply all
Reply to author
Forward
0 new messages