| Summary: | IllegalArgumentException instead of PHP Editor after changing syntax highlighting preferences | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jacek Pospychala <jacek.pospychala> | ||||||||
| Component: | PDT | Assignee: | PHP UI <php.ui-inbox> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P1 | CC: | silviya, zhaozhongwei | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Jacek Pospychala
Created attachment 176223 [details]
sample
sample php file
Unfortunately, I can't narrow down the exact set of preferences that cause this issue, but I can provide a sample preferences file which causes the issue. (email me) Created attachment 176225 [details]
workaround
a simple workaround is to guard against zero or negative length StyleRanges.
I'm upping priority, because this issue makes php editor unusable at all after switching some preferences settings. the patch seems ok for me:) this workaround makes sense only in short term, e.g. for the branch. As a final solution, we should understand why empty/negative length StyleRanges are created. Maybe there's something wrong with calculating lengths. This could result in some styles being incorrect, or invisible - something that I'm not able to verify, but might be happening, until we understand why StyleRanges are generated incorrectly. OK,and I will have a look at it later:) fyi, I committed the workaround to the branch, but leave the bug OPEN for proper solution. Created attachment 176436 [details]
patch
Zhao, your patch looks good. I'll mark this bug as fixed, because I believe this patch is already in branch and head. Thanks! Verified with assistance from Jacek. Thanks Closing |