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 114446 - Errors in code are not highlighted
Summary: Errors in code are not highlighted
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords:
Depends on:
Blocks: 121950
  Show dependency tree
 
Reported: 2007-09-01 19:58 UTC by myopic4141
Modified: 2009-08-04 12:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
message log file (85.45 KB, application/octet-stream)
2007-09-05 18:12 UTC, myopic4141
Details
Editing wizard not monitoring. (305.37 KB, application/octet-stream)
2007-09-06 18:13 UTC, myopic4141
Details
Editing wizard monitoring. (309.31 KB, application/octet-stream)
2007-09-06 18:14 UTC, myopic4141
Details

Note You need to log in before you can comment on or make changes to this bug.
Description myopic4141 2007-09-01 19:58:26 UTC
The editor wizard seems to be easily addled.  At some startups, the wizard does not follow and detect errors until I
either exit the window via selecting an item in the Projects/Files/Service window or Current Selected File window.  Even
then, the wizard is not always finding classes from other java files within the project unless I delete whatever was
entered between startup, notice that the wizard is not monitoring, and getting the wizard to monitor editing.

Sometimes the wizard does not keep the hint window open beyond the first parameter of a multiple parameter method.

Sometimes, the wizard does not insert the ")" when the "(" is abutting an already existing ")" from a previous
insertion.  Most of the time when this occurs, the wizard does not properly designate the latter parenthesis pairing to
match the correction unless some intervening action occurs such as inserting a return.  Even then, only one erroneous
error is removed and only at the location where the insertion occurred.

Once during an extensive editing when the wizard became addled, the system froze (keyboard was locked out) forcing a
cold start.  Twice following an extensive editing when the wizard became addled, the close NetBeans process hung
requiring a Force Quit to be used (happily, the files were properly saved before hanging).  I mention these latter items
because when the wizard behaves, these events do not occur; therefore, may be related to the problem.
Comment 1 Jiri Prox 2007-09-04 09:09:52 UTC
Can you be more specific? Which wizard exactly do you mean? I suppose you mean code completion popup (ctrl-space or
automatic popup upon '.' is typed), but I'm not sure. Are there any exceptions in the log? Try also deleting
${userdir}/var/cache/mdrstorage directory - such problems can occur when MDR repository is broken. This will force MDR
repository to be regenerated.
Comment 2 myopic4141 2007-09-04 17:58:21 UTC
It is the text entry editing monitor (wizard) aspect that lets you know if what was entered creates an error.  There are
two indications that the monitoring is off, namely:  No red underlining and the code completion popup always has no
suggestion.

Once the monitoring has been initiated, the editing monitor sometimes gets confused with the parenthesis entries when a
mismatch occurs.  This is especially true with parenthesis pairs in statements post-ceding the mismatch.  At times it
took inserting and deleting a return before the error for that line was designated not in error.  Even then, parenthesis
pairs farther down the code remained designated as "in error" (I even waited up to a minute to ensure that it was not
the simple case of the monitor taking an inordinate length of time to correct everything).

Regarding the paired "()" insert abutting an existing ")" only inserting the "(" from the left creating a mismatched
"(…)", that occurs all the time.  There is an additional note to this problem, namely that if a ")" is inserted abutting
an existing ")" from the left to create a "))" to an existing "(…(", the "))" is reduced to ")" maintaining the mismatch
condition; however, if the ")" is inserted abutting a ")" from the right, the "))" remains eliminating the mismatch
condition.

I no longer think the processor hanging is an editor function.  It seems to occur when NetBeans is closed via Quit while
files need to be saved.  If the files are saved separate from the Quit, then NetBeans does not hang.  If files need to
be saved, the NetBean consistently hangs.  I do not know who gets this one.

No exceptions in the system or console logs.  Is there another log you would like me to look at?
Comment 3 Jiri Prox 2007-09-05 10:51:20 UTC
The IDE log is located in you userdir: ${userdir}/var/log/messages.log . You can also attach screenshot here. Any
success with staring with fresh userdir (or with deleted MDR storage)? 

The problem with typing ')' is reported as separate issue, but I cannot find it's number right now.
Comment 4 myopic4141 2007-09-05 18:12:32 UTC
Created attachment 48186 [details]
message log file
Comment 5 myopic4141 2007-09-05 18:14:56 UTC
There were no exceptions in $(user)/.netbeans/6.0m10/var/log/messages; however, there are a lot of warning about
upgrading dependencies, deprecations, and Not all children in filename marked with the position attribute.

There was no $(user)/.netbeans/6.0m10/var/cache/mdstorage directory.

What I did do is clean install netbeans and the same symptoms occur at startup.

I attached a copy of the log file.
Comment 6 Jiri Prox 2007-09-06 09:42:50 UTC
I see it now, you're using 6.0, there the  mdr was replaced by the new infrastructure. Reinstalling NB does not clean
all setting, you have to specify also new userdir - you can do it with --userdir <new_directory> switch. 

Please attach screenshots,  I'm sorry I still does not know where the problem is.
Thanks
Comment 7 myopic4141 2007-09-06 18:11:25 UTC
When I reinstalled, I deleted all the .netbean directories, deleted netbean.app, removed the alias from the doc, deleted
glassfish-v2-b53, unpacked netbeans-6.0m10-full-macosx-ppc.tar, double clicked on netbeans.command, and followed all the
instructions of the installation wizard.  It should have been a clean install because everything was remaining of the
previous installation.  I then opened the project and quit netbeans.  I reopened netbeans and deleted a semicolon from
line 34 making the line incomplete and moved the cursor to line 41.  The netbean editing wizard never indicated that
line 34 was in error (see attachment 1 [details]).  Exiting and reentering the editing window (selecting outside of the window and
then reselecting the window) activated the editing wizard (see attachment 2 [details]).
Comment 8 myopic4141 2007-09-06 18:13:12 UTC
Created attachment 48310 [details]
Editing wizard not monitoring.
Comment 9 myopic4141 2007-09-06 18:14:15 UTC
Created attachment 48311 [details]
Editing wizard monitoring.
Comment 10 myopic4141 2007-09-06 18:16:13 UTC
Everything should be nothing remaining of the previous installation.
Comment 11 Jiri Prox 2007-09-07 07:47:34 UTC
Thanks I can see the issue now.
Comment 12 Jan Lahoda 2007-09-12 10:31:19 UTC
Jirka were you able to reproduce the problem? Thanks.
Comment 13 Jiri Prox 2007-09-12 10:36:37 UTC
It happens to me as well but only sometimes. I'll investigate it more, but now I don't have any steps to reproduce.
Reopening the file usually helps
Comment 14 Jan Lahoda 2007-09-12 10:42:15 UTC
When the problem happens, do mark occurrences work? (After moving caret to another element, are the occurrences changed
correctly?) Also, does semantic highlighting work correctly (for newly typed text)? Thanks.
Comment 15 myopic4141 2007-09-12 21:21:03 UTC
No error highlighting occurs when text is entered in this mode.  I actually entered 20 lines before noticing that I was
never getting any error highlighting.  It was not the absence of highlighting that brought attention to a problem; but,
the fact that the pop-up box only had "no suggestions" when I entered a period to select a method for a locally created
class within the same project.
After I enabled the error highlighting, several lines were highlighted due to a mismatched parenthesis error in the
early stages of entering.  When the single error was corrected, the other lines remained highlighted even though there
were no errors.  These error indications could be removed simply by hitting return at the line and then deleting the
return entry; however, the unhighlighting only occurred on a single line (the line with the return).  The process had to
be repeated for each line that had an error indication.
Entering this mode at startup is almost a regular occurrence on my system.
Comment 16 myopic4141 2007-11-24 19:58:03 UTC
An added observance that may or may not be related.  Whenever, NetBeans is in this state, the menu's Build Compile item
only contains "Compile file" rather than the file name of the currently displayed file at startup.  The displaying of
errors and the file name appearing in the menu are corrected at the same time.  The possibility is that the error
detection does not think a file is present to work on.
Comment 17 myopic4141 2008-05-05 06:20:13 UTC
I have not seen the same behavior in NetBeans 6.1 as when I reported this error; but, NetBeans is still not reporting
some obvious errors on an intermittent basis and I have not quite figured out under which conditions the error will or
will not occur.  A screen attachment will follow showing a consistent in the sense that the same behavior occurs, though
the when is intermittent.  At first glance, the attachment does not look wrong until one realizes that a return is set
in method declaration; but, no return statement appears in the body.  Sometimes an error is generated when this
conditions exists and sometimes no error as in this instance.
Comment 18 Jiri Prox 2008-05-05 13:13:09 UTC
I guess this attachment belongs to this issue: http://www.netbeans.org/nonav/issues/showattachment.cgi/61030/NetBeans0.gif
Comment 19 Rastislav Komara 2009-02-03 10:56:15 UTC
Overtake.
Comment 20 Dusan Balek 2009-08-04 12:55:30 UTC
Should be fixed in the current dev build.