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 134968 - NetBeans hangs on startup
Summary: NetBeans hangs on startup
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: David Simonek
URL:
Keywords: RANDOM
Depends on:
Blocks: 135735
  Show dependency tree
 
Reported: 2008-05-13 15:13 UTC by abhidesh
Modified: 2008-12-22 10:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (64.59 KB, text/plain)
2008-05-13 15:14 UTC, abhidesh
Details
The project (132.74 KB, text/plain)
2008-05-13 18:57 UTC, abhidesh
Details
shows still needs import though there are already two imports (49.04 KB, text/plain)
2008-05-15 19:56 UTC, Joelle Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abhidesh 2008-05-13 15:13:29 UTC
I have a JSF project, and a few plain Java projects in my workspace. On startup, the IDE window comes up, and NetBeans 
initiates a scan of the jars. The IDE doesn't respond to button clicks. Eventually the VM size of the IDE process stops 
changing in Windows Task Manager. The IDE window is grey at this point. The IDE log contains one exception (log 
attached), followed by a few warnings and info messages. The last message is 

FINER [org.netbeans.modules.visualweb.navigation.VWPContentModel]: ENTRY
FINEST [org.netbeans.modules.visualweb.navigation.VWPContentModel]: Removing model listener for Page: AgencyDetailPage
FINER [org.netbeans.modules.visualweb.navigation.VWPContentModel]: RETURN

I deleted the .netbeans\6.1\var\cache folder after killing NetBeans, and retried, with the same result.
Comment 1 abhidesh 2008-05-13 15:14:17 UTC
Created attachment 61335 [details]
IDE log
Comment 2 _ potingwu 2008-05-13 17:00:00 UTC
Please attach your project here if you can! I cannot reproduce this issue.

Joelle, please check whether it's from the navigation codes or not. Thanks!
Comment 3 abhidesh 2008-05-13 18:57:36 UTC
Created attachment 61346 [details]
The project
Comment 4 Joelle Lam 2008-05-13 23:58:06 UTC
abhidesh, I opened your project and I had no problems.  I am confused as to why your project looks like a partial visual
web project not in working order?  Is your project a Visual Web Project or just a plain JSF Web Project?  I see that you
have added the framework, but I also see that you are not following the model so things do not work in designer.  Maybe
you could clarify the state of this project and we can go from there.  It maybe even more helpful if you could send me
your netbeans userdir.  
Comment 5 abhidesh 2008-05-14 14:39:41 UTC
Joelle, this is a visual web project, and it is in working order. It was created using NetBeans 6.0.1. And I am using 
NetBeans 6.0.1 as a fallback, since 6.1 stumbles upon the project. And I am not sure what you mean by "not following 
the model". Each visual web page uses visual web components from the Woodstock library, and has a corresponding page 
bean, both created using the NetBeans IDE. It uses JPA and a MySQL database. You can create the schema and populate it 
with some test data using the junit test in the project. The project is deployed on Tomcat 6.0.14. That's the reason 
why some extra jars have been bundled with the war. I am attaching my .netbeans\6.1 folder as you asked. Please let me 
know if you have any other questions.
Comment 6 abhidesh 2008-05-14 15:14:14 UTC
I am having trouble attaching the user directory zip, probably due to its size (>75MB). Let me know which folders you 
are interested in, and I'll upload them.
Comment 7 Joelle Lam 2008-05-14 23:56:31 UTC
Hello abhidesh, 

when I say that it doesn't follow the model I meant that it doesn't subclass some of the necessary beans.  I did notice
however that you actually do subclass them, but the import statements have been removed.  Any idea why? I will follow up
tomorrow on this with a few colleagues to figure out why this might have happened?  However, I am still not able to
reproduce Netbeans hanging at startup.  Can you may be send it directly to my email?  joellelam@netbeans.org ?
Comment 8 Joelle Lam 2008-05-15 19:53:55 UTC
Interestingly enough the project thinks that it needs to be imported even though it is already imported.

I am going to attach a picture for other developers to help out with this.
Comment 9 Joelle Lam 2008-05-15 19:56:02 UTC
Created attachment 61447 [details]
shows still needs import though there are already two imports
Comment 10 David Konecny 2008-05-15 23:44:45 UTC
Re. "The IDE window is grey at this point." - I interpret this that there is no menu, you cannot do anything, etc. right?

Abhidesh, could you try following please: start NetBeans 6.1 with different userdir (netbeans.exe --userdir
C:\tmp\nb-userdir) and open you visual web project and let me know whether it works on not. Thanks. On more thing: If
you end up in the same situation - grey window - please do this: switch back to console from which you started netbeans
and press CTRL+Break 3-5 times (with some interval between eg. 10-30 sec). That should produce thread dumps to your
console. Please attach all of them to this issue. Thanks.

Joelle, any idea why log contains "NoSuchMethodException:
org.netbeans.modules.web.jsf.JSFConfigMultiviewDescriptor$JSFConfigMultiviewElement.<init>()"? Older version of NetBeans
saved windows layout (ie. window components were serialized into userdir) and NB 6.1 has troubles reopening them (ie.
window components deserialization fails with NoSuchMethodException) and for some reason that completely destroyes window
system. That indicates two problems: #1) window system should be able to survive this and simply ignore such a component
and not reopen it; #2) visualweb (perhaps) should have had backward compatible solution to reopen old serialized
components. If my assumptions are correct then starting IDE with fresh userdir should resolve the problem.
Comment 11 David Konecny 2008-05-15 23:50:54 UTC
Re. "I deleted the .netbeans\6.1\var\cache folder" - persisted windows layout is stored in
.netbeans\6.1\config\Windows2Local so you removal would not have any impact on that. You can try to remove (or just
rename for test) Windows2Local folder and that should hopefully resolve your issue.
Comment 12 abhidesh 2008-05-16 22:47:02 UTC
I tried both suggestions - using a different userdir, and removing folder .netbeans\6.1\config\Windows2Local, and both
options worked.
Comment 13 David Konecny 2008-05-18 23:12:01 UTC
Thanks abhidesh.

joellelam, it should be easy for you to reproduce it now. Once you know the details and how many users are possibly
impacted by this issue we can decide whether it is P1 or P2 and whether it deserves to be fixed in 6.1 patch 2. I would
also suggest to file issue against window system (with details how to reproduce) - window system should survive failure
like this and simple ignore component which it cannot restore.
Comment 14 Joelle Lam 2008-05-22 19:34:00 UTC
abhidesh, I am sorry, can you clarify what "it worked" means?  Did the problem go away or are you still seeing the total
hanging of the IDE?
Comment 15 abhidesh 2008-05-22 21:46:25 UTC
The problem went away. NetBeans comes up, as expected, and opens the JSF project.
Comment 16 Joelle Lam 2008-05-22 21:59:51 UTC
Hello abhidesh, great to hear. Keep me posted if you run into any other issues.  Thanks!
Comment 17 David Konecny 2008-05-22 23:48:43 UTC
joellelam, why is this worksforme? Could you please provide evaluation of the NoSuchMethodException?
Comment 18 Joelle Lam 2008-05-23 20:39:53 UTC
Yes dkonecny, you are right. I am going to open a bug again PageFlowEditor to deal with deserialization of old
components, but the Windowing System should hang or even have these issues just because it was unable to deserialize a
window.

For reproducibility I am not going to fix the PageFlowEditor until the Windowing System confirms the issues.

1) In 6.0 create JSF Project
2) Open Faces-Config file (Page FLow Editor)
3) Cloes the IDE
4) Open in 6.1
5) Your log file should seem similar to the  attached messages.log
6) I assume this is were the IDE some times hanges.
Comment 19 abhidesh 2008-05-27 14:25:42 UTC
>> 6) I assume this is were the IDE some times hanges.

The IDE always hanged up on me.
Comment 20 Stanislav Aubrecht 2008-06-03 09:42:50 UTC
i didn't manage to reproduce but i think there's no deadlock because of the window system problems. next time the whole
ide window is one big gray rectangle try resizing the main window. it should force invalidate/repaint event causing the
ide to respond again. if that doesn't work then raise priority back to P2 pls
Comment 21 David Konecny 2008-06-05 00:30:26 UTC
joellelam, how to reproduce this problem? The NoSuchMethodException happens for a reason - that method was removed at
some point in time (visible in VCS) and is related to persistence of some concrete window. Which one? Which version?
Comment 22 David Simonek 2008-06-18 09:59:14 UTC
I'm pretty confused, what is the conclusion? What is expected from me? If there is some hang, please generate thread
dump of frozen system as described here http://wiki.netbeans.org/GenerateThreadDump

I don't think that hang is related to window system - if deserialization of some component fails, winsys just logs it
and continues, no hang should occur. Also note that generally importing of winsys isn't supported, so winsys setting is
not imported by our settings importer.
Comment 23 Joelle Lam 2008-06-18 20:21:28 UTC
Yes, there was a break in compatibility between the de-serialization of the PageFlowEditor window at some point. 
However, I think the current status of this bug is that this break should not cause the IDE to hang. I haven't fixed the
problem because I want to make sure there is a reproducible case for the windowing system.

abhidesh, can you generate the thread dump for this bug?

Regards,
Joelle
Comment 24 Stanislav Aubrecht 2008-07-28 10:34:39 UTC
joellelam, any update on this issue?
Comment 25 Joelle Lam 2008-07-28 19:33:50 UTC
abhidesh, have still looking for a thread dump since I am unable to reproduce it on my end.
Comment 26 David Konecny 2008-07-28 23:07:25 UTC
joellelam, what do you mean you cannot reproduce it? What did you do to reproduce it?

As I said earlier, the NoSuchMethodException happens for a reason - that method was removed at
some point in time. If you look at HG history of that file you will find when exactly it was removed. You get the build
with the method, start the NB, open a window relevant to the removed method, close the IDE which should serialize the
window via the method. Using the same userdir you start newer version of NB where the method was removed and you should
get the NoSuchMethodException during IDE startup when window system deserializes your component. There is no magic
involved, this issue is not RANDOM, nor INCOMPLETE. IMO.
Comment 27 Joelle Lam 2008-07-28 23:40:48 UTC
Are you able to get this IDE to hang with this?  If I remember correctly I was not able to get it to hang.  I recognize
the Seriallization issue but aren't we trying to work through the IDE hanging first?
Comment 28 David Konecny 2008-07-28 23:55:54 UTC
I understand it that deserialization issue caused IDE window to become grey after startup preventing user to do anything
useful with it. And as Abhidesh confirmed removing .netbeans\6.1\config\Windows2Local resolved the problem.
Comment 29 Joelle Lam 2008-07-29 00:18:18 UTC
dsimonek, we are noticing that you marked this issue as INCOMPLETE & RANDOM, do you have sufficient information to work
with?  

dkonecny, The de-serialization issue has already been opened as a separate bug #135735 with the dependency on this one
specified.

dkonecny, are you affirming that those steps cause the NetBeans IDE to hang every time?
Comment 30 David Konecny 2008-07-29 01:25:07 UTC
I'm not affirming that those steps cause the NetBeans IDE to hang every time. That's what Abhidesh was saying. If it is
true then it is winsys issue; if not than dsimonek cannot do much with it.

Anyway, considering this issue as well as issue 135735 has no single duplicate and NB6.1 has been out for a while now I
suggest to close this as WORKSFORME. Most probably the problem was caused by some other factors or was fixed in the
meantime.