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 17862 - garbled output in editor when using server hotspot
Summary: garbled output in editor when using server hotspot
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
: 21533 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-11-20 10:18 UTC by Andreas Schoerk
Modified: 2008-12-22 22:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
3 bmp-Pictures, one java, one form-file (16.66 KB, application/octet-stream)
2001-11-20 10:20 UTC, Andreas Schoerk
Details
Exception thrown. (2.99 KB, text/plain)
2001-12-03 15:28 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schoerk 2001-11-20 10:18:23 UTC
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
Comment 1 Andreas Schoerk 2001-11-20 10:20:11 UTC
Created attachment 3485 [details]
3 bmp-Pictures, one java, one form-file
Comment 2 David Konecny 2001-11-20 14:02:11 UTC
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?
Comment 3 Andreas Schoerk 2001-11-20 14:08:09 UTC
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.
Comment 4 David Konecny 2001-11-20 14:18:53 UTC
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?
Comment 5 Andreas Schoerk 2001-11-20 15:08:15 UTC
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
Comment 6 Andreas Schoerk 2001-11-20 16:13:56 UTC
happens only on server hotspot
Comment 7 Andreas Schoerk 2001-11-21 13:49:09 UTC
Under my memoryconditions I can only work with server-hotspot
engine. So I raised the importance
Comment 8 Miloslav Metelka 2001-11-21 15:49:57 UTC
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

Comment 9 Andreas Schoerk 2001-11-21 18:05:11 UTC
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.
Comment 10 Jan Chalupa 2001-11-27 12:27:12 UTC
Target milestone -> 3.3.1.
Comment 11 Miloslav Metelka 2001-11-28 13:02:12 UTC
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.
Comment 12 Miloslav Metelka 2001-11-28 15:25:48 UTC
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.


Comment 13 Jan Lahoda 2001-12-03 14:04:11 UTC
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).
Comment 14 Jan Lahoda 2001-12-03 15:28:45 UTC
Created attachment 3676 [details]
Exception thrown.
Comment 15 Miloslav Metelka 2001-12-04 13:20:10 UTC
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.
Comment 16 Jan Lahoda 2001-12-04 15:56:20 UTC
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.
Comment 17 Miloslav Metelka 2002-01-11 13:23:19 UTC
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.
Comment 18 Jan Zajicek 2002-01-11 14:29:34 UTC
Passing to Peter to check the exception from text module first.
Comment 19 Peter Zavadsky 2002-01-11 17:07:07 UTC
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.)
Comment 20 _ ttran 2002-01-15 10:37:59 UTC
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.
Comment 21 _ ttran 2002-05-15 14:16:36 UTC
whatever the reason it must be in the JVM we cannot fix it in NB code
Comment 22 Miloslav Metelka 2002-07-09 21:09:36 UTC
*** Issue 21533 has been marked as a duplicate of this issue. ***
Comment 23 Quality Engineering 2003-07-01 15:57:41 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 24 Quality Engineering 2003-07-01 16:32:03 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.