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.
[ JDK VERSION : 1.6 ] Hi, It happens quite often that when I edit a VD-managed file from the code-editor. Then switch to the flow-designer or the form-designer and then back to the code-editor, the whole file is one big guarded block. I can't edit anything anymore but through the Form and Flow designers. The resolution is to close the file and open it again, than it all seems to work. I haven't been able to find the recipe to reproduce the problem, but it happens in about 80% of the times I do a lot of editing in a VD managed file. Iwan
I'm not able to reproduce. Iwan, could you please try these steps when it happens next time: 1, backup the affected file on disc 1.5 make a screenshot and attach it here 2, save the affected file 3, close the file 3.5 compare the saved and backup file - if they are different attach them here or at least attach diff 4, reopen the file in IDE thanks for report
decreasing priority to P3. This is random issue and seems that it can be even editor issue. More informations needed or reproducible testcase - reassigning
Okay, I followed the provided steps right when I noticed the erroneous guarding blocks. The file hadn't changed, so I couldn't safe it, and so there are no differences. But here're some screenshots.
Created attachment 28274 [details] The screenshots that go with this issue.
Created attachment 28284 [details] eising screenshot 1
Created attachment 28285 [details] eising screenshot 2
Created attachment 28286 [details] eising screenshot 3
I re-attachd iwan's pictures again. They were in one big zip/doc file. It was too complicated download, unzip, open in OpenOffice and look at it. David, look at it please. I would like to know if it is issue of mobility pack or editor or cvs etc. thanks Note that the jdk is 6
Over the weekend I tried with JDK 1.5_04 with the same results. I noticed that quite often when NB is started and the MIDlet is opened in the editor (source editor) but not the current tab, the code gets guarded when I make the file the current tab. Iwan
Hi Iwan, Does this bug happening when you are switching to the Source tab for the first time? I see that you are using preprocessor directives in the Designer file. Could you try to reproduce this problem on a file without these directives? I have attached a small module for dumping the internal document. I would like find out whether the guarded-blocks markers are broken or not. Please, unzip the file into NetBeansInstallDir/extra directory. When a problem happens again, select an appropriate file in the Projects window and invoke "Main Menu | Tools | Dump Editor Data" action. It writes debug messages into your messages.log file. Could you send me that file or its latest part? Also when the problem happens, could you try to do a small change in the Flow/Screen Design, switch back to Source tab and save/dump the editor (of course, backup your files on HDD). Check whether the newly-saved file is corrupted when you open it again or not. I am starting to think that the problem is a race-condition while a document is loading into the memory and javaeditor creates guarded-blocks for it. Thanks, David
Created attachment 28311 [details] Editor Dumper module
Hi David, I'm not aware of any directives in the designer file, I didn't put them there. I did create the directory <NETBEANS>/extra and unzipped your module into that. Once I come across the problem again, I'll do as you asked. No problem. It will be with the project I'm working on though, so if that means that its a design file with directives, than I'm sorry, but at the moment I'm a bit tight in my time due to some other projects. Btw, it doesn't only happen the first time I switch to the source tab, sometimes it just happens without any clear reason. Iwan
The new module doesn't seem to have installed correctly, maybe I did something wrong? Iwan
Created attachment 28323 [details] This is the MIDlet that has the problems
Created attachment 28324 [details] This is the corresponding designer file
I just attached my sources so you can see that there's nothing weird in them. With the 20060105 it happens less frequent, only once tonight. Closing the file and opening it again solved the problem. Your race-condition idea might be on the spot, at least sounds plausible. Iwan
HI Iwan, I saw the proprocessor directive at pic2.jpg screenshot. Regarding the dump module: It should be working. Lukasi, could you try it. Maybe I did compiled it again the 5.1 and it is not working in 5.0 because of dependencies. It is bad that it happens not only for the first time. Therefore the bug will be somewhere else and I even do not know where. Anyway let's dump the editor data first and then probably we would have to be adding additional messages until we find it. Hope the bug is not in Java-guarded-blocks implementation because it is not easy to trace it.
I unzipped the module to 'extra' directory in nb_instal_dir. When I restarted NetBeans then the action "Tools | Dump Editor Data" is there and works when there's opened a mvd file in editor. There appeared something like bellow in <userdir>/var/log/messages.log ========== EDITOR TEXT DUMP END ========== SECTION: MVDFields - class org.netbeans.modules.java.JavaEditor$SimpleSection TEXT: private Form helloForm; private StringItem helloStringItem; private Command exitCommand; BEGIN: 351 private Form helloForm; private StringItem helloStringItem; private END: 492
there was issue 66744 fixed on Thursday. It is about similar problem in j2se form editor. They verified that it shouldn't happen in build 200601052030... but it happend. It might mean 1, it is mobility pack problem 2,their fix wasn't complex Unfortunatelly, I'm still unable to reproduce
Sorry, I looked at the Tools menu when rightclicking on the file, through the menu it is there, next time it happens, I'll send the log. I'm pretty sure that it happened on the 200601052030 build yesterday, but I'll keep my eyes open, I just reinstalled it and deleted all other netbeans dirs and userdirs. Iwan
This hasn't happened for me ever since I installed RC1. Although due to some other project I had to work on (in WSAD) I haven't spend real much time with it. I'll keep my eye open though. Iwan
this is good news
moving to mobility component
Iwan, have it happend to you in last months? Otherwise I would close this bug.
As a matter of fact, since working with beta 1 of 5.5 it hasn't happened anymore.
thanks, Iwan. I'm closing as works for me now. Feel free to reopen when it appears again