Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 240180 - AssertionError: Need to normalize /Users/YTN/NetBeansProjects/SpotifyPuzzles/build/classes/spotifypuzzles/zipfsong.class(class java.io.File) was /Users/YTN/NetBeansProjects/SpotifyPuzzles/build/classe
AssertionError: Need to normalize /Users/YTN/NetBeansProjects/SpotifyPuzzles/...
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Filesystems
8.0
All Mac OS X
: P3 (vote)
: 8.0
Assigned To: Jaroslav Havlin
issues@platform
EXCEPTIONS_REPORT
:
: 240659 240674 240769 240904 241110 241587 241683 241685 241843 242112 242216 242280 242378 243326 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-10 04:00 UTC by ytn01
Modified: 2014-04-04 07:58 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (7.15 KB, text/plain)
2014-01-10 04:01 UTC, ytn01
Details
stacktrace (7.15 KB, text/plain)
2014-01-10 04:03 UTC, ytn01
Details
stacktrace (7.15 KB, text/plain)
2014-01-10 04:15 UTC, ytn01
Details
Artificial Test Case (2.49 KB, patch)
2014-01-24 13:26 UTC, Jaroslav Havlin
Details | Diff
Possible fix (3.42 KB, patch)
2014-02-10 13:49 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ytn01 2014-01-10 04:00:59 UTC
Build: NetBeans IDE Dev (Build 201401090002)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Mac OS X

User Comments:
ytn01: Run my current java class.
Maximized the editor window, then run the inspector.
Corrected reported issues.
Switched to another application (firefox),... then switched back to NetBeans.
Exception was thrown.

fresler: I swtched back to Netbeans from another application.




Stacktrace: 
java.lang.AssertionError: Need to normalize /Users/YTN/NetBeansProjects/SpotifyPuzzles/build/classes/spotifypuzzles/zipfsong.class(class java.io.File) was /Users/YTN/NetBeansProjects/SpotifyPuzzles/build/classes/spotifypuzzles/Zipfsong.class(class java.io.File)
   at org.openide.filesystems.FileUtil.assertNormalized(FileUtil.java:153)
   at org.openide.filesystems.FileUtil.toFile(FileUtil.java:829)
   at org.netbeans.modules.versioning.core.api.VCSFileProxy.createFileProxy(VCSFileProxy.java:168)
   at org.netbeans.modules.versioning.masterfs.FilesystemInterceptor.fileChanged(FilesystemInterceptor.java:135)
   at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEventImpl(FCLSupport.java:178)
   at org.openide.filesystems.FCLSupport$DispatchEventWrapperMulti.dispatchAllEventsSync(FCLSupport.java:248)
Comment 1 ytn01 2014-01-10 04:01:01 UTC
Created attachment 143768 [details]
stacktrace
Comment 2 ytn01 2014-01-10 04:03:44 UTC
Created attachment 143769 [details]
stacktrace

Switched back to netbeas after working on my browser.
Comment 3 Exceptions Reporter 2014-01-10 04:03:48 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=186293
Comment 4 ytn01 2014-01-10 04:15:44 UTC
Created attachment 143770 [details]
stacktrace

Switched to netbeans which was in the background, after working on a web browser.
Comment 5 Jaroslav Havlin 2014-01-17 11:02:50 UTC
File name zipfsong.class (lower case 'z') was used instead of Zipfsong.class (upper case 'Z'). Which of the names is correct?

Did you work with the file in some other application or process in parallel?
Thank you for reporting.
Comment 6 Jaroslav Havlin 2014-01-20 07:49:54 UTC
*** Bug 240674 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Havlin 2014-01-20 08:12:34 UTC
*** Bug 240659 has been marked as a duplicate of this bug. ***
Comment 8 Jaroslav Havlin 2014-01-21 14:23:13 UTC
*** Bug 240769 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Havlin 2014-01-24 08:18:56 UTC
*** Bug 240904 has been marked as a duplicate of this bug. ***
Comment 10 Jaroslav Havlin 2014-01-24 13:26:20 UTC
Created attachment 144341 [details]
Artificial Test Case

I've been able to reproduce the bug only in a test case which seems quite artificial.
If we change case of a file name while the original name is stored in FileObj instance, the assertNormalized will fail (see attached patch).

(However, detection of changed filename case can be costly. Currently we just use File.exists to check file validity during refresh. If we also had to compare canonical names, it would affect performance.)

I haven't managed to reproduce the bug manually in the IDE yet.

It would be very helpful to have real steps to reproduce. So, please, provide any addition information. Thank you.
Comment 11 Jaroslav Havlin 2014-01-29 12:06:24 UTC
*** Bug 241110 has been marked as a duplicate of this bug. ***
Comment 12 Jaroslav Havlin 2014-01-31 16:15:13 UTC
I've managed to reproduce the bug on Mac OS X.

Steps:

1. Open or create a Java project
2. Create file NewClass.java
3. Clean and build
4. Rename NewClass.java to Newclass.java (uppercase C to lowercase c)
5. Clean and build
Comment 13 Jaroslav Havlin 2014-02-10 07:15:09 UTC
*** Bug 241587 has been marked as a duplicate of this bug. ***
Comment 14 Jaroslav Havlin 2014-02-10 13:49:03 UTC
Created attachment 144988 [details]
Possible fix

A patch that seems to be working fine. But it needs to be tested carefully.
It makes refreshing slower (comparing with normalized names), and some tests fail.
Comment 15 Jaroslav Havlin 2014-02-11 07:45:22 UTC
http://hg.netbeans.org/core-main/rev/3b82f107959b
Making assertNormalized less strict in some cases on Mac.
Thank you for reporting.
Comment 16 Ondrej Vrabec 2014-02-11 10:35:43 UTC
*** Bug 241683 has been marked as a duplicate of this bug. ***
Comment 17 Quality Engineering 2014-02-12 02:41:32 UTC
Integrated into 'main-silver', will be available in build *201402120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3b82f107959b
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #240180: AssertionError: Need to normalize - Letter case problems on Mac
Comment 18 Milos Kleint 2014-02-13 14:24:25 UTC
*** Bug 241685 has been marked as a duplicate of this bug. ***
Comment 19 Jaroslav Havlin 2014-02-17 15:32:16 UTC
*** Bug 241843 has been marked as a duplicate of this bug. ***
Comment 20 Jaroslav Havlin 2014-02-20 14:39:01 UTC
*** Bug 242112 has been marked as a duplicate of this bug. ***
Comment 21 Jaroslav Havlin 2014-02-26 05:37:46 UTC
*** Bug 242216 has been marked as a duplicate of this bug. ***
Comment 22 Jaroslav Havlin 2014-02-26 05:39:03 UTC
*** Bug 242280 has been marked as a duplicate of this bug. ***
Comment 23 Jaroslav Havlin 2014-02-27 07:12:26 UTC
*** Bug 242378 has been marked as a duplicate of this bug. ***
Comment 24 Jaroslav Havlin 2014-04-04 07:58:53 UTC
*** Bug 243326 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo