Skip to content
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

JRuby-Head, Rails 4.1.9, and Sass 3.4.13 throws bad value for range #2786

Closed
Ch4s3 opened this issue Mar 31, 2015 · 13 comments
Closed

JRuby-Head, Rails 4.1.9, and Sass 3.4.13 throws bad value for range #2786

Ch4s3 opened this issue Mar 31, 2015 · 13 comments
Assignees
Labels

Comments

@Ch4s3
Copy link

Ch4s3 commented Mar 31, 2015

This happens on head but not on 9k-pre1.

ActiveRecord::SchemaMigration Load (2.0ms)  SELECT "schema_migrations".* FROM "schema_migrations"
/Users/chase/.rvm/gems/jruby-head/gems/activemodel-4.1.9/lib/active_model/validations/confirmation.rb:19: warning: private attribute?
  User Load (4.0ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = 2 LIMIT 1
method=GET path=/ format=html controller=dashboard action=index status=500 error='ActionView::Template::Error:bad value for range
  (in /Users/chase/code/athene/app/assets/stylesheets/application.scss)' duration=2002.00

ArgumentError - bad value for range
  (in /Users/chase/code/athene/app/assets/stylesheets/application.scss):
  sass (3.4.13) lib/sass/scss/parser.rb:1192:in `tok'
  sass (3.4.13) lib/sass/scss/parser.rb:124:in `s'
  sass (3.4.13) lib/sass/scss/parser.rb:117:in `block in stylesheet'
  sass (3.4.13) lib/sass/scss/parser.rb:649:in `block_contents'
  sass (3.4.13) lib/sass/scss/parser.rb:117:in `stylesheet'
  sass (3.4.13) lib/sass/scss/parser.rb:42:in `parse'
  sass (3.4.13) lib/sass/engine.rb:393:in `_to_tree'
  sass (3.4.13) lib/sass/engine.rb:299:in `to_tree'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:323:in `block in visit_import'
  sass (3.4.13) lib/sass/stack.rb:88:in `block in with_import'
  sass (3.4.13) lib/sass/stack.rb:115:in `with_frame'
  sass (3.4.13) lib/sass/stack.rb:88:in `with_import'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:322:in `visit_import'
  sass (3.4.13) lib/sass/tree/visitors/base.rb:36:in `visit'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:158:in `block in visit'
  sass (3.4.13) lib/sass/stack.rb:79:in `block in with_base'
  sass (3.4.13) lib/sass/stack.rb:115:in `with_frame'
  sass (3.4.13) lib/sass/stack.rb:79:in `with_base'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:158:in `visit'
  sass (3.4.13) lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
  org/jruby/RubyArray.java:2307:in `map'
  sass (3.4.13) lib/sass/tree/visitors/base.rb:52:in `visit_children'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:179:in `with_environment'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:166:in `visit_children'
  sass (3.4.13) lib/sass/tree/visitors/base.rb:36:in `block in visit'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:186:in `visit_root'
  sass (3.4.13) lib/sass/tree/visitors/base.rb:36:in `visit'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:158:in `visit'
  sass (3.4.13) lib/sass/tree/visitors/perform.rb:8:in `visit'
  sass (3.4.13) lib/sass/tree/root_node.rb:36:in `css_tree'
  sass (3.4.13) lib/sass/tree/root_node.rb:20:in `render'
  sass (3.4.13) lib/sass/engine.rb:268:in `render'
  sass-rails (5.0.1) lib/sass/rails/template.rb:47:in `evaluate'
   () Users/chase/.rvm/gems/jruby-head@global/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
  org/jruby/RubyArray.java:1570:in `each'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/processed_asset.rb:12:in `initialize'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:374:in `block in build_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:395:in `circular_call_protection'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:373:in `build_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/caching.rb:54:in `cache_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/index.rb:59:in `find_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:37:in `init_with'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/asset.rb:24:in `from_hash'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/caching.rb:54:in `cache_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/index.rb:59:in `find_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/environment.rb:73:in `find_asset'
   () Users/chase/.rvm/gems/jruby-head@global/gems/sprockets-2.12.3/lib/sprockets/base.rb:295:in `[]'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:230:in `lookup_asset_for_path'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:190:in `check_errors_for'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:159:in `block in stylesheet_link_tag'
  org/jruby/RubyArray.java:2307:in `map'
  sprockets-rails (2.2.4) lib/sprockets/rails/helper.rb:158:in `stylesheet_link_tag'
  app/views/layouts/application.html.haml:13:in `_app_views_layouts_application_html_haml__466822080_12212'
  actionview (4.1.9) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.1.9) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.1.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.1.9) lib/active_support/notifications.rb:159:in `instrument'
  actionview (4.1.9) lib/action_view/template.rb:339:in `instrument'
  actionview (4.1.9) lib/action_view/template.rb:143:in `render'
  actionview (4.1.9) lib/action_view/renderer/template_renderer.rb:67:in `render_with_layout'
  actionview (4.1.9) lib/action_view/renderer/template_renderer.rb:53:in `render_template'
  actionview (4.1.9) lib/action_view/renderer/template_renderer.rb:17:in `render'
  actionview (4.1.9) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionview (4.1.9) lib/action_view/renderer/renderer.rb:23:in `render'
  actionview (4.1.9) lib/action_view/rendering.rb:99:in `_render_template'
  actionpack (4.1.9) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.1.9) lib/action_view/rendering.rb:82:in `render_to_body'
  actionpack (4.1.9) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.1.9) lib/action_controller/metal/renderers.rb:32:in `render_to_body'
  actionpack (4.1.9) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.1.9) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  activesupport (4.1.9) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/chase/.rvm/rubies/jruby-head/lib/ruby/stdlib/benchmark.rb:303:in `realtime'
  activesupport (4.1.9) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  activerecord (4.1.9) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:40:in `render'
  actionpack (4.1.9) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (4.1.9) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (4.1.9) lib/abstract_controller/base.rb:189:in `process_action'
  actionpack (4.1.9) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.1.9) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:113:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:166:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:229:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:229:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:166:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:166:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:166:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:166:in `block in halting'
  org/jruby/RubyProc.java:289:in `call'
  activesupport (4.1.9) lib/active_support/callbacks.rb:86:in `run_callbacks'
  actionpack (4.1.9) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.1.9) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.1.9) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.1.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.1.9) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.1.9) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.1.9) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.1.9) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.1.9) lib/abstract_controller/base.rb:136:in `process'
  actionview (4.1.9) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.1.9) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.1.9) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.1.9) lib/action_controller/metal.rb:232:in `block in action'
  org/jruby/RubyProc.java:289:in `call'
  actionpack (4.1.9) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
  actionpack (4.1.9) lib/action_dispatch/routing/route_set.rb:50:in `call'
  actionpack (4.1.9) lib/action_dispatch/journey/router.rb:73:in `block in call'
  org/jruby/RubyArray.java:1570:in `each'
  actionpack (4.1.9) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.1.9) lib/action_dispatch/routing/route_set.rb:685:in `call'
  newrelic_rpm (3.11.0.283) lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  org/jruby/RubyKernel.java:1125:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
@enebo enebo added this to the 9.0.0.0.pre2 milestone Apr 1, 2015
@enebo enebo added the core label Apr 1, 2015
@enebo
Copy link
Member

enebo commented Apr 1, 2015

I have not looked into this past looking at what tok() is but it points back to strscan and we have had a ton of M17n activity lately.

It would be really nice if you could figure out what the source it is choking on while parsing. As this issue is written up we just know sass is barfing on some bad data (no doubt from us providing some mangled data to sass). If you could puts the data it is parsing then it will be much easier for us to fix.

@Ch4s3
Copy link
Author

Ch4s3 commented Apr 1, 2015

I'll dig into it a bit further. Al I know atm is that it seems to be something in Bourbon/Neat. Where should I throw the a puts to capture what would be most helpful here?

@enebo
Copy link
Member

enebo commented Apr 1, 2015

@Ch4s3 I am not entirely sure. I will just dump what I would first try...The parser where it is throwing can probably be a good place to see the troubled str in question which strscan is looking at. From there perhaps you can find the original source data to see how it changed. I suspect this can be reduced to using strscan + some read in source data.

@Ch4s3
Copy link
Author

Ch4s3 commented Apr 1, 2015

I'm going to have to pull down the Sass gem and pry into it later.

@headius
Copy link
Member

headius commented Apr 2, 2015

Do you have a way for us to reproduce this?

@Ch4s3
Copy link
Author

Ch4s3 commented Apr 3, 2015

I'll post a repo as soon as(if) I can reproduce it in isolation. So far, it seems particular to my production app.

@headius
Copy link
Member

headius commented Apr 3, 2015

I will take some time today to make sure we're running all strscan tests/specs we can.

@headius
Copy link
Member

headius commented Apr 3, 2015

I don't see a sass 5.0.1...are you sure about that version?

@Ch4s3
Copy link
Author

Ch4s3 commented Apr 3, 2015

Sorry, that was a copy/paste error on my part. I'm using sass (3.4.13).

@Ch4s3 Ch4s3 changed the title JRuby-Head, Rails 4.1.9, and Sass 5.0.1 throws bad value for range JRuby-Head, Rails 4.1.9, and Sass 3.4.13 throws bad value for range Apr 3, 2015
@headius
Copy link
Member

headius commented Apr 6, 2015

I twiddled StringScanner and got all tests running, but I didn't see anything major that might explain your issue.

@Ch4s3
Copy link
Author

Ch4s3 commented Apr 6, 2015

It might be fairly specific to my app's setup, I tried to reproduce it yesterday for an hour or so on a fresh app, and couldn't. I'm perfectly happy waiting for pre2 to release and seeing if the issue persists.

@headius
Copy link
Member

headius commented Apr 6, 2015

Ok...I'm going to close this as invalid for now. If you can come up with a reproduction, feel free to reopen.

@headius headius closed this as completed Apr 6, 2015
@headius headius modified the milestones: Invalid or Duplicate, 9.0.0.0.pre2 Apr 6, 2015
@Ch4s3
Copy link
Author

Ch4s3 commented Apr 6, 2015

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants