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 262133 - Syntax coloring partially wrong in C-code (Java 1.8.0_60)
Summary: Syntax coloring partially wrong in C-code (Java 1.8.0_60)
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-18 04:34 UTC by johanp
Modified: 2016-05-22 22:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Syntax color error screenshot (52.83 KB, image/png)
2016-05-18 04:34 UTC, johanp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johanp 2016-05-18 04:34:28 UTC
Created attachment 159791 [details]
Syntax color error screenshot

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Linux version 3.13.0-24-generic running on amd64; UTF-8; en_US (nb)

For C-code NB 8.1 started showing several spurious wrong rendering of syntax highlightning in the middle of lines. See attached screenshot.
Comment 1 Vladimir Voskresensky 2016-05-19 17:17:17 UTC
Hello johanp,
Do you mean underscored by red word minimap?
Comment 2 johanp 2016-05-19 19:16:25 UTC
No. That's just the spelling.

What I mean is the real wrong syntax colouring.

Look for example on line 375,376,377 where the variable "minimap_cache" is coloured partially dark (some letters) yellow but mostly white (as it should)

Also on line 385 and 386 you can see that the comment and variable name is partially dark-yellow and partially white.
Comment 3 Vladimir Voskresensky 2016-05-20 08:24:38 UTC
Oh, I see. It's a stall cache bug.
As workaround try to press space, delete it and save file. coloring should be re-calculated.

Btw, have you updated your 8.1 to the available updates?
I think such problem was partially addressed in one of update.
Comment 4 johanp 2016-05-20 09:08:18 UTC
Yep, my NB 8.1 is updated to the latest official patch level available (I always apply all updates)

However I only started noticing the problem with 8.1. As far as I can recall 8.0 (or earlier) didn't have this issue.

Well, its not a big issue (in the scheme of things..) but it seems like the cache handling is getting out-of-sync very fast and I get this kind of behavior in all files almost as soon I I have edited them. Re-saving (or restarting NB) doesn't really seem to fix this particular problem though, it comes back like a bad smell as soon as I start working with a file.

(Funny that the code I gave as an example of the problem is also part of cache handling ...)
Comment 5 Vladimir Voskresensky 2016-05-20 13:56:11 UTC
I've seen such problems once related to "import settings" bug.

Could you, please, start NB 8.1 with clean userdir, please, and check again.

Thanks!
Comment 6 Vladimir Voskresensky 2016-05-20 14:04:03 UTC
(In reply to Vladimir Voskresensky from comment #5)
> I've seen such problems once related to "import settings" bug.
> 
> Could you, please, start NB 8.1 with clean userdir, please, and check again.
NOTE: please, do not Import settings from previous release version when IDE propose to do that.
Comment 7 johanp 2016-05-22 22:05:16 UTC
Removing the old ".netbeans" directory, restarting and re-install the theme plugins seemed to help with the issue after also switch back and forth between standard and one of the dark themes one time.

Suggests closing as WONTFIX for now as this is a minor issue and reinstall+cleaning+switching twice seemed to have sorted the issue and doesn't seem worth the effort to investigate and fix this upgrade issue.

In addition the scrolling is now much, much smoother. (I guess it might have been related to the invalidated cache that probably made the highlight module  run at full speed all the time and affecting the scroll smoothness.)