How do I start to attack this error?

Hi,

I’m running into a jruby error on some code that previously ran fine on
MRI (some changes made but nothing major, definitely looks jruby
related).

It’s the seeds.rb file of an app setting up a DB using DataMapper. Sorry
for posting a lof of info below, put in what I thought should be enough
for someone to give me a nudge in the right direction.

It’s not complete but should be enough to get a sense for what direction
I should take in trying to sort this out. This is on Windows. Will try
to run it on Linux to see if it shows same thing or different.

Thanks

print “Create market infos in memory…\n”

create market infos in memory

market_infos_attrs = [{:symbol => “BO”, :exchange_symbol =>
exchanges[0].symbol, :currency_symbol => ccys[2].symbol,

                    :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                    :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 1,

                    :options_min_tick_size_denominator => 2,

:raw_settles_currency_symbol => ccys[0].symbol},

                  {:symbol => "C", :exchange_symbol =>

exchanges[0].symbol, :currency_symbol => ccys[1].symbol,

                   :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                   :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 4,

                   :options_min_tick_size_denominator => 8,

:raw_settles_currency_symbol => ccys[0].symbol},

                 ]

market_infos = []

market_infos_attrs.each do |attrs|

market_infos << MarketInfo.new(attrs)

end

print “Seed vol models…\n”

vol models

vol_models = []

market_infos.each do |mi|

vol_models << VannaVolgaVolModel.create(:name => “vanna_volga
#{mi.symbol}”, :delta_of_strikes => 20)

end

print “Seed pricing models…\n”

pricing models

pricing_models = []

market_infos.each do |mi|

pricing_models << Bs76Pricer.create(:name => “bs76 #{mi.symbol}”)

end

print “Seed valuation models and save market infos…\n”

valuation models

fvm = FuturesValuationModel.create(:name => “futures_valuation_model
generic”)

valuation_models = []

i = 0

market_infos.each do |mi|

p mi

vm = VvBsValuationModel.create(:name => “vv_bs_valuation_model
#{mi.symbol}”,

                               :vanna_volga_vol_model_id =>

vol_models[i].id,

                               :bs76_pricer_id =>

pricing_models[i].id)

p vm

valuation_models << vm

mi.default_option_valuation_model = vm

mi.default_futures_valuation_model = fvm

mi.save

p mi

i += 1

end

Output:

Seed pricing models…

Seed valuation models and save market infos…

#<MarketInfo @symbol=“BO” @futures_expiration_daterule="+14d-1b"
@futures_first_notice_daterule="-1b"
@option_expiration_daterule="-2b-1E-0b" @option_expiration_time=nil
@futures_min_tick_size_denominator=“1”
@options_min_tick_size_denominator=“2” @price_unit=nil @created_at=nil
@update_at=nil @default_option_valuation_model_class=nil
@default_option_valuation_model_id=nil
@default_futures_valuation_model_class=nil
@default_futures_valuation_model_id=nil @currency_symbol=“USt”
@currency_yield_curve_model_id=nil @raw_settles_currency_symbol=“USD”
@raw_settles_currency_yield_curve_model_id=nil
@raw_settles_currency_id=nil @exchange_symbol=“CBT”
@futures_valuation_model_id=nil>

DummyDynamicScope.java:49:in `getBackRef’: java.lang.RuntimeException:
DummyDynamicScope should never be used for backref storage

    from RubyRegexp.java:1404:in `updateBackRef'

    from RubyRegexp.java:1396:in `updateBackRef'

    from RubyRegexp.java:1386:in `search'

    from RubyRegexp.java:1301:in `op_match'

    from RubyString.java:1446:in `op_match'

    from

org/jruby/RubyString$i_method_1_0$RUBYINVOKER$op_match.gen:-1:in `call’

    from JavaMethod.java:721:in `call'

    from RubyClass.java:472:in `finvoke'

    from RubyObject.java:1442:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:276:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from numeric_validator.rb:65:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:102:in `call'

    from DefaultMethod.java:144:in `call'

    from CachingCallSite.java:280:in `cacheAndCall'

    from CachingCallSite.java:69:in `call'

    from FCallManyArgsNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:229:in `call'

    from DefaultMethod.java:193:in `call'

    from RubyClass.java:491:in `finvoke'

    from RubyObject.java:1448:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:293:in `call'

    from CachingCallSite.java:350:in `cacheAndCall'

    from CachingCallSite.java:229:in `call'

    from numeric_validator.rb:59:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:221:in `call'

    from DefaultMethod.java:201:in `call'

    from CachingCallSite.java:227:in `call'

    from FCallThreeArgNode.java:40:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from contextual_validators.rb:58:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from Block.java:194:in `yield'

    from RubyEnumerable.java:627:in `call'

    from CallBlock.java:78:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from RubyClass.java:432:in `finvoke'

    from RuntimeHelpers.java:390:in `invoke'

    from RubyEnumerable.java:70:in `callEach'

    from RubyEnumerable.java:624:in `collect'

    from

org/jruby/RubyEnumerable$s_method_0_0$RUBYFRAMEDINVOKER$collect.gen:-1:i
n `call’

    from CachingCallSite.java:116:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from contextual_validators.rb:57:in `__file__'

    from contextual_validators.rb:-1:in `__file__'

    from JittedMethod.java:187:in `call'

    from CachingCallSite.java:187:in `call'

    from dm-validations.rb:89:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from dm-validations.rb:60:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:912:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from resource.rb:1085:in `ensure_1$RUBY$__ensure___0'

    from resource.rb:1083:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from resource.rb:911:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:351:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:136:in `call'

    from SuperCallSite.java:300:in `cacheAndCall'

    from SuperCallSite.java:96:in `callBlock'

    from SuperCallSite.java:101:in `call'

    from dm-validations.rb:48:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from context.rb:30:in `ensure_1$RUBY$__ensure___0'

    from context.rb:29:in `__file__'

    from context.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from dm-validations.rb:48:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:43:in `__file__'

    from JittedMethod.java:119:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from CallOneArgNode.java:57:in `interpret'

    from DAsgnNode.java:110:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallSpecialArgNode.java:39:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from InterpretedMethod.java:192:in `call'

    from DefaultMethod.java:180:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:163:in `call'

    from CallOneArgBlockNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:305:in `yield'

    from BlockBody.java:72:in `call'

    from BlockBody.java:78:in `call'

    from Block.java:89:in `call'

    from RubyProc.java:221:in `call'

    from RubyProc.java:204:in `call'

    from

org/jruby/RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.gen:-1:in `call’

    from JavaMethod.java:627:in `call'

    from DynamicMethod.java:184:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from CallTwoArgNode.java:59:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from CaseNode.java:138:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from AliasMethod.java:81:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:210:in `call'

    from DefaultMethod.java:185:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from FCallTwoArgNode.java:38:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:119:in `interpret'

    from IfNode.java:119:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from VCallNode.java:85:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallNoArgNode.java:61:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from rake:19:in `__file__'

    from rake:-1:in `load'

    from Ruby.java:628:in `runScript'

    from Ruby.java:550:in `runNormally'

    from Ruby.java:396:in `runFromMain'

    from Main.java:272:in `run'

    from Main.java:117:in `run'

    from Main.java:97:in `main'

That seems to be what I get consistently from a command prompt on
Windows. Under a cygwin prompt I get some semi-random crashes. One
output from such is this:

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04df01c8, pid=4624,

tid=8132

JRE version: 6.0_17-b04

Java VM: Java HotSpot™ Client VM (14.3-b01 mixed mode windows-x86 )

Problematic frame:

C 0x04df01c8

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x00a86c00): JavaThread “main” [_thread_in_native,
id=8132, stack(0x00030000,0x00230000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

EIP=0x04df01c8, EFLAGS=0x00010202

Top of Stack: (sp=0x00229504)

Top of Stack: (sp=0x00229504)

0x00229504: 04e4149a 00000000 003ec710 0688eec6

0x00229514: 00000000 04ef4fdc 00000000 068ea008

0x00229524: 00000000 00000000 003ec590 04e50f71

0x00229534: 04df01c8 00000000 00000000 003ec590

0x00229544: 00000000 00000001 0000001b 00000002

0x00229554: 00000000 000000dc 0688eec6 00000000

0x00229564: 00000000 00000000 000007a8 04ef4fdc

0x00229574: 0688eec6 003ec590 04e5aea2 04ef4fdc

Instructions: (pc=0x04df01c8)

0x04df01b8: b8 c7 89 06 00 1f e4 67 b0 c7 89 06 21 00 00 00

0x04df01c8: a4 a0 e4 67 a4 a0 e4 67 05 63 00 00 00 00 00 00

Stack: [0x00030000,0x00230000], sp=0x00229504, free space=2021k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)

C 0x04df01c8

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

j
com.kenai.jffi.Foreign.invokeArrayO1Int32(J[BLjava/lang/Object;III)I+0

j
com.kenai.jffi.Invoker.invokeArrayWithObjectsInt32(Lcom/kenai/jffi/Funct
ion;Lcom/kenai/jffi/HeapInvocationBuffer;Lcom/kenai/jffi/ObjectBuffer;)I
+76

j
com.kenai.jffi.Invoker.invokeInt(Lcom/kenai/jffi/Function;Lcom/kenai/jff
i/HeapInvocationBuffer;)I+13

j
com.kenai.jffi.Invoker$ILP32.invokeAddress(Lcom/kenai/jffi/Function;Lcom
/kenai/jffi/HeapInvocationBuffer;)J+3

j
org.jruby.ext.ffi.jffi.DefaultMethodFactory$PointerInvoker.invoke(Lorg/j
ruby/Ruby;Lcom/kenai/jffi/Function;Lcom/kenai/jffi/HeapInvocationBuffer;
)Lorg/jruby/runtime/builtin/IRubyObject;+5

j
org.jruby.ext.ffi.jffi.DefaultMethod.call(Lorg/jruby/runtime/ThreadConte
xt;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/la
ng/String;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Blo
ck;)Lorg/jruby/runtime/builtin/IRubyObject;+95

j
org.jruby.internal.runtime.methods.DynamicMethod.call(Lorg/jruby/runtime
/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyMod
ule;Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jrub
y/runtime/builtin/IRubyObject;+11

J
org.jruby.runtime.callsite.CachingCallSite.call(Lorg/jruby/runtime/Threa
dContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/built
in/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runti
me/builtin/IRubyObject;

j
org.jruby.ast.CallManyArgsNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runt
ime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runt
ime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+41

J
org.jruby.ast.NewlineNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/T
hreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/B
lock;)Lorg/jruby/runtime/builtin/IRubyObject;

J
org.jruby.runtime.InterpretedBlock.evalBlockBody(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/bui
ltin/IRubyObject;

j
org.jruby.runtime.InterpretedBlock.yield(Lorg/jruby/runtime/ThreadContex
t;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg/jruby/r
untime/builtin/IRubyObject;+53

j
org.jruby.runtime.InterpretedBlock.yieldSpecific(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg
/jruby/runtime/builtin/IRubyObject;+4

j
org.jruby.runtime.Block.yieldSpecific(Lorg/jruby/runtime/ThreadContext;)
Lorg/jruby/runtime/builtin/IRubyObject;+13

j
org.jruby.ast.ZYieldNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/Th
readContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Bl
ock;)Lorg/jruby/runtime/builtin/IRubyObject;+8

(I can provide more levels if of any interest)

######################################################################
The information contained in this communication is confidential and
intended only for the individual(s) named above. If you are not a named
addressee, please notify the sender immediately and delete this email
from your system. The views expressed in this email are the views of
the author and do not necessarily represent the views of Millennium
Capital Partners LLP (MCP LLP) or any of its affiliates. Outgoing
and incoming electronic communications of MCP LLP and its affiliates,
including telephone communications, may be electronically archived and
subject to review and/or disclosure to someone other than the recipient.
MCP LLP is authorised and regulated by the Financial Services Authority.
######################################################################

I tried this on master and still no cigar for my case. However, it’s not
failing in the same way on master, and what fails on master passes on
1.4.0 so between the two I should be able to get there :slight_smile:

I’ve managed to get it down to a smaller example that I believe fails
for similar reasons as my real code.

This is the example:
1 require ‘rubygems’
2 require ‘dm-core’
3 require ‘dm-constraints’
4 require ‘dm-polymorphic’
5 require ‘active_support’
6
7 class Effect
8 include DataMapper::Resource
9 property :id, Serial
10 is :polymorphic, :child, String
11 end
12
13 class A
14 include DataMapper::Resource
15 property :name, String, :key => true
16 has 1, :effect, :polymorphically => :child
17 end

N:\local-dev\bug>pik use 140

N:\local-dev\bug>jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java
HotSpot™ Client VM 1.6.0_17) [x86-java]

N:\local-dev\bug>jruby bug.rb

N:\local-dev\bug>pik use 150

N:\local-dev\bug>jruby -v
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-01-14 65e392a) (Java
HotSpot™ Client VM 1.6.0_17) [x86-java]

N:\local-dev\bug>jruby bug.rb
c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:264:in
execute_before_has_nan_hook_stack': compared with non class/module (TypeError) from c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:305:inhas’
from
c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:304:in
catch' from c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:304:inhas’
from bug.rb:16

Remove the require on dm-constraints and it runs fine on master.

Haven’t filed a ticket for it - worth doing?

On Thu, Jan 14, 2010 at 9:59 AM, Sundberg, Patrik
[email protected] wrote:

 6
 17 end
If you can come up with a version that doesn’t require DM or AS (and
only needs extlib) that would be best, but this is pretty good.

N:\local-dev\bug>jruby bug.rb
c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:264:in execute_before_has_nan_hook_stack': compared with non class/module (TypeError) Â Â Â Â from c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:305:inhas’
    from c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:304:in catch'     from c:/jruby-1.5.0.dev/lib/ruby/gems/1.8/gems/extlib-0.9.14/lib/extlib/hook.rb:304:inhas’
    from bug.rb:16

Remove the require on dm-constraints and it runs fine on master.

Haven’t filed a ticket for it - worth doing?

Yup, go for it :slight_smile:

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Got my linux setup sorted - same error on that setup for what it’s
worth.

I also forgot to put in that this is on jruby 1.4.0


From: Sundberg, Patrik
Sent: 13 January 2010 18:27
To: ‘[email protected]
Subject: How do I start to attack this error?

Hi,

I’m running into a jruby error on some code that previously ran fine on
MRI (some changes made but nothing major, definitely looks jruby
related).

It’s the seeds.rb file of an app setting up a DB using DataMapper. Sorry
for posting a lof of info below, put in what I thought should be enough
for someone to give me a nudge in the right direction.

It’s not complete but should be enough to get a sense for what direction
I should take in trying to sort this out. This is on Windows. Will try
to run it on Linux to see if it shows same thing or different.

Thanks

print “Create market infos in memory…\n”

create market infos in memory

market_infos_attrs = [{:symbol => “BO”, :exchange_symbol =>
exchanges[0].symbol, :currency_symbol => ccys[2].symbol,

                    :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                    :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 1,

                    :options_min_tick_size_denominator => 2,

:raw_settles_currency_symbol => ccys[0].symbol},

                  {:symbol => "C", :exchange_symbol =>

exchanges[0].symbol, :currency_symbol => ccys[1].symbol,

                   :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                   :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 4,

                   :options_min_tick_size_denominator => 8,

:raw_settles_currency_symbol => ccys[0].symbol},

                 ]

market_infos = []

market_infos_attrs.each do |attrs|

market_infos << MarketInfo.new(attrs)

end

print “Seed vol models…\n”

vol models

vol_models = []

market_infos.each do |mi|

vol_models << VannaVolgaVolModel.create(:name => “vanna_volga
#{mi.symbol}”, :delta_of_strikes => 20)

end

print “Seed pricing models…\n”

pricing models

pricing_models = []

market_infos.each do |mi|

pricing_models << Bs76Pricer.create(:name => “bs76 #{mi.symbol}”)

end

print “Seed valuation models and save market infos…\n”

valuation models

fvm = FuturesValuationModel.create(:name => “futures_valuation_model
generic”)

valuation_models = []

i = 0

market_infos.each do |mi|

p mi

vm = VvBsValuationModel.create(:name => “vv_bs_valuation_model
#{mi.symbol}”,

                               :vanna_volga_vol_model_id =>

vol_models[i].id,

                               :bs76_pricer_id =>

pricing_models[i].id)

p vm

valuation_models << vm

mi.default_option_valuation_model = vm

mi.default_futures_valuation_model = fvm

mi.save

p mi

i += 1

end

Output:

Seed pricing models…

Seed valuation models and save market infos…

#<MarketInfo @symbol=“BO” @futures_expiration_daterule="+14d-1b"
@futures_first_notice_daterule="-1b"
@option_expiration_daterule="-2b-1E-0b" @option_expiration_time=nil
@futures_min_tick_size_denominator=“1”
@options_min_tick_size_denominator=“2” @price_unit=nil @created_at=nil
@update_at=nil @default_option_valuation_model_class=nil
@default_option_valuation_model_id=nil
@default_futures_valuation_model_class=nil
@default_futures_valuation_model_id=nil @currency_symbol=“USt”
@currency_yield_curve_model_id=nil @raw_settles_currency_symbol=“USD”
@raw_settles_currency_yield_curve_model_id=nil
@raw_settles_currency_id=nil @exchange_symbol=“CBT”
@futures_valuation_model_id=nil>

DummyDynamicScope.java:49:in `getBackRef’: java.lang.RuntimeException:
DummyDynamicScope should never be used for backref storage

    from RubyRegexp.java:1404:in `updateBackRef'

    from RubyRegexp.java:1396:in `updateBackRef'

    from RubyRegexp.java:1386:in `search'

    from RubyRegexp.java:1301:in `op_match'

    from RubyString.java:1446:in `op_match'

    from

org/jruby/RubyString$i_method_1_0$RUBYINVOKER$op_match.gen:-1:in `call’

    from JavaMethod.java:721:in `call'

    from RubyClass.java:472:in `finvoke'

    from RubyObject.java:1442:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:276:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from numeric_validator.rb:65:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:102:in `call'

    from DefaultMethod.java:144:in `call'

    from CachingCallSite.java:280:in `cacheAndCall'

    from CachingCallSite.java:69:in `call'

    from FCallManyArgsNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:229:in `call'

    from DefaultMethod.java:193:in `call'

    from RubyClass.java:491:in `finvoke'

    from RubyObject.java:1448:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:293:in `call'

    from CachingCallSite.java:350:in `cacheAndCall'

    from CachingCallSite.java:229:in `call'

    from numeric_validator.rb:59:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:221:in `call'

    from DefaultMethod.java:201:in `call'

    from CachingCallSite.java:227:in `call'

    from FCallThreeArgNode.java:40:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from contextual_validators.rb:58:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from Block.java:194:in `yield'

    from RubyEnumerable.java:627:in `call'

    from CallBlock.java:78:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from RubyClass.java:432:in `finvoke'

    from RuntimeHelpers.java:390:in `invoke'

    from RubyEnumerable.java:70:in `callEach'

    from RubyEnumerable.java:624:in `collect'

    from

org/jruby/RubyEnumerable$s_method_0_0$RUBYFRAMEDINVOKER$collect.gen:-1:i
n `call’

    from CachingCallSite.java:116:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from contextual_validators.rb:57:in `__file__'

    from contextual_validators.rb:-1:in `__file__'

    from JittedMethod.java:187:in `call'

    from CachingCallSite.java:187:in `call'

    from dm-validations.rb:89:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from dm-validations.rb:60:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:912:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from resource.rb:1085:in `ensure_1$RUBY$__ensure___0'

    from resource.rb:1083:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from resource.rb:911:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:351:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:136:in `call'

    from SuperCallSite.java:300:in `cacheAndCall'

    from SuperCallSite.java:96:in `callBlock'

    from SuperCallSite.java:101:in `call'

    from dm-validations.rb:48:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from context.rb:30:in `ensure_1$RUBY$__ensure___0'

    from context.rb:29:in `__file__'

    from context.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from dm-validations.rb:48:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:43:in `__file__'

    from JittedMethod.java:119:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from CallOneArgNode.java:57:in `interpret'

    from DAsgnNode.java:110:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallSpecialArgNode.java:39:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from InterpretedMethod.java:192:in `call'

    from DefaultMethod.java:180:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:163:in `call'

    from CallOneArgBlockNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:305:in `yield'

    from BlockBody.java:72:in `call'

    from BlockBody.java:78:in `call'

    from Block.java:89:in `call'

    from RubyProc.java:221:in `call'

    from RubyProc.java:204:in `call'

    from

org/jruby/RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.gen:-1:in `call’

    from JavaMethod.java:627:in `call'

    from DynamicMethod.java:184:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from CallTwoArgNode.java:59:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from CaseNode.java:138:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from AliasMethod.java:81:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:210:in `call'

    from DefaultMethod.java:185:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from FCallTwoArgNode.java:38:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:119:in `interpret'

    from IfNode.java:119:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from VCallNode.java:85:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallNoArgNode.java:61:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from rake:19:in `__file__'

    from rake:-1:in `load'

    from Ruby.java:628:in `runScript'

    from Ruby.java:550:in `runNormally'

    from Ruby.java:396:in `runFromMain'

    from Main.java:272:in `run'

    from Main.java:117:in `run'

    from Main.java:97:in `main'

That seems to be what I get consistently from a command prompt on
Windows. Under a cygwin prompt I get some semi-random crashes. One
output from such is this:

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04df01c8, pid=4624,

tid=8132

JRE version: 6.0_17-b04

Java VM: Java HotSpot™ Client VM (14.3-b01 mixed mode windows-x86 )

Problematic frame:

C 0x04df01c8

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x00a86c00): JavaThread “main” [_thread_in_native,
id=8132, stack(0x00030000,0x00230000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

EIP=0x04df01c8, EFLAGS=0x00010202

Top of Stack: (sp=0x00229504)

Top of Stack: (sp=0x00229504)

0x00229504: 04e4149a 00000000 003ec710 0688eec6

0x00229514: 00000000 04ef4fdc 00000000 068ea008

0x00229524: 00000000 00000000 003ec590 04e50f71

0x00229534: 04df01c8 00000000 00000000 003ec590

0x00229544: 00000000 00000001 0000001b 00000002

0x00229554: 00000000 000000dc 0688eec6 00000000

0x00229564: 00000000 00000000 000007a8 04ef4fdc

0x00229574: 0688eec6 003ec590 04e5aea2 04ef4fdc

Instructions: (pc=0x04df01c8)

0x04df01b8: b8 c7 89 06 00 1f e4 67 b0 c7 89 06 21 00 00 00

0x04df01c8: a4 a0 e4 67 a4 a0 e4 67 05 63 00 00 00 00 00 00

Stack: [0x00030000,0x00230000], sp=0x00229504, free space=2021k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)

C 0x04df01c8

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

j
com.kenai.jffi.Foreign.invokeArrayO1Int32(J[BLjava/lang/Object;III)I+0

j
com.kenai.jffi.Invoker.invokeArrayWithObjectsInt32(Lcom/kenai/jffi/Funct
ion;Lcom/kenai/jffi/HeapInvocationBuffer;Lcom/kenai/jffi/ObjectBuffer;)I
+76

j
com.kenai.jffi.Invoker.invokeInt(Lcom/kenai/jffi/Function;Lcom/kenai/jff
i/HeapInvocationBuffer;)I+13

j
com.kenai.jffi.Invoker$ILP32.invokeAddress(Lcom/kenai/jffi/Function;Lcom
/kenai/jffi/HeapInvocationBuffer;)J+3

j
org.jruby.ext.ffi.jffi.DefaultMethodFactory$PointerInvoker.invoke(Lorg/j
ruby/Ruby;Lcom/kenai/jffi/Function;Lcom/kenai/jffi/HeapInvocationBuffer;
)Lorg/jruby/runtime/builtin/IRubyObject;+5

j
org.jruby.ext.ffi.jffi.DefaultMethod.call(Lorg/jruby/runtime/ThreadConte
xt;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/la
ng/String;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Blo
ck;)Lorg/jruby/runtime/builtin/IRubyObject;+95

j
org.jruby.internal.runtime.methods.DynamicMethod.call(Lorg/jruby/runtime
/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyMod
ule;Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jrub
y/runtime/builtin/IRubyObject;+11

J
org.jruby.runtime.callsite.CachingCallSite.call(Lorg/jruby/runtime/Threa
dContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/built
in/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runti
me/builtin/IRubyObject;

j
org.jruby.ast.CallManyArgsNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runt
ime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runt
ime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+41

J
org.jruby.ast.NewlineNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/T
hreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/B
lock;)Lorg/jruby/runtime/builtin/IRubyObject;

J
org.jruby.runtime.InterpretedBlock.evalBlockBody(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/bui
ltin/IRubyObject;

j
org.jruby.runtime.InterpretedBlock.yield(Lorg/jruby/runtime/ThreadContex
t;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg/jruby/r
untime/builtin/IRubyObject;+53

j
org.jruby.runtime.InterpretedBlock.yieldSpecific(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg
/jruby/runtime/builtin/IRubyObject;+4

j
org.jruby.runtime.Block.yieldSpecific(Lorg/jruby/runtime/ThreadContext;)
Lorg/jruby/runtime/builtin/IRubyObject;+13

j
org.jruby.ast.ZYieldNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/Th
readContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Bl
ock;)Lorg/jruby/runtime/builtin/IRubyObject;+8

(I can provide more levels if of any interest)

######################################################################
The information contained in this communication is confidential and
intended only for the individual(s) named above. If you are not a named
addressee, please notify the sender immediately and delete this email
from your system. The views expressed in this email are the views of
the author and do not necessarily represent the views of Millennium
Capital Partners LLP (MCP LLP) or any of its affiliates. Outgoing
and incoming electronic communications of MCP LLP and its affiliates,
including telephone communications, may be electronically archived and
subject to review and/or disclosure to someone other than the recipient.
MCP LLP is authorised and regulated by the Financial Services Authority.
######################################################################

I’m being annoying - sorry. Found the ticket (could have sworn I
searched for the error message before but clearly not well enough).

http://jira.codehaus.org/browse/JRUBY-3765

I’ll try against master (as soon as I figure out how to set things up,
never done that before).


From: Sundberg, Patrik
Sent: 13 January 2010 18:35
To: ‘[email protected]
Subject: RE: How do I start to attack this error?

Got my linux setup sorted - same error on that setup for what it’s
worth.

I also forgot to put in that this is on jruby 1.4.0


From: Sundberg, Patrik
Sent: 13 January 2010 18:27
To: ‘[email protected]
Subject: How do I start to attack this error?

Hi,

I’m running into a jruby error on some code that previously ran fine on
MRI (some changes made but nothing major, definitely looks jruby
related).

It’s the seeds.rb file of an app setting up a DB using DataMapper. Sorry
for posting a lof of info below, put in what I thought should be enough
for someone to give me a nudge in the right direction.

It’s not complete but should be enough to get a sense for what direction
I should take in trying to sort this out. This is on Windows. Will try
to run it on Linux to see if it shows same thing or different.

Thanks

print “Create market infos in memory…\n”

create market infos in memory

market_infos_attrs = [{:symbol => “BO”, :exchange_symbol =>
exchanges[0].symbol, :currency_symbol => ccys[2].symbol,

                    :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                    :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 1,

                    :options_min_tick_size_denominator => 2,

:raw_settles_currency_symbol => ccys[0].symbol},

                  {:symbol => "C", :exchange_symbol =>

exchanges[0].symbol, :currency_symbol => ccys[1].symbol,

                   :futures_expiration_daterule => "+14d-1b",

:futures_first_notice_daterule => “-1b”,

                   :option_expiration_daterule => "-2b-1E-0b",

:futures_min_tick_size_denominator => 4,

                   :options_min_tick_size_denominator => 8,

:raw_settles_currency_symbol => ccys[0].symbol},

                 ]

market_infos = []

market_infos_attrs.each do |attrs|

market_infos << MarketInfo.new(attrs)

end

print “Seed vol models…\n”

vol models

vol_models = []

market_infos.each do |mi|

vol_models << VannaVolgaVolModel.create(:name => “vanna_volga
#{mi.symbol}”, :delta_of_strikes => 20)

end

print “Seed pricing models…\n”

pricing models

pricing_models = []

market_infos.each do |mi|

pricing_models << Bs76Pricer.create(:name => “bs76 #{mi.symbol}”)

end

print “Seed valuation models and save market infos…\n”

valuation models

fvm = FuturesValuationModel.create(:name => “futures_valuation_model
generic”)

valuation_models = []

i = 0

market_infos.each do |mi|

p mi

vm = VvBsValuationModel.create(:name => “vv_bs_valuation_model
#{mi.symbol}”,

                               :vanna_volga_vol_model_id =>

vol_models[i].id,

                               :bs76_pricer_id =>

pricing_models[i].id)

p vm

valuation_models << vm

mi.default_option_valuation_model = vm

mi.default_futures_valuation_model = fvm

mi.save

p mi

i += 1

end

Output:

Seed pricing models…

Seed valuation models and save market infos…

#<MarketInfo @symbol=“BO” @futures_expiration_daterule="+14d-1b"
@futures_first_notice_daterule="-1b"
@option_expiration_daterule="-2b-1E-0b" @option_expiration_time=nil
@futures_min_tick_size_denominator=“1”
@options_min_tick_size_denominator=“2” @price_unit=nil @created_at=nil
@update_at=nil @default_option_valuation_model_class=nil
@default_option_valuation_model_id=nil
@default_futures_valuation_model_class=nil
@default_futures_valuation_model_id=nil @currency_symbol=“USt”
@currency_yield_curve_model_id=nil @raw_settles_currency_symbol=“USD”
@raw_settles_currency_yield_curve_model_id=nil
@raw_settles_currency_id=nil @exchange_symbol=“CBT”
@futures_valuation_model_id=nil>

DummyDynamicScope.java:49:in `getBackRef’: java.lang.RuntimeException:
DummyDynamicScope should never be used for backref storage

    from RubyRegexp.java:1404:in `updateBackRef'

    from RubyRegexp.java:1396:in `updateBackRef'

    from RubyRegexp.java:1386:in `search'

    from RubyRegexp.java:1301:in `op_match'

    from RubyString.java:1446:in `op_match'

    from

org/jruby/RubyString$i_method_1_0$RUBYINVOKER$op_match.gen:-1:in `call’

    from JavaMethod.java:721:in `call'

    from RubyClass.java:472:in `finvoke'

    from RubyObject.java:1442:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:276:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from numeric_validator.rb:65:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:102:in `call'

    from DefaultMethod.java:144:in `call'

    from CachingCallSite.java:280:in `cacheAndCall'

    from CachingCallSite.java:69:in `call'

    from FCallManyArgsNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:229:in `call'

    from DefaultMethod.java:193:in `call'

    from RubyClass.java:491:in `finvoke'

    from RubyObject.java:1448:in `send'

    from

org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:-1:in `call’

    from JavaMethod.java:293:in `call'

    from CachingCallSite.java:350:in `cacheAndCall'

    from CachingCallSite.java:229:in `call'

    from numeric_validator.rb:59:in `__file__'

    from numeric_validator.rb:-1:in `__file__'

    from JittedMethod.java:221:in `call'

    from DefaultMethod.java:201:in `call'

    from CachingCallSite.java:227:in `call'

    from FCallThreeArgNode.java:40:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from contextual_validators.rb:58:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from Block.java:194:in `yield'

    from RubyEnumerable.java:627:in `call'

    from CallBlock.java:78:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from RubyClass.java:432:in `finvoke'

    from RuntimeHelpers.java:390:in `invoke'

    from RubyEnumerable.java:70:in `callEach'

    from RubyEnumerable.java:624:in `collect'

    from

org/jruby/RubyEnumerable$s_method_0_0$RUBYFRAMEDINVOKER$collect.gen:-1:i
n `call’

    from CachingCallSite.java:116:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from contextual_validators.rb:57:in `__file__'

    from contextual_validators.rb:-1:in `__file__'

    from JittedMethod.java:187:in `call'

    from CachingCallSite.java:187:in `call'

    from dm-validations.rb:89:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from dm-validations.rb:60:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:912:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from resource.rb:1085:in `ensure_1$RUBY$__ensure___0'

    from resource.rb:1083:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from resource.rb:911:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:153:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from resource.rb:351:in `__file__'

    from resource.rb:-1:in `__file__'

    from JittedMethod.java:136:in `call'

    from SuperCallSite.java:300:in `cacheAndCall'

    from SuperCallSite.java:96:in `callBlock'

    from SuperCallSite.java:101:in `call'

    from dm-validations.rb:48:in `block_0$RUBY$__block__'

    from null:-1:in `call'

    from CompiledBlock.java:105:in `yield'

    from CompiledBlock.java:78:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from context.rb:30:in `ensure_1$RUBY$__ensure___0'

    from context.rb:29:in `__file__'

    from context.rb:-1:in `__file__'

    from AbstractScript.java:47:in `__file__'

    from JittedMethod.java:170:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:173:in `callIter'

    from dm-validations.rb:48:in `__file__'

    from dm-validations.rb:-1:in `__file__'

    from AbstractScript.java:43:in `__file__'

    from JittedMethod.java:119:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from CallOneArgNode.java:57:in `interpret'

    from DAsgnNode.java:110:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallSpecialArgNode.java:39:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from InterpretedMethod.java:192:in `call'

    from DefaultMethod.java:180:in `call'

    from CachingCallSite.java:320:in `cacheAndCall'

    from CachingCallSite.java:158:in `callBlock'

    from CachingCallSite.java:163:in `call'

    from CallOneArgBlockNode.java:60:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from AliasMethod.java:61:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:305:in `yield'

    from BlockBody.java:72:in `call'

    from BlockBody.java:78:in `call'

    from Block.java:89:in `call'

    from RubyProc.java:221:in `call'

    from RubyProc.java:204:in `call'

    from

org/jruby/RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.gen:-1:in `call’

    from JavaMethod.java:627:in `call'

    from DynamicMethod.java:184:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from CallTwoArgNode.java:59:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from CaseNode.java:138:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from IfNode.java:117:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from EnsureNode.java:96:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from AliasMethod.java:81:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:210:in `call'

    from DefaultMethod.java:185:in `call'

    from CachingCallSite.java:330:in `cacheAndCall'

    from CachingCallSite.java:189:in `call'

    from FCallTwoArgNode.java:38:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallSpecialArgNode.java:65:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedMethod.java:173:in `call'

    from DefaultMethod.java:169:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from FCallOneArgNode.java:36:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:268:in `yield'

    from Block.java:194:in `yield'

    from RubyArray.java:1635:in `eachCommon'

    from RubyArray.java:1642:in `each'

    from

org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:-1:in `call’

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:123:in `call'

    from CallNoArgBlockNode.java:64:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from IfNode.java:119:in `interpret'

    from IfNode.java:119:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from VCallNode.java:85:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from InterpretedBlock.java:317:in `evalBlockBody'

    from InterpretedBlock.java:251:in `yield'

    from InterpretedBlock.java:185:in `yieldSpecific'

    from Block.java:99:in `yieldSpecific'

    from ZYieldNode.java:25:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from RescueNode.java:225:in `executeBody'

    from RescueNode.java:147:in `interpretWithJavaExceptions'

    from RescueNode.java:110:in `interpret'

    from BeginNode.java:83:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:155:in `call'

    from DefaultMethod.java:161:in `call'

    from CachingCallSite.java:300:in `cacheAndCall'

    from CachingCallSite.java:118:in `callBlock'

    from CachingCallSite.java:133:in `callIter'

    from FCallNoArgBlockNode.java:32:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from InterpretedMethod.java:136:in `call'

    from DefaultMethod.java:153:in `call'

    from CachingCallSite.java:290:in `cacheAndCall'

    from CachingCallSite.java:109:in `call'

    from CallNoArgNode.java:61:in `interpret'

    from NewlineNode.java:104:in `interpret'

    from BlockNode.java:71:in `interpret'

    from RootNode.java:129:in `interpret'

    from Ruby.java:2419:in `loadFile'

    from ExternalScript.java:64:in `load'

    from LoadService.java:249:in `load'

    from RubyKernel.java:932:in `load'

    from

org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:-1:in
`call’

    from DynamicMethod.java:180:in `call'

    from DynamicMethod.java:176:in `call'

    from CachingCallSite.java:310:in `cacheAndCall'

    from CachingCallSite.java:149:in `call'

    from rake:19:in `__file__'

    from rake:-1:in `load'

    from Ruby.java:628:in `runScript'

    from Ruby.java:550:in `runNormally'

    from Ruby.java:396:in `runFromMain'

    from Main.java:272:in `run'

    from Main.java:117:in `run'

    from Main.java:97:in `main'

That seems to be what I get consistently from a command prompt on
Windows. Under a cygwin prompt I get some semi-random crashes. One
output from such is this:

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04df01c8, pid=4624,

tid=8132

JRE version: 6.0_17-b04

Java VM: Java HotSpot™ Client VM (14.3-b01 mixed mode windows-x86 )

Problematic frame:

C 0x04df01c8

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x00a86c00): JavaThread “main” [_thread_in_native,
id=8132, stack(0x00030000,0x00230000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

EIP=0x04df01c8, EFLAGS=0x00010202

Top of Stack: (sp=0x00229504)

Top of Stack: (sp=0x00229504)

0x00229504: 04e4149a 00000000 003ec710 0688eec6

0x00229514: 00000000 04ef4fdc 00000000 068ea008

0x00229524: 00000000 00000000 003ec590 04e50f71

0x00229534: 04df01c8 00000000 00000000 003ec590

0x00229544: 00000000 00000001 0000001b 00000002

0x00229554: 00000000 000000dc 0688eec6 00000000

0x00229564: 00000000 00000000 000007a8 04ef4fdc

0x00229574: 0688eec6 003ec590 04e5aea2 04ef4fdc

Instructions: (pc=0x04df01c8)

0x04df01b8: b8 c7 89 06 00 1f e4 67 b0 c7 89 06 21 00 00 00

0x04df01c8: a4 a0 e4 67 a4 a0 e4 67 05 63 00 00 00 00 00 00

Stack: [0x00030000,0x00230000], sp=0x00229504, free space=2021k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)

C 0x04df01c8

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

j
com.kenai.jffi.Foreign.invokeArrayO1Int32(J[BLjava/lang/Object;III)I+0

j
com.kenai.jffi.Invoker.invokeArrayWithObjectsInt32(Lcom/kenai/jffi/Funct
ion;Lcom/kenai/jffi/HeapInvocationBuffer;Lcom/kenai/jffi/ObjectBuffer;)I
+76

j
com.kenai.jffi.Invoker.invokeInt(Lcom/kenai/jffi/Function;Lcom/kenai/jff
i/HeapInvocationBuffer;)I+13

j
com.kenai.jffi.Invoker$ILP32.invokeAddress(Lcom/kenai/jffi/Function;Lcom
/kenai/jffi/HeapInvocationBuffer;)J+3

j
org.jruby.ext.ffi.jffi.DefaultMethodFactory$PointerInvoker.invoke(Lorg/j
ruby/Ruby;Lcom/kenai/jffi/Function;Lcom/kenai/jffi/HeapInvocationBuffer;
)Lorg/jruby/runtime/builtin/IRubyObject;+5

j
org.jruby.ext.ffi.jffi.DefaultMethod.call(Lorg/jruby/runtime/ThreadConte
xt;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/la
ng/String;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Blo
ck;)Lorg/jruby/runtime/builtin/IRubyObject;+95

j
org.jruby.internal.runtime.methods.DynamicMethod.call(Lorg/jruby/runtime
/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyMod
ule;Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jrub
y/runtime/builtin/IRubyObject;+11

J
org.jruby.runtime.callsite.CachingCallSite.call(Lorg/jruby/runtime/Threa
dContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/built
in/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runti
me/builtin/IRubyObject;

j
org.jruby.ast.CallManyArgsNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runt
ime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runt
ime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;+41

J
org.jruby.ast.NewlineNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/T
hreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/B
lock;)Lorg/jruby/runtime/builtin/IRubyObject;

J
org.jruby.runtime.InterpretedBlock.evalBlockBody(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/bui
ltin/IRubyObject;

j
org.jruby.runtime.InterpretedBlock.yield(Lorg/jruby/runtime/ThreadContex
t;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg/jruby/r
untime/builtin/IRubyObject;+53

j
org.jruby.runtime.InterpretedBlock.yieldSpecific(Lorg/jruby/runtime/Thre
adContext;Lorg/jruby/runtime/Binding;Lorg/jruby/runtime/Block$Type;)Lorg
/jruby/runtime/builtin/IRubyObject;+4

j
org.jruby.runtime.Block.yieldSpecific(Lorg/jruby/runtime/ThreadContext;)
Lorg/jruby/runtime/builtin/IRubyObject;+13

j
org.jruby.ast.ZYieldNode.interpret(Lorg/jruby/Ruby;Lorg/jruby/runtime/Th
readContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Bl
ock;)Lorg/jruby/runtime/builtin/IRubyObject;+8

(I can provide more levels if of any interest)

######################################################################
The information contained in this communication is confidential and
intended only for the individual(s) named above. If you are not a named
addressee, please notify the sender immediately and delete this email
from your system. The views expressed in this email are the views of
the author and do not necessarily represent the views of Millennium
Capital Partners LLP (MCP LLP) or any of its affiliates. Outgoing
and incoming electronic communications of MCP LLP and its affiliates,
including telephone communications, may be electronically archived and
subject to review and/or disclosure to someone other than the recipient.
MCP LLP is authorised and regulated by the Financial Services Authority.
######################################################################

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs