Bug 235958 - Compile error is not shown in editor nor editor icon
Compile error is not shown in editor nor editor icon
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Editor
7.4
PC Windows 7
: P1 with 4 votes (vote)
: Dev
Assigned To: Dusan Balek
issues@java
: 8.0_HR_FIX
: 236589 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-13 20:31 UTC by markiewb
Modified: 2017-06-26 09:48 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Shows the issue (201.19 KB, image/png)
2013-09-13 20:31 UTC, markiewb
Details
IDE log (256.69 KB, text/plain)
2013-09-13 20:31 UTC, markiewb
Details
After restart - missing icon (183.62 KB, image/png)
2013-09-13 20:38 UTC, markiewb
Details
After restart - IDE log (64.33 KB, text/plain)
2013-09-13 20:39 UTC, markiewb
Details
After restart - missing icon (173.23 KB, image/png)
2013-09-13 20:40 UTC, markiewb
Details
Reproducible issue (197.00 KB, image/png)
2013-09-19 19:33 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-09-13 20:31:25 UTC
Created attachment 140067 [details]
Shows the issue

After pasting code which leads to compile errors...

ACTUAL:
The compile error is shown in
* action items view
* project view icon
but is missed in
* editor
* editor tab icon

See screenshot

EXPECTED:
The compile error is shown in
* action items view
* editor
* editor tab icon
* project view icon

IDE log will be attached too.

Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 markiewb 2013-09-13 20:31:48 UTC
Created attachment 140068 [details]
IDE log
Comment 2 markiewb 2013-09-13 20:32:19 UTC
Related to https://netbeans.org/bugzilla/show_bug.cgi?id=235050 ?
Comment 3 markiewb 2013-09-13 20:38:54 UTC
Created attachment 140069 [details]
After restart - missing icon

I closed the project, restarted the IDE and reopened the project.

Now the editor shows the compile error, but the red editor tab icon badge is still missing.

See screenshot. I will also attach the IDE log.
Comment 4 markiewb 2013-09-13 20:39:15 UTC
Created attachment 140070 [details]
After restart - IDE log
Comment 5 markiewb 2013-09-13 20:40:21 UTC
Created attachment 140071 [details]
After restart - missing icon
Comment 6 markiewb 2013-09-15 21:37:56 UTC
It happened again. A restart of the IDE didn't help. 
But "Source->Scan for external changes" helped. The state was updated and the error was shown in the editor.
Comment 7 MackSix 2013-09-17 02:00:53 UTC
I have seen this happen before and on just simple learning projects from time to time.
Comment 8 markiewb 2013-09-19 19:33:38 UTC
Created attachment 140265 [details]
Reproducible issue

@Dusan: Finally I can reproduce it via a very simple example. (I guess there are issues like this in the code base, but this is start...)

Steps:
* start 7.4RC1 with a clean user dir
* New Project>Java>Java Application 
** into your userdir f.e C:\Users\markiewb\Documents\NetBeansProjects
** type "foo.MainClass" in field "Create Main Class"
** Finish -> Project will be created and MainClass will be opened
* in editor change package to "foo.bar" -> see screenshot

ACTUAL: 
* Editor shows error at the line OK
* Editor icon doesn't show the error badge NOK
* File icon in project view doesn't show the error badge NOK
* Action items view doesn't show an error NOK

EXPECTED:
* Editor shows error at the line 
* Editor icon shows the error badge
* File icon in project view shows the error badge
* Action items view shows an error

Strange thing is that it works, when
* in editor change package to "foo.42" (can also be seen in the screenshot)

Please also note the different error underline - see screenshot
"package foo.42" vs. "package foo.bar" - Different icon and different underline length

Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\markiewb\AppData\Roaming\NetBeans\7.4rc1
Cache directory: C:\Users\markiewb\AppData\Local\NetBeans\Cache\7.4rc1
Comment 9 markiewb 2013-09-19 20:22:49 UTC
(In reply to markiewb from comment #8)
> Created attachment 140265 [details]
> Reproducible issue
> 
> @Dusan: Finally I can reproduce it via a very simple example. (I guess there
> are issues like this in the code base, but this is start...)
>...
Happens also using 1.7.0_25

Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
Comment 10 markiewb 2013-09-19 22:18:49 UTC
(In reply to markiewb from comment #9)
> (In reply to markiewb from comment #8)
> > Created attachment 140265 [details]
> > Reproducible issue
> > 
> > @Dusan: Finally I can reproduce it via a very simple example. (I guess there
> > are issues like this in the code base, but this is start...)
> >...
> Happens also using 1.7.0_25
> 
> Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
> Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16

Happens also using 

Product Version: NetBeans IDE 7.0 (Build 201104080000)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

[sic!] So the minimal example might show a different issue than commented in  https://netbeans.org/bugzilla/show_bug.cgi?id=235958#c0
Comment 11 markiewb 2013-09-23 22:26:41 UTC
Is there any cmdline argument can set to help the investigation?!
Comment 12 Jiri Prox 2013-09-24 21:50:57 UTC
The problem is that "wrong" package declaration is not error. Only hint announcing this is set to be displayed as error.

There is enhancement asking for reflecting hints in project view - see issue 127439

*** This bug has been marked as a duplicate of bug 127439 ***
Comment 13 markiewb 2013-09-24 22:13:08 UTC
(In reply to Jiri Prox from comment #12)
> There is enhancement asking for reflecting hints in project view - see issue
> 127439
Yes, that is only one part of this issue.

Reopen, because this won't explain the issue shown in my first comment

See https://bugzilla-attachments-235958.netbeans.org/bugzilla/attachment.cgi?id=140067 "Cannot find symbol..." compile errors are no hints, I think
Comment 14 Jiri Prox 2013-09-24 22:19:58 UTC
Sorry I missed the first problem.

I've seen it as well while editing tests for java.editor, but I cannot reproduce it now
Comment 15 Dusan Balek 2013-09-26 14:16:52 UTC
After an investigation, I'm finally able to reproduce the problem. There are at least three different problems that could lead to the situation when no errors are shown either in editor and/or editor tab.

1) When opening an erroneous file, error icon is not shown in the editor tab until the first modification of the file (the case described in comment 5 IMHO) - new bug report #236425 has been entered for this.

2) No errors are shown in editor while background scan is in progress - IMHO the situation describe in the related issue #235050.

3) No errors are shown in editor if "Find & Replace" is invoked fast enough after a change before the error displaying task is started (case depicted on the first screenshot IMHO) - fixed in jet-main:

http://hg.netbeans.org/jet-main/rev/6c8d728c229b
Comment 16 markiewb 2013-09-26 18:35:47 UTC
(In reply to Dusan Balek from comment #15)
> After an investigation, I'm finally able to reproduce the problem. There are
> at least three different problems that could lead to the situation when no
> errors are shown either in editor and/or editor tab.

Thanks very much Dusan! 

> 3) No errors are shown in editor if "Find & Replace" is invoked fast enough
> after a change before the error displaying task is started (case depicted on
> the first screenshot IMHO) - fixed in jet-main:
> 
> http://hg.netbeans.org/jet-main/rev/6c8d728c229b

I guess this will also fix potential issues, when pasting code (or other document modifying) operations?!

Will this fix be transplanted to release74? Or at least into 7.4.1?!
Comment 17 MackSix 2013-10-02 21:00:42 UTC
I am seeing this in 7.4 RC2, but it will show error  badge on file tab but no indication in the source where or what the error  is. I have to compile to see the errors.

I have a JavaFX source open and it was working. I let NetBeans idle for a while and came back and no  errors are showing in the source, just the red error  badges on the file tab and in the Projects window.
Comment 18 markiewb 2013-10-03 09:26:57 UTC
*** Bug 236589 has been marked as a duplicate of this bug. ***
Comment 19 Jiri Prox 2013-11-13 11:12:13 UTC
Unfortunately I can still reproduce the problem which should be resolved in this issue. When I open Find bar quick enough after modifying the code, the errors are not highlighted.


Product Version: NetBeans IDE Dev (Build 20131113-69be7f91f692)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 20 Dusan Balek 2014-02-20 09:07:05 UTC
http://hg.netbeans.org/jet-main/rev/3de05c8f149b
Comment 21 Tomas Zezula 2014-02-20 13:38:37 UTC
Seems good to me.
Comment 22 Jiri Prox 2014-02-20 14:58:06 UTC
verified in trunk
Comment 23 Dusan Balek 2014-02-20 15:14:43 UTC
Integrated into release80.

http://hg.netbeans.org/releases/rev/e92d04524b76
Comment 24 Quality Engineering 2014-02-21 01:29:38 UTC
Integrated into 'releases/release80', will be available in build *201402202300* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/e92d04524b76
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #235958: Compile error is not shown in editor nor editor icon - fixed.
Comment 25 Quality Engineering 2014-02-21 03:09:03 UTC
Integrated into 'main-silver', will be available in build *201402210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3de05c8f149b
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #235958: Compile error is not shown in editor nor editor icon - fixed.
Comment 26 Jiri Prox 2014-02-21 22:41:20 UTC
Product Version: NetBeans IDE 8.0 RC1 (Build 201402202300)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b65
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b123
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\8.0rc1
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\8.0rc1
Comment 27 russkiy 2017-05-17 07:48:03 UTC
Product Version: NetBeans IDE 8.2 (Build 201609300101)
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 1
Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
User directory: C:\Users\adinor\AppData\Roaming\NetBeans\8.2
Cache directory: C:\Users\adinor\AppData\Local\NetBeans\Cache\8.2
Comment 28 russkiy 2017-05-17 07:50:47 UTC
By the look of it, appears to me like some kind or race condition between two tasks running in the background (index update vs compilation?..)
Comment 29 Dusan Balek 2017-06-09 08:53:04 UTC
To russkiy: Do you have a test case and/or any steps to reproduce? Thanks.
Comment 30 ebakke 2017-06-11 15:27:38 UTC
The bug at https://netbeans.org/bugzilla/show_bug.cgi?id=269459 is a similar (same?) problem with a simple test case that works every time, in NetBeans 8.2. Errors do not show up in the editor, but _do_ show up in "Action Items", and in the project view icon. In the example provided in 269459, the error icon does show up in the editor tab icon, however, unlike in 235958.
Comment 31 Dusan Balek 2017-06-26 09:48:08 UTC
Fixed in jet-main.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo