This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154492 - IDE Freezes and spins on a CPU when I try to open an actionscript file in my project
Summary: IDE Freezes and spins on a CPU when I try to open an actionscript file in my ...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: ASM (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker with 1 vote (vote)
Assignee: nnnnnk
URL:
Keywords:
: 183345 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-03 15:55 UTC by haskovec
Modified: 2010-05-04 12:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Actionscript file that shows this issue (160 bytes, application/octet-stream)
2009-12-23 11:10 UTC, jphillips
Details
VisualVM thread dump (33.07 KB, text/plain)
2010-01-05 10:24 UTC, jphillips
Details

Note You need to log in before you can comment on or make changes to this bug.
Description haskovec 2008-12-03 15:55:19 UTC
There are a couple of actionscript files in my project that when I try to open them in the project view it seems to
freeze the IDE and I have to kill the java process from the windows task manager and restart it.  The contents of one of
the files is as follows:

class ChartData
{
	public var prices:Array;
	
	public var times:Array;
	
	public var volumes:Array;
			
	public var equityQuote:EquityQuote;
}

Some of the other actionscript files seem to open ok.
Comment 1 Petr Dvorak 2008-12-04 10:31:24 UTC
Hi, can you please provide a project where this issue is reproducible? I am unable to reproduce the issue with given
information. Also, can you please attach IDE log file (<user_profile>/.netbeans/6.5/var/log/messages.log)? Thank you.
Comment 2 Petr Dvorak 2009-02-05 11:48:36 UTC
Without requested information for a long time, I have to close this issue as INVALID. Please reopen the issue if the 
problem persists in the latest dev build, providing more information (messages.log, threaddumps, sample projects).
Comment 3 jphillips 2009-12-23 11:10:36 UTC
Created attachment 92893 [details]
Actionscript file that shows this issue

Just opening this file in Netbeans (doesn't have to be part of a project) exposes this issue for me. Obviously I'm not expecting netbeans to have syntax highlighting... but, it would be nice if it could open it and allow me to edit it as a plain-text document.

Haven't tested much with opening other actionscript files, but this 8 line file definitely doesn't open.
Comment 4 jphillips 2009-12-23 11:12:53 UTC
I'm on Windows 7 x64, if that is relevant.
Comment 5 jphillips 2009-12-23 11:27:05 UTC
Upon closer inspection, it appears what is causing this issue is garbage characters at the beginning of text files that Flash saves. If I copy and paste the text of the attached file into a new file in netbeans and give it an .as extension I can edit and open the file normally (in Netbeans). 

But, once I make a change and save the file in Flash it locks up Netbeans again upon opening. Clearly a problem with Flash but, Netbeans surely shouldn't lock up upon parsing such characters.
Comment 6 Jiri Prox 2010-01-05 08:26:47 UTC
can you please capture thread dump, when IDE is frozen and attach it here?
Thanks
Comment 7 jphillips 2010-01-05 10:24:41 UTC
Created attachment 93083 [details]
VisualVM thread dump
Comment 8 Jiri Prox 2010-01-05 10:36:22 UTC
thansk
Comment 9 Vitezslav Stejskal 2010-01-06 02:56:21 UTC
Apparently the IDE interprets your .as files as assembler files and as such tries to parse them, etc. Why the IDE freezes I can't say. There is no apparent deadlock in the threaddump that you provided. But I'm not very familiar with the CND code. All I can see is several instances of 'Code Model Parser X' threads waiting on ParserQueue$Lock, but nobody seems to own this synchronizer. Anyway, I'm passing this to CND folks.
Comment 10 Vladimir Voskresensky 2010-01-07 19:53:30 UTC
Egor, looks like asm lexer doesn't have error recovery => infinite loop
Comment 12 Egor Ushakov 2010-05-04 12:01:12 UTC
*** Bug 183345 has been marked as a duplicate of this bug. ***