products forums blog support careers about
  History | Log In     View a printable version of the current page.  
PRO USERS, to ensure 'PRIORITY SUPPORT' make sure that your ASAP account is "tagged" when you file the request. Click here for instructions on how to tag your account.
Issue Details (XML | Word | Printable)

Key: ROR-696
Type: Bug Bug
Status: Awaiting User Response Awaiting User Response
Resolution: Fixed
Priority: Critical Critical
Assignee: Chris Williams
Reporter: Dzso Pengo
Votes: 5
Watchers: 10
Operations

If you were logged in you would be able to see more operations.
Aptana RadRails

Eclipse freeze, on opening Controller with Ruby Editor in RadRails perspective

Created: 17/Mar/08 06:20 AM   Updated: 11/Apr/08 03:37 AM
Component/s: Editor: Ruby
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

File Attachments: 1. Text File .log (65 kb)
2. File eclipse_mb_crash_log (24 kb)
3. File error01_ROR-699.rb (0.1 kb)

Issue Links:
Duplicate
 

Impact on Workflow: Critical
Studio Install Type: N/A
Operating System: Ubuntu
Participants: Chris Williams, Dima Geller, Dzso Pengo, Hendrik Gebhardt, Junghoon Lee, Lele Forzani and torneco


 Description  « Hide
Some controller makes this, not all. If I open them with text editor, it is ok, but when I chose "Ruby Editor" in "Open with..." menu, eclipse crashes, and I have to kill the eclipse process, and restart it.

This is the code one of this controller:

class Admin::SysMessagesController < ApplicationController

before_filter :login_required
before_filter :find_sys_message, :only => [:edit, :update, :destroy, :activate, :deactivate]

before_filter :edit_privilige_required, :only => [:edit, :update, :destroy, :activate, :deactivate, :create, :new]

layout 'admin'

def edit
render :partial => "sys_message_edit"
end

def activate
set_active true
end

def deactivate
set_active false
end

def set_active activeness
@sys_message.is_active= activeness
@sys_message.save!
redirect_to :action => :index
end

def create
return unless request.post?

@sys_message = SysMessage.new(params[:sys_message])
@sys_message.is_active = false
@sys_message.user_id = current_user.id

@sys_message.save!
flash[:notice] = 'Sikeres mentés.'
redirect_to :action => :index
rescue ActiveRecord::RecordInvalid
flash[:error] = 'Hiba történt a mentés során.'
redirect_to :action => :index
end

def update
return unless request.put?

@sys_message.update_attributes!(params[:sys_message])

flash[:notice] = 'Sikeres mentés.'
redirect_to :action => :index
rescue ActiveRecord::RecordInvalid
flash[:error] = 'Hiba történt a mentés során.'
redirect_to :action => :index
end

def index
@sysmessage_list_inactive = SysMessage.find(:all,:conditions => "is_active=0", :limit => 100, :order => 'updated_at desc')
@sysmessage_list_active = SysMessage.find(:all,:conditions => "is_active=1", :limit => 100, :order => 'updated_at desc')
end

def destroy
return unless request.delete?
@sys_message.destroy

flash[:notice] = 'Sikeres törlés.'
redirect_to :action => :index
rescue
flash[:error] = 'Hiba történt a törlés során.'
render :controller => :entity, :action => :edit

end

def find_sys_message
@sys_message = SysMessage.find(params[:id])
return true
rescue ActiveRecord::RecordNotFound
flash[:error] = 'Nem létező szonosító'
redirect_to :controller => :sys_messages
return false
end

def new
@sys_message = SysMessage.new :is_active => false
edit
end

def edit_privilige_required
insuffisient_rights if not current_user.can_manage_sys_messages?
end

def insuffisient_rights
flash[:error] = 'Ehhez nincs meg a megfelelő jogosultsága.'
redirect_to :action => :index
return false
end

end



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Chris Williams - 17/Mar/08 08:59 AM
Can you attach your log? http://www.aptana.com/node/247

I can't reproduce this so far. I had to change my encoding to UTF-8 to be able to save the file, but no crashes or anything...


Dzso Pengo - 17/Mar/08 09:24 AM
Strange. If I clear the log, and reproduce this error, nothing logged to the file. But I attach my log file after restart, because it is long, and I dont understand why exceptions are logged in this file about closed projects in my workspace.... and maybe you can see some useful info in it

I do developing both Java EE and RoR projects, and it would be really hard work (6-8 hrs) if I wanna start all from beginning (with virgin Eclipse)

I use Eclipse 3.3.2, Europa, in Ubuntu


Dzso Pengo - 17/Mar/08 09:28 AM
Dunno what other info could help you, just tell me

Junghoon Lee - 18/Mar/08 08:16 AM
I have the same problem. I use Windows Vista, Aptana 1.1, and RadRails 1.0.
You can reproduce this easily with this code.

def test
a = '한글'
b'대한민국'
end

Just copy & paste, and then it freeze. Very easy.


torneco - 20/Mar/08 02:00 AM
I can reproduce this with Junghoon's code, and guess this is similar problem to ROR-699.

Chris Williams - 21/Mar/08 09:59 AM
OK, well this is obviously a pretty big and common problem. We've now got 3 tickets on it and about 5 people who are watching.

The problem really is that I'm unable to reproduce it on my machine. My guess is that I'm not properly passing along encoding somewhere in the process, and it just happens to work for me because I'm on an en_US computer.

I'll see if I can fiddle with my language settings or something to try and reproduce this.


Chris Williams - 21/Mar/08 10:36 AM
What encoding is the file you're pasting into? What about the file you are pasting from?

Dzso Pengo - 21/Mar/08 10:58 AM
My Eclipse and my files all is in UTF-8.

Try to change the encoding of your eclipse, not only the files...
(preferences/general/workspace/"Text file encoding")


Dzso Pengo - 21/Mar/08 11:00 AM
I tried to change the encodig, but it is still freezing ...

Junghoon Lee - 21/Mar/08 11:04 AM
I use Korean version of Windows Vista. And .rb file encoding is UTF-8(default).
I think it is necessary for reproducing this problem to install Korean or Japanese language pack.

Hendrik Gebhardt - 21/Mar/08 02:39 PM
I have the same problem with german umlauts.
Encoding is UTF-8 in Ubuntu 7.10.

Lele Forzani - 25/Mar/08 04:32 AM
cwilliams, in case it helps: I am on an en_US.UTF-8 computer, with no language pack but US english (opensuse x86_64, eclipse 3.3.2 w/ Aptana as a plugin).
In order to reproduce I just need to open an empty ruby editor, and type one single accented character. Attaching a .log.

Chris Williams - 25/Mar/08 07:36 PM
Well I've managed to reproduce it on a Japanese version of Windows Vista and Aptana standalone. But here's the problem: I cannot reproduce it if I install Aptana RadRails into Eclipse 3.3 or 3.2.2, and I can't get it to happen underneath the debugger with the source in Eclipse.

I'll have to try downloading all the Aptana and RDT plugins and running the Aptana application under the debugger and see if it'll happen there next.


torneco - 26/Mar/08 12:41 AM
Thanks for trying, Chris. Can you open the error01_ROR-699.rb on your Japanese environment? I installed Aptana RadRails plugin on Eclipse 3.3.2 and try opening the file again, but got same error.

Chris Williams - 26/Mar/08 11:09 AM
OK. I'm able to reproduce under the debugger now. Thanks torneco, you rock!

Here's the bad news: It looks like this is a bug in JRuby. Before their 1.1 RC2 release they had a huge patch to the paisng code which sped things up a lot. The problem is that they broke parsing of Multibyte strings - it still parsers fine, but the positions it gives back are bad and so are the strings of content they hold onto (for things like comments). That's why we're getting these errors. I've filed a bug with them: http://jira.codehaus.org/browse/JRUBY-2324

I'm also going to try and create a patch so I don't have to wait for their fix.


Chris Williams - 26/Mar/08 11:45 AM
Finally! It's fixed in the 1.0.1 branch. We'll need to do some QA just to make sure, but with this we should be pushing a 1.0.1 build in the next day or two.

torneco - 26/Mar/08 11:47 AM
yay! Thanks, Chris!!!!!

Chris Williams - 01/Apr/08 08:00 PM - edited
To reproduce: Open up RadRails on Japanese Vista. Copy the attached error01-ROR699.rb file and paste it into a new rails project. Double click to open the file. It should now open fine.

Dima Geller - 01/Apr/08 08:53 PM
verified

torneco - 01/Apr/08 09:26 PM
How can I upgrade to 1.0.1? I couldn't find that with Feature Updates.

Dima Geller - 01/Apr/08 09:29 PM
it's not released yet. We will notify you when it's released

Thank you,
Dima


torneco - 01/Apr/08 09:36 PM
Thanks, Dima. I'm looking forward to its release.

Dima Geller - 10/Apr/08 05:36 PM
Please check it now. 1.0.1 is released

Thank you,
Dima


torneco - 10/Apr/08 11:32 PM
Dima,

Thanks! I'm using 1.0.1 now, and it works well!!


Dzso Pengo - 11/Apr/08 03:37 AM
Yess! Works for me in Hungary either!!!