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 216158 - Freeze typing facelets code, lead to loose code
Summary: Freeze typing facelets code, lead to loose code
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-31 01:51 UTC by ecerichter
Modified: 2012-10-11 11:28 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot showing where the error happened (22.22 KB, image/png)
2012-07-31 01:51 UTC, ecerichter
Details
Log of the session (391.94 KB, application/octet-stream)
2012-07-31 01:52 UTC, ecerichter
Details
Thread dump when NB is frozen. (11.12 KB, text/plain)
2012-08-22 18:24 UTC, ecerichter
Details
StackTrace take 2 - please check if it is now complete (32.18 KB, text/plain)
2012-09-13 18:27 UTC, ecerichter
Details
Video (SWF) showing how I got stuck in NB (2.78 MB, application/octet-stream)
2012-09-13 18:44 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2012-07-31 01:51:57 UTC
Created attachment 122551 [details]
Screenshot showing where the error happened

While working with NB 7.2 FCS, sometimes JSF editor just freeze.

Attached there is a screen shot and the session log to help identify (and possible fix) the issue.

To understand how I got into that issue:

- Created a composite component
- Typed <cc:attributes>
- Typed #{value}, returned cursor to the position before #, and then started to type #{natureza} (but frozen when I type #).

Thanks,

Edson.
Comment 1 ecerichter 2012-07-31 01:52:48 UTC
Created attachment 122552 [details]
Log of the session
Comment 2 Marek Fukala 2012-08-22 08:38:46 UTC
Is the problem reproducible? Is is a deadlock? Or the AWT thread is stuck? Can you provide a threaddump please?
Comment 3 ecerichter 2012-08-22 16:24:01 UTC
Problem is reproducible ALWAYS. Always NB freezes, I always loose changes made.

The information provided in this ticket is the only information available to me (users). Also the screen shot (plus the information description) is enough to reproduce the problem. Seems that the freeze happens when I type the second "#" before the existing one.

To reproduce the problem, just follow the steps in a XHTML page similar to the one provided in the screenshot.

I have no idea if the problem is a deadlock, you tell me! Whenever my users have problems in the system, their job is to report the problem and my job is to discover the cause...

Please, don't be so quick in closing a bug report...

Have you had time to look the NetBeans log attached at first place?

Sorry if this don't sounds polite, but I get sick seen people closing bug reports before understanding the problem at all (or at least trying).
Comment 4 javydreamercsw 2012-08-22 17:32:12 UTC
Provide the requested thread dump in order to complete the evaluation.

I'm sure they did, just not everything is documented here, just the outcome. They have a lot of bugs on their plate and closing as incomplete is normal so the issue gets out of their TODO list until the data is provided and changed to reopened so it shows in the TODO list again.
Comment 5 ecerichter 2012-08-22 18:24:36 UTC
Created attachment 123423 [details]
Thread dump when NB is frozen.
Comment 6 Marek Fukala 2012-09-13 09:13:10 UTC
I'm sorry I cannot reproduce the issue on my Mac and dev builds (nb7.3) with jdk 1.6 and also on a windows 7 box with nb 7.2 fcs on 1.7 jdk.

The attached thread dump doesn't seem to be from the netbeans' JVM, at least there's no event dispatch thread and many other threads which are always present. So I cannot use it figure out what's wrong.

Please try to follow the steps from:

http://wiki.netbeans.org/GenerateThreadDump

when taking the thread dump.
Comment 7 Marek Fukala 2012-09-13 13:34:34 UTC
Please reopen once you get the proper thread dump. I can do nothing until I get it from you or someone here can reproduce.

If you need other asistence when taking the thread dump feel free to mail me or just ask here.
Comment 8 ecerichter 2012-09-13 16:26:04 UTC
There are 3 files attached to this ticket. Third one is the "Thread Dump When NB if Frozen".

Have you look the file called "Thread dump when NB is frozen" text file???

Reopening again.

Regards,

Edson.
Comment 9 ecerichter 2012-09-13 16:29:42 UTC
Also, as I said, this error is reproducible always - just follow the steps.
Comment 10 Marek Fukala 2012-09-13 17:58:21 UTC
as I've already written in comment #6:
1) the thread dump you attached is not the proper one (not taken from nb JVM) so it is useless, 

2) I (and anyone from quality eng.) can NOT reproduce the problem. If we did you wouldn't ask you.

So PLEASE *TAKE A NEW AND PROPER* thread dump and attach it here. 

I really do want to help you but definitively I won't  play a word ping pong with you.
Comment 11 ecerichter 2012-09-13 18:27:13 UTC
Created attachment 124329 [details]
StackTrace take 2 - please check if it is now complete
Comment 12 ecerichter 2012-09-13 18:30:31 UTC
(In reply to comment #10)
> as I've already written in comment #6:
> 1) the thread dump you attached is not the proper one (not taken from nb JVM)
> so it is useless, 

Yes, I'm pretty sure this was taken from nb JVM. Can't blame me if it was not complete; it's tool limitation. See the new one.

> 
> 2) I (and anyone from quality eng.) can NOT reproduce the problem. If we did
> you wouldn't ask you.

I can reproduce always. Just look the specification (Windows 7 x64, NB 7.2 FCS and JDK 1.7.0_05). I'll post a video, will make easy to understand issue I'm facing.

> 
> So PLEASE *TAKE A NEW AND PROPER* thread dump and attach it here. 

Done

> 
> I really do want to help you but definitively I won't  play a word ping pong
> with you.

I don't have time for playing games. Be sure I'm doing my best to not waste your time. I want to believe you are doing the same for me.

Regards,

Edson.
Comment 13 ecerichter 2012-09-13 18:37:28 UTC
(In reply to comment #11)
> Created attachment 124329 [details]
> StackTrace take 2 - please check if it is now complete

BTW, this time I've captured the bug using:

Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\Administrador\AppData\Roaming\NetBeans\7.2
Cache directory: C:\Users\Administrador\AppData\Local\NetBeans\Cache\7.2
Comment 14 ecerichter 2012-09-13 18:44:07 UTC
Created attachment 124330 [details]
Video (SWF) showing how I got stuck in NB

Please, se attached screencast showing how I'm able to reproduce the error (99% of time - if the "blue tooltip" does not show, then seems that the error does not happen). Is just a guess, may be I'm just imagining things about the blue tooltip...
Comment 15 Marek Fukala 2012-09-13 18:54:36 UTC
Great! The latest thread dump is correct and it indicates what's the problem. 

The video is also very helpful. What is shown is bit more longer list of steps we were trying. 

Really thanks for both valuable information! 

I/we really do the best to resolve the problem.

-br
Comment 16 Marek Fukala 2012-09-14 11:42:17 UTC
the lockup is caused by HtmlPaletteCompletionProvider resp. its synchronized blocks:

"Code Completion" thread: HtmlPaletteCompletionProvider$CCQuery.query(HtmlPaletteCompletionProvider.java:119) waits for document's readlock under a synchronized block

while

at "EDT" thread:       
HtmlPaletteCompletionProvider$CCQuery.canFilter(HtmlPaletteCompletionProvider.java:206) under document write lock waits for the synchronized block monitor
Comment 17 Marek Fukala 2012-09-14 12:25:58 UTC
fixed in web-main#b8607121d338

I've also realized that the "palette items completion provider" although it is the lockup culprit doesn't work at all since there isn't an instance of PaletteController class in the editor top component's lookup. I reckon this was a regression of adding the multiview to the html editor.

I've fixed/workarounded this problem as well in the same changeset.

ecerichter, thank you for the provided information and feedback. I've marked the issue as netbeans 7.2 patch-candidate so the fix can get to nb 7.2 patch #2.
Comment 18 ecerichter 2012-09-14 12:33:00 UTC
(In reply to comment #17)
> fixed in web-main#b8607121d338
> 
> I've also realized that the "palette items completion provider" although it is
> the lockup culprit doesn't work at all since there isn't an instance of
> PaletteController class in the editor top component's lookup. I reckon this was
> a regression of adding the multiview to the html editor.
> 
> I've fixed/workarounded this problem as well in the same changeset.
> 
> ecerichter, thank you for the provided information and feedback. I've marked
> the issue as netbeans 7.2 patch-candidate so the fix can get to nb 7.2 patch
> #2.

As soon as this patch appear in dev builds, I can test again and give you the feedback.

Thanks,

Edson
Comment 19 Marek Fukala 2012-09-14 12:40:08 UTC
> As soon as this patch appear in dev builds, I can test again and give you the
> feedback.
That will be great as the issue was really not reproducible for us. It used to be some race condition happening to only wicket fast users ;-)
Comment 20 Quality Engineering 2012-09-15 02:12:49 UTC
Integrated into 'main-golden', will be available in build *201209150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b8607121d338
User: Marek Fukala <mfukala@netbeans.org>
Log: #216158 - Freeze typing facelets code, lead to loose code
Comment 21 ecerichter 2012-09-16 22:40:28 UTC
I've tested in version 201209160001, and I'm not able to reproduce the problem anymore.

Thanks for the fix.

Edson
Comment 22 Jiri Skrivanek 2012-10-04 14:22:11 UTC
Verified by reporter. Please add to patch branch.
Comment 23 David Konecny 2012-10-09 21:57:09 UTC
changeset:   243066:b052cd33331f
branch:      release72
user:        Marek Fukala <mfukala@netbeans.org>
date:        Fri Sep 14 14:20:05 2012 +0200
summary:     #216158 - Freeze typing facelets code, lead to loose code
Comment 24 Quality Engineering 2012-10-10 14:16:41 UTC
Integrated into 'releases', will be available in build *201210100934* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/b052cd33331f
User: Marek Fukala <mfukala@netbeans.org>
Log: #216158 - Freeze typing facelets code, lead to loose code
(transplanted from b8607121d338a0380ce656b49aaf0ecb614238d5)