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 187487 - Non visible source file: IM??stnost_115.java
Summary: Non visible source file: IM??stnost_115.java
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Petr Nejedly
URL:
Keywords:
Depends on: 189988
Blocks:
  Show dependency tree
 
Reported: 2010-06-11 14:18 UTC by rudyment
Modified: 2010-11-12 10:10 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
zipped log files (47.81 KB, application/zip)
2010-06-11 17:54 UTC, rudyment
Details
Zipped problematic project (36.54 KB, application/zip)
2010-06-16 18:07 UTC, rudyment
Details
Screenshot of a dialog with an error message (46.38 KB, image/png)
2010-06-16 18:13 UTC, rudyment
Details
Self-extracting archive (JAR file) with a NetBeans project (52.58 KB, application/java-archive)
2010-11-06 14:26 UTC, rudyment
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rudyment 2010-06-11 14:18:33 UTC
Product Version = NetBeans IDE 6.9 RC2 (Build 201005312001)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01

After refactoring the IDE didn’t see one source file despite operating system and other programs saw it. Restarting IDE didn’t help. I had to start NB 6.8, correct one small error in source code of this file, clean and build project. 

After closing the NB 6.8 and opening NB 6.9 RC2 the file started to be visible. However after some modifications of other files it again disappeared and I had to repeat the process with opening and rebuilding the project in NB 6.8.
Comment 1 rudyment 2010-06-11 17:54:04 UTC
Created attachment 100029 [details]
zipped log files

Log files to the described problem
Comment 2 rudyment 2010-06-16 18:07:24 UTC
Created attachment 100139 [details]
Zipped problematic project

The error appeared in new project. One of files is invisible in project window as wel as in File window. However th open window see it. But if I ask for opening, th IDE halts.

However the compiler and ANT see it, becouse "Clean and Build" finished without problems. Despite it the editor still anounced errors and the sucessfully compiled source file was still invisible for Preject and File panel.

I send this miniproject in a ZIP file. The "invisible file" is the source file of class

adventura_115_10J.rámec.IMístnost_115;

however, similarly named class

adventura_101_09P.rámec.IMístnost

is visible without problems.

In addition, when I write the import statement, IDE can suggest the first package, then I have to continue withou suggestions until I write the whole name "rámec" a then IDE again continues with suggestion - however the "invisible class" is not among the suggested names.

The version 6.8 had not these problems - they came with the new version of NB.
Comment 3 rudyment 2010-06-16 18:13:48 UTC
Created attachment 100140 [details]
Screenshot of a dialog with an error message

In adition whe I want to create a new interface in the root package, IDE created an empty file with the given name, but then announced the error shown in the attached screenshot. Other programs has no problems with this file.
Comment 4 Tomas Zezula 2010-06-21 11:31:50 UTC
Returning back to filesystems.
The file is shown neither in package view nor in files view. And it's not shown as it's not returned by FileObject.getChildren().
FileObject("TEST_NB_6.9/src/adventura_115_10J/r†mec").getChildren() returns 10 children but there is 11 of them and the missing is IM??stnost_115.java
Comment 5 Jaroslav Tulach 2010-08-30 07:54:09 UTC
Please note that just running jar tool on the ZIP fails:

$ jar xf zipped-problematic-project.zip 
java.lang.IllegalArgumentException
        at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:324)
        at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:264)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:91)
        at sun.tools.jar.Main.extract(Main.java:868)
        at sun.tools.jar.Main.run(Main.java:260)
        at sun.tools.jar.Main.main(Main.java:1167)
Comment 6 Jaroslav Tulach 2010-08-30 08:04:12 UTC
I don't think I can do anything with this. The ZIP contains wrong UTF-8 characters and Java is incapable to work with such directories. Try to run following program on content of your ZIP:

import java.io.File;

class list {
  public static void main(String[] args) {
      File f = new File(args[0]);
      for (String s : f.list()) {
          System.out.println(s);
      }
  }
}

TEST_NB_6.9/src/adventura_101_09P$ java list r?mec
Exception in thread "main" java.lang.NullPointerException
        at list.main(list.java:8)

Fix the ZIP encoding and the problem shall disappear.
Comment 7 rudyment 2010-11-06 14:26:17 UTC
Created attachment 102830 [details]
Self-extracting archive (JAR file) with a NetBeans project

I attached a self-extracting JAR file containing a super simple NetBeans project demonstrating the mentioned problem.

In this project there are two files in the root folder: 

IM\u00EDstnost.java
IM\u00EDstnost_115.java

The first one is visible in the project window but the second one is not.
As you can see, these names differs only by the suffix “_115” in the name of the second (non visible) file.

The problem occurred on Czech Windows 7, version 6.1, build 7600.

The problem occurred also in the NetBeans 7 M2.
Comment 8 Jaroslav Tulach 2010-11-08 08:39:12 UTC
Last week we fixed bug 189988 which may be closely related to this problem. I tried to unpack the JAR file with NetBeans project in today's build:

$ unzip 102830.jar

The file IM+-*stnost.java is shown. But only until for a while - either after few minutes or after refresh after main window is activated (yes, I am observing bug 191720). Either this is slightly different problem or bug 189988 is not properly fixed.


Btw. I also tried
$ jar xf 102830.jar 
and that worked fine on Kubuntu 10.10 (as it created proper UTF-8 characters).
Comment 9 Petr Nejedly 2010-11-08 13:32:55 UTC
I have tracked this problem down the the FileName encoding of IMístnost_115.java as IMírnost_115.java (notice the off-by-one difference after the problematic letter). The FS couldn't find the file (under the broken name) then, which leads to host of other problems (like issue 190949, reported by one of the evaluators, it seems ;-)).

Luckily, the problem really went away with the fix for bug 189988. 
Once I updated openide.utils, I'm no longer able to reproduce this, but if I rollback oou.CharSequences to 3b8b7f3f4d66, it appears again and a similar problem is caught by (new) CharSequencesTest.testMaths:
expected:<11ü[1]111111111111> but was:<11ü[0]111111111111>

So I believe this is fixed now, though I'll commit the test I wrote while evaluating this...
Comment 10 Petr Nejedly 2010-11-08 14:27:09 UTC
Test:
http://hg.netbeans.org/core-main/rev/5055c33c1579
Comment 11 Quality Engineering 2010-11-10 06:14:27 UTC
Integrated into 'main-golden', will be available in build *201011100000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5055c33c1579
User: Petr Nejedl
Comment 12 rudyment 2010-11-12 10:10:30 UTC
I've tried the build 201011100000 on my computer and now all the previously problematic files really started to be visible.