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 155680 - Netbeans can't start up when system date change to past
Summary: Netbeans can't start up when system date change to past
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: mslama
Keywords: THREAD
Depends on:
Reported: 2008-12-17 16:04 UTC by navid
Modified: 2009-02-19 22:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

ThreadDump (19.06 KB, text/plain)
2008-12-18 09:22 UTC, navid
Testing Project (10.34 KB, application/x-compressed)
2009-01-09 00:39 UTC, navid

Note You need to log in before you can comment on or make changes to this bug.
Description navid 2008-12-17 16:04:41 UTC
Recently I changed my current system date to 5 days ago,
and then i tried to run nb6.5 . 
Splash screen appeared but it doesn't continue after "Done loading modules ." message .
When i changed system date back, nb started normally .
I had 2 projects open in my workspace .
OS : Windows Vista SP1 32bit
JDK : 1.6u7
Comment 1 Lukas Hasik 2008-12-18 09:02:47 UTC
please, take thread dump when the IDE is stopped/locked and attach it.
It works for me on Win XP.
Comment 2 navid 2008-12-18 09:22:53 UTC
Created attachment 75122 [details]
Comment 3 Lukas Hasik 2008-12-18 09:43:39 UTC
thank you for the dump. It shows a deadlock in 
"AWT-EventQueue-1" prio=6 tid=0x2daf2800 nid=0xfe0 in Object.wait() [0x2f43f000..0x2f43fd68]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x06f929a0> (a org.openide.text.CloneableEditor$DoInitialize)
	at java.lang.Object.wait(
	at org.openide.text.CloneableEditor$DoInitialize.initDocument(
	- locked <0x06f929a0> (a org.openide.text.CloneableEditor$DoInitialize)

Reassigning to openide/text to check if it's problem of ClonableEditor or XmlMultiView

navid, what documents do you have opened in your IDE? Is there a xml file e.g. a web.xml etc? Are your files versioned?

Comment 4 navid 2008-12-18 09:58:06 UTC
yes, i have one xml file open (persistence.xml), and some java classes open in nb,
i closed the xml file, and then i restarted nb, it started up normally.
again i tried to open xml file (not current system date) and then nb hangs .
Comment 5 mslama 2009-01-05 11:33:36 UTC
Please can you send me your project so that I can reproduce/investigate this problem? I created simple xml file so IDE
uses org.netbeans.modules.xml.text.TextEditorComponent (not XmlMultiView) and it opens fine. I do not know what specific
xml wil use XmlMultiView. I created this file modified, saved, closed, exited IDE. Set system time 1 day back (from 5
Jan to 4 Jan), started IDE and opened this xml file. It works fine. I need exact reliable steps how to reproduce this
problem. Attach your testing project or send it to me directly as it seems my xml does not use correct TopComponent. Thanks.

I use Linux/Ubuntu (it might be specific to Windows only), latest daily dev build 090102 (my own build from sources).
Comment 6 navid 2009-01-09 00:37:41 UTC
Sorry to replying back late ,
I Created a new simple java project and then new simple XML file
and I set system date to 5 days back,and IDE worked fine.
my main project contains a PersistenceUnit file (persistence.xml) 
again i created a simple java application and then a PersistenceUnit file
i closed the IDE (while persistence.xml is open in workspace) and then changed system date to 5 days back
and i tried to start IDE again and... problem appeared !
I attached a simple project  .
IDE : NB6.5 Pach1
OS : Windows Vista SP1 32bit
JDK : 1.6u7
Comment 7 navid 2009-01-09 00:39:27 UTC
Created attachment 75606 [details]
Testing Project
Comment 8 mslama 2009-01-12 13:50:41 UTC
Please can you try latest dev build? I cannot reproduce this. If you can reproduce with latest dev build attach new
thread dump (there was some changes esp. in CloneableEditorSupport) and repeat steps to reproduce. Yes persistence.xml
uses multiview component. I am on Linux. I opened test project, opened persistence.xml, modified it to make sure it has
new time set. Exited IDE. Set system time 2 days (and later 5) back and started IDE. It works fine. I can eventually try
on Windows.
Comment 9 mslama 2009-01-12 14:56:38 UTC
It was fixed as issue #149717: CloneableEditorSupport.getDocument() is now non blocking call. Provided that this is
obscure use case we will not backport this into 6.5 fixes.

Yes I can reproduce this problem with NB 6.5 patch 1 build and your test project but not with current trunk dev build.
Anyway I will try to ignore event file changed when getTime is called (getTime calls first FileObject.refresh and it
causes fileChanged event for file with future time stamp).

Decreasing priority to P3 as it does not cause deadlock now.
Comment 10 mslama 2009-01-13 09:55:20 UTC
core-main #864abb604944

Ignore fileChange event from DES.Env.getTime -> FileObject.refresh. DES.Env has file change listener and generates
propertyChange event. Using FileSystem.AtomicAction fix filters out fileChange event.
Comment 11 Quality Engineering 2009-01-14 07:45:35 UTC
Integrated into 'main-golden', will be available in build *200901140201* on (upload may still be in progress)
User: Marek Slama <>
Log: #155680: Ignore fileChange event from DES.Env.getTime -> FileObject.refresh.