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 163657 - empty file
Summary: empty file
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-25 09:24 UTC by menic
Modified: 2009-05-19 17:27 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
message.log (26.92 KB, text/plain)
2009-04-27 21:34 UTC, menic
Details
clean users dir log (21.33 KB, text/plain)
2009-04-28 10:56 UTC, menic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description menic 2009-04-25 09:24:05 UTC
When I give a file a specific name for example FrontUserModule.class.php it opens in editor as empty file but in real it
has a content. When i change the filename to something else it works ok.
Comment 1 Tomas Mysik 2009-04-27 10:12:04 UTC
Filipe, could you please try to reproduce? It wouldn't be P3... Thanks.
Comment 2 Filip Zamboj 2009-04-27 18:05:53 UTC
didn't reproduce on 
Product Version: NetBeans IDE Dev (Build 200904270201)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02

could you provide your build number (could be found in Help -> About), Attach message log from your userdir (path to be
found in Help -> About as well, so <userdir>/var/log/messages.log).

Bug is incomplete until you don't provide above mentioned information but 2 weeks at most. After 2 weeks will be either
Started or Closed. 

Thanks a lot! 
Comment 3 menic 2009-04-27 21:33:38 UTC
It happens since nb 6.7 m3. I have attached a message.log.
Comment 4 menic 2009-04-27 21:34:39 UTC
Created attachment 81012 [details]
message.log
Comment 5 Tomasz Slota 2009-04-28 10:50:29 UTC
Can you reproduce the problem on a fresh user dir? see http://wiki.netbeans.org/FaqAlternateUserdir? Thanks a lot!


The log contains a weird looking exception from Radek's code (Ctrl+P handler), but I don't think this exception could be causing the symptoms described.

SEVERE [org.openide.util.RequestProcessor]
java.lang.AssertionError
	at org.netbeans.modules.php.editor.model.impl.VariousUtils.getElemenst(VariousUtils.java:366)
	at org.netbeans.modules.php.editor.model.ParameterInfoSupport.parametersTokenImpl(ParameterInfoSupport.java:235)
	at org.netbeans.modules.php.editor.model.ParameterInfoSupport.getParameterInfo(ParameterInfoSupport

	at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider$JavaCompletionQuery.resolveToolTip(GsfCompletionProvider.java:442)
	at org.netbeans.modules.php.editor.PHPCodeCompletion.parameters(PHPCodeCompletion.java:1499)


Comment 6 menic 2009-04-28 10:55:23 UTC
At the moment file is calles FrontUsrModule.class.php. When I change it to FrontUsersModule.class.php it opens empty.
Here is a message.log from clean user dir.
Comment 7 menic 2009-04-28 10:56:05 UTC
Created attachment 81056 [details]
clean users dir log
Comment 8 Tomasz Slota 2009-04-28 11:21:03 UTC
How do you change the name? using NetBeans or some external tool? Would you mind attaching the complete file? you can also send it by email for more 
privacy: tomslot@sun.com

Here is an extract of suspicious lines from the log

WARNING [org.netbeans.modules.editor.lib2.highlighting.CompoundHighlightsContainer]: Corrupt layer found 
(#0:org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting@13acc3f). End offset 145 should be <=134. Clipping...
WARNING [org.netbeans.modules.editor.lib2.highlighting.CompoundHighlightsContainer]: Corrupt layer found 
(#0:org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting@13acc3f). Start offset 133 should be >=134. Clipping...
WARNING [org.netbeans.modules.editor.lib2.highlighting.CompoundHighlightsContainer]: Corrupt layer found 
(#0:org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting@13acc3f). End offset 300 should be <=276. Clipping...
INFO [org.netbeans.modules.csl.hints.GsfHintsProvider]: SemanticHighlighter: Cannot get document!
INFO [org.netbeans.modules.csl.hints.GsfHintsProvider]: SemanticHighlighter: Cannot get document!
INFO [global]: MarkOccurencesHighlighter: Cannot get document!
INFO [global]: MarkOccurencesHighlighter: Cannot get document!
Comment 9 Filip Zamboj 2009-04-28 11:31:39 UTC
will try to reproduce on mentioned build. 
Confirmed as P1. 

@reporter: is there any chance to get the file? It looks a bit like there is some problem reading your code. Thanks a lot! 
Comment 10 menic 2009-04-28 11:44:58 UTC
I rename it using nb:  right click on file in projects window and select rename.
The content of the file does not matter. It happens when file has only one character as well as a bigger content.
Comment 11 Tomasz Slota 2009-04-29 12:49:30 UTC
What happens when you try to type in the window? Does switching the tab change anything? What about restarting the IDE? I still cannot reproduce it... 
Comment 12 menic 2009-04-29 13:06:22 UTC
In file properties window file Size is correct. Switching the tab, does not change anything. Typing in window works
normal. When I save file, close and open again, it comes empty.
Comment 13 Tomasz Slota 2009-04-29 13:38:52 UTC
so the steps are as follows (please correct me if I am wrong):

- you create a new file, it has the default content, everything looks OK
- you rename it to something else - the content disappears - you can type but when you reopen the file the editing pane is empty
- you rename the file again - the content appears again

Is your project placed on a local drive? 

Can I please have your phone number? (you can send it to Tomasz.Slota@Sun.COM)
Comment 14 Filip Zamboj 2009-04-30 15:31:35 UTC
it looks like this could be xp specific issue. I didn't reproduce on linux - not even went into troubles.  
Comment 15 Filip Zamboj 2009-05-04 12:08:38 UTC
didn't reproduce on build 200905040201 on XPx32

closing as WORKSFORME. Any reproducible use-case would be appreciated (including steps to reproduce). 

Comment 16 Filip Zamboj 2009-05-04 12:11:54 UTC
@reporter: if we create a new build for you with extra logging information, would you reproduce this o your system? It
would help us a lot! Thanks a lot. 
Comment 17 menic 2009-05-05 08:27:41 UTC
sure. It is not a problem :)
Comment 18 Filip Zamboj 2009-05-05 11:19:22 UTC
@tslota: Tomasz, could you provide build to menic (as we discussed yesterday), please. 
Comment 19 Vitezslav Stejskal 2009-05-06 10:45:34 UTC
You can run the IDE with -J-Dnetbeans.debug.editor.document=true and it will log all inserts/removes in all editor
documents. I also improved the logging so that it would show the file that the document was loaded from -
http://hg.netbeans.org/jet-main/rev/a77667723ec8. But you probably don't have to wait for this changeset. If you only
open a single file then there should be only one document.
Comment 20 Filip Zamboj 2009-05-14 13:36:50 UTC
@reporter: did you try to reproduce using info from vstejskal? Is it still reproducible? Do you need help with running
IDE using the switch? 

"INCOMPLETE" until the answer from reporter. (Please, let me note that we usually close INCOMPLETE issues after 2 weeks
of inactivity). 

Thanks a lot! 
Comment 21 menic 2009-05-19 17:27:35 UTC
Sorry for non answer - recently i dont have to much time to test it. I will try to reproduce it today.