Issue 5366 in pharo: highlightError create a text with too long runs...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5366 in pharo: highlightError create a text with too long runs...

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug Milestone-1.4

New issue 5366 by [hidden email]: highlightError create a text with  
too long runs...
http://code.google.com/p/pharo/issues/detail?id=5366

The symptom is

Object compile: 'foo self. ['

Error SubscriptOutOfBounds: 48

This was issue 4650 of which root cause as fixed, causing yet another  
(recent) bug to be uncovered.

This is due to SyntaxError>>highlightError which adds attributes past the  
end of String.

contents addAttribute: TextColor red from: location to: location + self  
sourceErrorString size.

should be from: location to: location + self sourceErrorString size - 1.

Then Text>>addAttribute:from:to: is not robust and creates a run longer  
than the string.

Then CharacterScanner & co are not robust and try to access the string up  
to the end of run.

Phew...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5366 in pharo: highlightError create a text with too long runs...

pharo
Updates:
        Status: FixReviewNeeded
        Cc: [hidden email]

Comment #1 on issue 5366 by [hidden email]: highlightError create a  
text with too long runs...
http://code.google.com/p/pharo/issues/detail?id=5366

Mistake, this was issue 3439 and with both SLICE, this Object compile: is  
finally solved, but maybe we should have a more defensive Text preventing  
too long runs ?

Name:  
SLICE-Issue-5366-highlightError-create-a-text-with-too-long-runs-nice.1
Dependencies: Tools-nice.766




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5366 in pharo: highlightError create a text with too long runs...

pharo

Comment #2 on issue 5366 by [hidden email]: highlightError create a  
text with too long runs...
http://code.google.com/p/pharo/issues/detail?id=5366

Defensive text is proposed in another issue 5367


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5366 in pharo: highlightError create a text with too long runs...

pharo
Updates:
        Status: Integrated

Comment #3 on issue 5366 by [hidden email]: highlightError create a  
text with too long runs...
http://code.google.com/p/pharo/issues/detail?id=5366

in 14352


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker