-
-
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
Backtrace in ArgumentError is wrong sometimes #3624
Comments
seems like another AR-JDBC incompatibility with Rails master ... the schema definition is passed wrong number of args? |
The incompatability isn't the jruby bug, that part I have fixed. The bug is that the backtrace points to a line that doesn't exist in AR. |
This looks like it's running with |
There's a backtrace below that one without |
I experience the same problem with, in my case, a TypeError pointing to the wrong place. Not related to Rails or activerecord, it's purely my own code
The interesting bit is that the line reported in execution_engine.rb is the same than the line in event_generator.rb. The latter makes sense, the former is idiotic (the line points to a attr_reader definition, miles away from the process_events_synchronous method). One can find the same pattern in the gist from @jensnockert: the next-to-last file/line is good, the last line makes no sense and reports the same line number than next-to-last. Tested on jruby 9.0.5.0. I'm installing 9.0.3.0 to see if there's the same issue there. |
FYI, jruby 9.0.3.0 has the same issue |
More precisely,
Both installed using rbenv |
Some more information: the exception in my case is caused by JRuby when calling the method itself (process_events_synchronous), while checking the keyword args. The call is IMO legit, i.e. the exception is probably raised within JRuby's own code, but we'll see about that here From the point of view of this issue, it looks like the line number is not updated properly when resolving a call, while the file is (the file is the file of the called method, the line number the line number of the call site). This hunch comes from the full backtrace in my case:
|
there's no reproduction case here thus if smone is experiencing the issue (on latest 9.1) please include code |
Yeah I have personally fixed some line number issues since the last update but without something we can run to repro this issue is just languishing. So if someone can make a repro we can sink our teeth into then re-open or create a new issue. |
This is on
jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa Java HotSpot(TM) 64-Bit Server VM 24.79-b02 on 1.7.0_79-b15 +jit [darwin-x86_64]
I can't say what exactly is wrong except that the last frame in the Ruby-only trace is wrong, or what is triggering it. My feeling is that the method name and arity message is correct, and that the last frame is just wrong filename/line number. But since it is inside ActiveRecord (which has internals I'm not confident with) I can't say for sure if anything else is wrong.
https://gist.github.com/jensnockert/078e74541c6d50989ce8
The text was updated successfully, but these errors were encountered: