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 209904 - AssertionError: Need to normalize D:\Program Files\NetBeans Dev 201203210400\.!
Summary: AssertionError: Need to normalize D:\Program Files\NetBeans Dev 201203210400\.!
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.2
Hardware: All All
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 199551 205165 208325 209420 212231 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-22 06:19 UTC by MackSix
Modified: 2013-01-21 09:21 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 185644


Attachments
stacktrace (1.33 KB, text/plain)
2012-03-22 06:19 UTC, MackSix
Details
stacktrace (2.36 KB, text/plain)
2012-03-22 06:34 UTC, MackSix
Details
Project that exhibits the problem. (16.09 KB, application/zip)
2012-03-22 06:36 UTC, MackSix
Details
2nd Project that exhibits the problem. (17.21 KB, application/zip)
2012-03-22 06:51 UTC, MackSix
Details
stacktrace (9.13 KB, text/plain)
2012-03-28 08:44 UTC, stefan79
Details
stacktrace (1.28 KB, text/plain)
2012-03-28 08:47 UTC, stefan79
Details
stacktrace (2.23 KB, text/plain)
2012-03-28 08:50 UTC, stefan79
Details
stacktrace (7.01 KB, text/plain)
2012-04-18 14:53 UTC, tim_sa
Details
log file (47.94 KB, text/plain)
2012-05-09 12:51 UTC, MackSix
Details
Another log file - I had to kill NetBeans process this time. (299.74 KB, text/plain)
2012-05-09 20:00 UTC, MackSix
Details
First Project to use for reproduction. (33.39 KB, application/zip)
2012-05-16 13:24 UTC, MackSix
Details
Second Project to use for reproduction. (23.29 KB, application/zip)
2012-05-16 13:24 UTC, MackSix
Details
new-209904-refactoringtest_1.zip (23.29 KB, application/zip)
2012-06-15 03:47 UTC, MackSix
Details
Log File 06.15.2012 (83.21 KB, text/plain)
2012-06-15 12:57 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-03-22 06:19:44 UTC
Build: NetBeans IDE Dev (Build 201203210400)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows Vista

Stacktrace: 
java.lang.AssertionError: Need to normalize D:\Program Files\NetBeans Dev 201203210400\.!
   at org.openide.filesystems.FileUtil.assertNormalized(FileUtil.java:140)
   at org.openide.filesystems.FileUtil.normalizeFile(FileUtil.java:1742)
   at org.openide.loaders.DataFolder$FolderNode.createNodeTransferable(DataFolder.java:1421)
   at org.openide.loaders.DataFolder$FolderNode.createPasteTypes(DataFolder.java:1402)
   at org.openide.nodes.AbstractNode.getPasteTypes(AbstractNode.java:543)
   at org.openide.nodes.FilterNode.getPasteTypes(FilterNode.java:696)
Comment 1 MackSix 2012-03-22 06:19:49 UTC
Created attachment 117044 [details]
stacktrace
Comment 2 MackSix 2012-03-22 06:34:14 UTC
Created attachment 117045 [details]
stacktrace
Comment 3 MackSix 2012-03-22 06:36:05 UTC
Created attachment 117046 [details]
Project that exhibits the problem.

1) Open attached project.
2) Expand tree in Project Window to view "actiontest" package under "Source Packages".
3) Click on "actiontest" package.

This AssertionError is thrown.
Comment 4 MackSix 2012-03-22 06:51:50 UTC
Created attachment 117047 [details]
2nd Project that exhibits the problem.

Actually, this problem is caused by closing a project, then deleting the project folder and replacing it with another project with the same name, package and file names.

Steps continued from comment #3

4) After doing steps in comment #3 and no AssertionError is thrown, close the project from the Project Window.
5) Delete the project folder from your Netbeans project directory and replace it with the 2nd attached project.
6) Repeat steps 1 through 3 in comment #3.

AssertionError is thrown.
Comment 5 stefan79 2012-03-28 08:44:22 UTC
Created attachment 117377 [details]
stacktrace
Comment 6 stefan79 2012-03-28 08:47:19 UTC
Created attachment 117378 [details]
stacktrace
Comment 7 stefan79 2012-03-28 08:50:18 UTC
Created attachment 117379 [details]
stacktrace
Comment 8 Jaroslav Tulach 2012-04-04 15:16:10 UTC
*** Bug 209420 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Tulach 2012-04-04 15:16:23 UTC
*** Bug 208325 has been marked as a duplicate of this bug. ***
Comment 10 Jaroslav Tulach 2012-04-04 15:16:40 UTC
*** Bug 199551 has been marked as a duplicate of this bug. ***
Comment 11 Jaroslav Tulach 2012-04-04 15:16:55 UTC
*** Bug 205165 has been marked as a duplicate of this bug. ***
Comment 12 tim_sa 2012-04-18 14:53:27 UTC
Created attachment 118461 [details]
stacktrace

Changed from one project group to another
Comment 13 Jaroslav Tulach 2012-04-26 14:28:56 UTC
More logging in ergonomics#082dcd41836e
Comment 14 Quality Engineering 2012-05-02 10:04:26 UTC
Integrated into 'main-golden', will be available in build *201205020400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/082dcd41836e
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #209904: Log also the normalized path
Comment 15 Marian Mirilovic 2012-05-07 08:31:24 UTC
Not worksforme, not fixed ... added logging, so waiting for additional report - incomplete for now -reconsider once you have new data from logging.

BTW: 91 ERs -> P1
Comment 16 MackSix 2012-05-09 12:50:31 UTC
Exception Reporter created new report here: http://netbeans.org/bugzilla/show_bug.cgi?id=212231

I attached messages.log for the same exception here.
Comment 17 MackSix 2012-05-09 12:51:25 UTC
Created attachment 119201 [details]
log file
Comment 18 MackSix 2012-05-09 20:00:31 UTC
Created attachment 119235 [details]
Another log file - I had to kill NetBeans process this time.

This time, I could not type in the exception reporter or cancel it. The reporter kept popping up the same exception. I had to kill the NetBeans process to stop it.
Comment 19 MackSix 2012-05-16 13:23:56 UTC
I can reproduce this with the attached projects.

1) Open up project in Open_First.zip with no other projects open.
2) Open up the root node and the package nodes to view the files.
3) Open up files WithInner.java, WithInner1.java, Person.java, NewClass3.java, SuperClass.java in that order in Editor.
4) Now close files in reverse order.
5) Close the project.
6) Rename project on disk to RefactoringTest_1-bak with Windows.
7) Open up project in Open_Second.zip.
8) 2 Files will be already open, but still Repeat steps 2 - 4 clicking on files already open as if they were closed.
9) Click on + on Root Node of Project to Collapse it.

This AssertionError should be thrown.

I was able to repeat it 4 times. 2 times with empty userdir and cachedir.

Product Version: NetBeans IDE Dev (Build 201205140400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 20 MackSix 2012-05-16 13:24:31 UTC
Created attachment 119530 [details]
First Project to use for reproduction.
Comment 21 MackSix 2012-05-16 13:24:56 UTC
Created attachment 119532 [details]
Second Project to use for reproduction.
Comment 22 Jaroslav Tulach 2012-05-23 22:18:10 UTC
*** Bug 212231 has been marked as a duplicate of this bug. ***
Comment 23 stefan79 2012-06-01 12:57:41 UTC
I had the same Problem:
-) After switching to NB, I got many (after 20 clicks, I killed NB) AssertionError
-) Then I restarted NetBeans, but the errors were still there
-) Then I closed all open editor windows, and restarted NB, but the Error were still alive
-) After closing NB, clearing the cache and starting NB, everything works as expected.


Product Version: NetBeans IDE Dev (Build 201205300001)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1252; de_AT (nb)
Comment 24 Jaroslav Tulach 2012-06-08 08:44:36 UTC
(In reply to comment #19)
> I can reproduce this with the attached projects.
> 
> 1) Open up project in Open_First.zip with no other projects open.
> 2) Open up the root node and the package nodes to view the files.
> 3) Open up files WithInner.java, WithInner1.java, Person.java, NewClass3.java,
> SuperClass.java in that order in Editor.
> 4) Now close files in reverse order.
> 5) Close the project.
> 6) Rename project on disk to RefactoringTest_1-bak with Windows.
> 7) Open up project in Open_Second.zip.
> 8) 2 Files will be already open, but

No files were open in my case. I would be surprised if they were.

> already open as if they were closed.
> 9) Click on + on Root Node of Project to Collapse it.
> 
> This AssertionError should be thrown.

Nothing. No error. I was using: (Build 20120604-1c9229157fb9)
Comment 25 Jaroslav Tulach 2012-06-08 08:48:43 UTC
(In reply to comment #23)
> -) After closing NB, clearing the cache and starting NB, everything works as
> expected.

Clearing the cache has no influence on this problem, as far as I can tell. Enough to restart.
Comment 26 Jaroslav Tulach 2012-06-08 09:18:16 UTC
No report since May 30, 2012: that would be nice. Still, I am adding earlier assert: ergonomics#f149a2d25638
Comment 27 Quality Engineering 2012-06-09 04:33:13 UTC
Integrated into 'main-golden', will be available in build *201206090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f149a2d25638
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #209904: Earlier warning when name that ends with '.' is stored in the map
Comment 28 MackSix 2012-06-15 02:11:29 UTC
(In reply to comment #24)
> (In reply to comment #19)
> > I can reproduce this with the attached projects.
> > 
> > 1) Open up project in Open_First.zip with no other projects open.
> > 2) Open up the root node and the package nodes to view the files.
> > 3) Open up files WithInner.java, WithInner1.java, Person.java, NewClass3.java,
> > SuperClass.java in that order in Editor.
> > 4) Now close files in reverse order.
> > 5) Close the project.
> > 6) Rename project on disk to RefactoringTest_1-bak with Windows.
> > 7) Open up project in Open_Second.zip.
> > 8) 2 Files will be already open, but
> 
> No files were open in my case. I would be surprised if they were.

Every time I open the 2nd project, it opens up with NewClass3.java and Person.java opens up automatically. It does this on new installations of Netbeans with empty userdir and cachedir. Where is the information stored that opens up this 2 files when the project is open?

> > already open as if they were closed.
> > 9) Click on + on Root Node of Project to Collapse it.
> > 
> > This AssertionError should be thrown.
> 
> Nothing. No error. I was using: (Build 20120604-1c9229157fb9)

If you keep repeating the steps and alternating the projects, it will eventually happen. It still happens for me on the 20120614 build
Comment 29 MackSix 2012-06-15 03:47:06 UTC
Created attachment 120879 [details]
new-209904-refactoringtest_1.zip

I have tried this on 3 different computers and it throws this AssertionError every time.

1) Open the latest project in NetBeans (new-209904-refactoringtest_1.zip).
2) Click + to open "Source Packages" node.
3) Double click on the name "newpackage". (Do not click the + button, double click on the name)

The AssertionError is thrown.

Product Version: NetBeans IDE Dev (Build 201206140001)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 30 Jaroslav Tulach 2012-06-15 09:55:15 UTC
Where is your log file, MackSix? The newest report I see in exception report is from 120608...
Comment 31 MackSix 2012-06-15 12:57:05 UTC
Created attachment 120906 [details]
Log File 06.15.2012

Here is a log file. It keeps throwing the AssertionError until I close the tree.
Comment 32 MackSix 2012-06-16 22:23:23 UTC
This happens on all projects now if a package node name is double clicked.
Comment 33 MackSix 2012-06-16 22:29:18 UTC
I can't even use Dev 201206160001 because if I right click a node on any project, this is thrown and I can't make it stop unless I close the root node of the project and I can't add any files or packages to it.
Comment 34 Jaroslav Tulach 2012-06-18 12:03:53 UTC
What file you are trying to normalize? It is '"'!?

Original file " normalized: D:\Program Files\NetBeans Dev 201206140001\.
  org.openide.filesystems.FileUtil.normalizeFileCached(FileUtil.java:1769)
  org.openide.filesystems.FileUtil.normalizeFile(FileUtil.java:1750)
  org.openide.loaders.DataFolder$FN.createNodeTransferable(DataFolder.java:1421)
Comment 35 Jaroslav Tulach 2012-06-19 07:40:23 UTC
Looks like an assert triggered by normalizing some non-sense filename (e.g. '"'). Asserts will be disabled in 7.2 release and it should not matter when a non-sense is not normalized. Adding NO72 keyword.
Comment 36 Jaroslav Tulach 2012-06-19 13:25:48 UTC
The "-case is fixed:
http://hg.netbeans.org/ergonomics/rev/2bcf0c542704
but I don't consider it important to be backported to 7.2.
Comment 37 MackSix 2012-06-19 13:28:55 UTC
(In reply to comment #36)
> The "-case is fixed:
> http://hg.netbeans.org/ergonomics/rev/2bcf0c542704
> but I don't consider it important to be backported to 7.2.

Where is it getting the " from?
Comment 38 Quality Engineering 2012-06-22 04:48:24 UTC
Integrated into 'main-golden', will be available in build *201206220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2bcf0c542704
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #209904: Double normalization to deal with filename being a 'quote'.
Comment 39 dba-daniel 2013-01-11 11:09:42 UTC
Hi, I got the same error after try integrate the db api on my module

that is how I did the integration:

 DatabaseExplorerUIs.connect(jComboBox1, ConnectionManager.getDefault());

error:
java.lang.AssertionError: Need to normalize \ was D:\
	at org.openide.filesystems.FileUtil.assertNormalized(FileUtil.java:141)
	at org.openide.filesystems.FileUtil.toFile(FileUtil.java:1016)
	at org.netbeans.modules.db.explorer.dlg.AddDriverDialog.setDriver(AddDriverDialog.java:202)
	at org.netbeans.modules.db.explorer.dlg.ChoosingDriverUI.updateState(ChoosingDriverUI.java:132)
	at org.netbeans.modules.db.explorer.dlg.ChoosingDriverUI.addNotify(ChoosingDriverUI.java:96)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at java.awt.Container.addNotify(Container.java:2769)
	at javax.swing.JComponent.addNotify(JComponent.java:4743)
	at javax.swing.JRootPane.addNotify(JRootPane.java:756)
	at java.awt.Container.addNotify(Container.java:2769)
	at java.awt.Window.addNotify(Window.java:770)
	at java.awt.Dialog.addNotify(Dialog.java:755)
	at org.netbeans.core.windows.services.NbPresenter.addNotify(NbPresenter.java:464)
	at java.awt.Window.pack(Window.java:807)
	at org.netbeans.core.windows.services.NbPresenter.initialize(NbPresenter.java:270)
	at org.netbeans.core.windows.services.NbPresenter.<init>(NbPresenter.java:200)
	at org.netbeans.core.windows.services.NbDialog.<init>(NbDialog.java:67)
	at org.netbeans.core.windows.services.DialogDisplayerImpl$1.run(DialogDisplayerImpl.java:152)
	at org.netbeans.core.windows.services.DialogDisplayerImpl$1.run(DialogDisplayerImpl.java:116)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
	at org.openide.util.Mutex.readAccess(Mutex.java:273)
	at org.netbeans.core.windows.services.DialogDisplayerImpl.createDialog(DialogDisplayerImpl.java:116)
	at org.netbeans.modules.db.explorer.dlg.AddConnectionWizard.openWizard(AddConnectionWizard.java:123)
	at org.netbeans.modules.db.explorer.dlg.AddConnectionWizard.showWizard(AddConnectionWizard.java:115)
	at org.netbeans.modules.db.explorer.action.ConnectUsingDriverAction$NewConnectionDialogDisplayer.showDialog(ConnectUsingDriverAction.java:117)
	at org.netbeans.modules.db.explorer.action.ConnectUsingDriverAction$NewConnectionDialogDisplayer.showDialog(ConnectUsingDriverAction.java:113)
	at org.netbeans.api.db.explorer.ConnectionManager$1.run(ConnectionManager.java:262)
	at org.openide.util.Mutex.doEvent(Mutex.java:1343)
	at org.openide.util.Mutex.readAccess(Mutex.java:350)
	at org.netbeans.api.db.explorer.ConnectionManager.showAddConnectionDialog(ConnectionManager.java:259)
	at org.netbeans.api.db.explorer.ConnectionManager.showAddConnectionDialog(ConnectionManager.java:225)
	at org.netbeans.api.db.explorer.support.DatabaseExplorerUIs$ConnectionDataComboBoxModel.newItemActionPerformed(DatabaseExplorerUIs.java:115)
	at org.netbeans.modules.db.util.DataComboBoxSupport$ItemActionListener.actionPerformed(DataComboBoxSupport.java:260)
	at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
	at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588)
	at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.Component.processMouseEvent(Component.java:6505)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499)
	at java.awt.Component.processEvent(Component.java:6270)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
	at java.awt.EventQueue.access$000(EventQueue.java:102)
	at java.awt.EventQueue$3.run(EventQueue.java:662)
	at java.awt.EventQueue$3.run(EventQueue.java:660)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:676)
	at java.awt.EventQueue$4.run(EventQueue.java:674)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Comment 40 Jaroslav Tulach 2013-01-14 10:34:52 UTC
Thanks for reopening P1 issue. Exception report does not show any error since 7.2 version. No reports were reported in 7.3. Your last report is missing detailed information about the IDE you are using, etc. Closing as fixed again.

If you managed to reproduce the problem in 7.3, still consider reporting new bug, rather than opening P1 issue.