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.
I send a zip-file with 3 pictures one java and one form-File. The pictures show some garbled output, which happens when I open the acompanied file and set the cursor using the mouse. I included the positionoutput to show where the cursor is supposed to be. The problem occurs not only with forms but also sometimes with some java-files. When it happens, only restarting the ide helps to make editing the file possible again. Picture 1: the first line should be there Picture 2: the first line should be there, line 3 should not be empty Picture 3: the package seems to have got the "p" of import in the following line
Created attachment 3485 [details] 3 bmp-Pictures, one java, one form-file
I had similar problem and solved it by installing newer W2000 driver for my graphic card. Then everything was OK. It was not problem of NetBeans, but OS vs JDK. What other think about this issue?
I try to add two pictures showing a difference between the debuggermarks of 1 line. I have great problems in believing this is related to my graphic-card since I do not have other problems with it and normaly java should be plattform-independend and how should the grafic-card know exactly how to garble the output linewise. But I will try other resolutions and to get a newer driver.
I was also surpriced by it and did not believe it till it solved my problems. In my case the menu were not redrawn after closing. And new driver solved it. But! it does not mean that this is also your case. Maybe the problem is somewhere else, but we did not have problems with redrawing for a very long time, so the OS cause seems to me as most probable. Btw. which version of JDK do you use?
Other resolution does not work because of my laptop (thinkpad t20, S3 Savage IX). I updated the driver but got the same results. It is possible for the same file first to be shown correctly and after some time the effects starts to be shown. I suspect it is related to how much memory is used or how often garbage collection has been called ?? I am using jdk1.3.1_01 and the server-hotspot. I will switch to the client hotspot the next time. I could not attach further pictures but can tell that the debugger shows the correct for the active line or the breakpoint on the correct line but the glyph (I think you call the colorful dots that) on the left margin are sometimes shown one line down. This is related to the fact, that the first line is not shown. left margin
happens only on server hotspot
Under my memoryconditions I can only work with server-hotspot engine. So I raised the importance
So when it only happens on server hotspot it is not NB issue but the JVM issue or better the server hotspot issue. I think that the best would be to enter the JDK BugParade bug at http://developer.java.sun.com/developer/bugParade/index.jshtml where you would describe your configuration etc. I would assume that this is something that should be at least P2 for the hotspot team because although this is not data loss it is in fact graphical data loss. I was searching bug parade for "server hotspot" but the only thing I've found was issue 4272057 which is unrelated to your problems. I'm closing this bug here, please reopen if necessary. Mila
Thank you very much for your efforts so far, you are right it could be only a problem of the server hotspot. It could be as well that the garbage collecting strategy of the server hotspot shows errors in the using of Weak-References which the client hotspot does not. I do not know very much of the program and I am quite sure that the same effect will happen everywhere where anybody is so "smart" to try the server hotspot. So I think that it is not my personal problem. I already made the effort and tried to describe the problem to you who has the environment and could possibly reproduce it. Just put -server into the commandline and make sure that garbagecollections (-J-Xmx96m) happen I am quite sure that anybody will get the same problem. I know it sounds silly but really: using 2 kinds of appservers sqlserver and netbeans on my machine to develop my application leads to the need of 256 MB. And it helps very much to use the server vm because then netbeans only temporarily takes much memory. If you and nobody (I will try to ask at nbusers) can reproduce this in an easy way I will be ready to go to jdc and try to explain to them my special configuration. So please try anybody to reproduce it and tell me if your unable to.
Target milestone -> 3.3.1.
I've tested on my RH Linux + Gnome with server hotspot and both 96m and even 50m but it worked correctly. I've tried to open ImageViewer sample frame form but it worked. I'm little worried whether the heap settings passed to the VM are really enforced in the Linux JVM. Even when using -Xmx30m the 'top' shows DSIZE (heap + stack) to be about 96M. The setting itself probably works because -Xmx20m gets refused by the vm saying the size is smaller than initial heap size. Honza Lahoda will check it on W2K and possibly Solaris. Andreas, are there any special actions that need to be done to reproduce the problem (e.g. switching windows to force repaint etc.) or just opening the file and setting the cursor by mouse as you've described is enough? Could you please also try to use the server hotspot but specify more memory e.g. -Xmx150m ? This could narrow the search. Thank you.
Report from Andreas: With 150 MB it happens definitly later. I mark many files in the explorer and open them. Most of the time I am in the debugger-workspace doing this. I do not need to do anything. After opening the bunch of files and switching between them using Alt-<right> and Alt-<left> I already can see that the first line (most of the time a /*) is not there. It seems to happen less with files starting with /** then with files which have been created by template . But this is no necessary condition. It happens with files starting with /** but it is not so easy to see. When I play around with these files even without changing them, by setting the mouse I see the described effects. Using server-hotspot I also saw sometimes that the virtual memory usage goes significantly over the 80 or 90 MB (120-130 at the max) but I am calmed down by seeing it diminished by the VM after GC.
Hi, I was trying to reproduce the problem, and found following: Reproducible case: a)Start IDE with -J-server on JDK1.3.1_01 b)Open two forms (in my case MemoryView and ClockFrame) (open as forms, not only in editor). c)Restart the IDE. d)At least one file has strange beginning - the first visible line are in fact first and second line drawed one above the other (usualy second over the first, but in some cases you can see the first drawn on the top of the second, for example when moving caret to left from second line). The problem is not reproducible when files are opened only in editor (without forms) or without -J-server. I even was not able to reproduce the problem without restart of IDE, but I am not sure whether the restart is really needed. One more thing - on server hotspot, when (two) java files are opened and whole editor "attepmted to close", attached exception occurs and the editor is not closed (another attempt to close the editor usualy succeses).
Created attachment 3676 [details] Exception thrown.
We need to find out the cause of the exception first. I'll try some more complex debugging messages. I have a suspicion of some strange timing problem regarding lazy creation of the line elements. Anyway I will request a waiver for this problem as we can't fix it today.
One more thing: It looks to me, that when after following above steps and opening the same file in editor, sometimes the code duplicated. The code on disk is OK. The problem can occur when user tryies to modify the file and saves it. After the file is opened in editor, java marks it as unparseable.
I have modified the part of the editor that I have a suspicion that could cause this problem but it wasn't the reason because the exception attached by Honza Lahoda still occurs. It looks like there could be some inconsistency in managing the position refs but it may be something else. The strange is that it only occurs with server hotspot. Adding Petr N. to CC hoping that he can put some light on the server hotspot behavior? Reassigning to openide.
Passing to Peter to check the exception from text module first.
At the moment, I can't say something more from the stack trace. It's just clear there is something wrong (column value can't be <0), but not the cause of it. I just guess there could have been changed doc during the closing phase from another thread, and in that case probably also some locking of it would be necessary. But at the moment I'm not sure. Well, if it is possible to reproduce, I've heard Honza can, so we could join and debug it. I hope we find the cause. (Inviting Yarda to this issue, if he has any comments up to now.)
I believe that there is a problem in server hotspot and as such cannot be solved. The exception happened to Jan Lahoda is something else, which needs to be investigated though. Lowered prio to P3.
whatever the reason it must be in the JVM we cannot fix it in NB code
*** Issue 21533 has been marked as a duplicate of this issue. ***
Resolved for 3.4.x or earlier, no new info since then -> verified
Resolved for 3.4.x or earlier, no new info since then -> closing.