#559 ✓resolved
Fris

Saving a new file with some text in it causes a `IllegalArgumentException`

Reported by Fris | September 26th, 2011 @ 11:27 PM | in 0.12 (closed)

Saving a new file with some text in it causes an error.

Windows 7, x64.

About: Redcar
Version: 0.11
Ruby Version: 1.8.7
Jruby version: 1.5.3
Redcar.environment: user
  1. Open new file
  2. Type: def hello
  3. Press Ctrl+S
  4. Provide filename in Save dialog and click Save
  5. Error occurs

Note: Error does not occur if you first save the new file and then type text into the file and save again.

-

Error in command Redcar::Project::SaveFileAsCommand
NativeException: java.lang.IllegalArgumentException: Argument not valid
org.eclipse.swt.SWT:-1:in `error'
org.eclipse.swt.SWT:-1:in `error'
org.eclipse.swt.SWT:-1:in `error'
org.eclipse.swt.custom.StyledText:-1:in `setCaretOffset'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/edit_view_swt/lib/edit_view_swt/document.rb:92:in `text='
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/edit_view/lib/edit_view/document.rb:255:in `text='
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/edit_view/lib/edit_view/document.rb:725:in `update_from_mirror'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/edit_view/lib/edit_view/document.rb:117:in `mirror='
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/core/lib/core/observable.rb:95:in `notify_listeners'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/edit_view/lib/edit_view/document.rb:112:in `mirror='
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/project/lib/project/commands.rb:186:in `execute'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application/lib/application/command/executor.rb:28:in `execute'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application/lib/application/command.rb:84:in `run'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/project/lib/project/commands.rb:164:in `execute'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application/lib/application/command/executor.rb:28:in `execute'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application/lib/application/command.rb:84:in `run'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application/lib/application/menu/item.rb:45:in `selected'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/application_swt/lib/application_swt/menu.rb:133:in `widgetSelected'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/swt/lib/swt/event_loop.rb:13:in `start'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/plugins/core/lib/core/gui.rb:37:in `start'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/lib/redcar.rb:188:in `pump'
.../Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/bin/redcar:35

Comments and changes to this ticket

  • delisa

    delisa September 27th, 2011 @ 04:13 PM

    Does this only happen when the file only contains one line of text?

  • Fris

    Fris September 28th, 2011 @ 01:49 AM

    The error occurs with multiple lines of text as well.

  • Fris

    Fris September 28th, 2011 @ 01:52 AM

    If it helps, the following is the information printed when Redcar starts up:

     Redcar 0.11 ( i386-mingw32 )
     java -Xbootclasspath/a:"C:/Users/<<snip>>/.redcar/assets/jruby-complete-1.5.3.jar" -D
     file.encoding=UTF8 -Xmx320m -Xss1024k -Djruby.memory.max=320m -Djruby.stack.max=
     1024k org.jruby.Main "<<snip>>/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/redcar-0.11/
     bin/redcar" --no-sub-jruby --ignore-stdin  --start-time=1317170761
     Redcar 0.11 ( java )
    
  • delisa

    delisa November 6th, 2011 @ 10:11 PM

    • State changed from “new” to “open”
    • Milestone set to 0.12
    • Milestone order changed from “197737” to “0”
  • delisa

    delisa November 6th, 2011 @ 10:24 PM

    • State changed from “open” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket

Pages