pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 356 forks source link

Cmd implementor DNU #7898

Closed Ducasse closed 3 years ago

Ducasse commented 3 years ago

Here is how to reproduce the problem

Ducasse commented 3 years ago

ouch...

guillep commented 3 years ago

I checked and the UI locking is related to #7901 and https://github.com/pharo-project/pharo/pull/7902/files. We need to get rid of compiler dependencies in the kernel...

GitHub
Fix infinite recursion upon send of not-understood message to nil by martinmcclure · Pull Request #7902 · pharo-project/pharo
Issue #7901
guillep commented 3 years ago

The actual exception is a simple DNU that just gets hidden

tesonep commented 3 years ago

I have merged the PR of Martin, so this should be integrated now.

On Mon, Nov 30, 2020 at 11:46 AM Guille Polito notifications@github.com wrote:

The actual exception is a simple DNU that just gets hidden

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pharo-project/pharo/issues/7898#issuecomment-735707704, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWY72INMCMHKGQLWNBAC3SSNZXFANCNFSM4UGABTKQ .

-- Pablo Tesone. tesonep@gmail.com

tesonep commented 3 years ago

The error should pop I mean

On Mon, Nov 30, 2020 at 12:02 PM tesonep@gmail.com tesonep@gmail.com wrote:

I have merged the PR of Martin, so this should be integrated now.

On Mon, Nov 30, 2020 at 11:46 AM Guille Polito notifications@github.com wrote:

The actual exception is a simple DNU that just gets hidden

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pharo-project/pharo/issues/7898#issuecomment-735707704, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWY72INMCMHKGQLWNBAC3SSNZXFANCNFSM4UGABTKQ .

-- Pablo Tesone. tesonep@gmail.com

-- Pablo Tesone. tesonep@gmail.com

guillep commented 3 years ago

I'm taking a look right now

guillep commented 3 years ago

The cause: since the caret is in the middle of characters, if we have 9 characters, we have 10 possible caret positions. However, the last, the 10th position is not a valid character in the method.

code := 'canBeRun '.
ast := RBParser parseFaultyMethod: code.
ast bestNodeFor: (code size + 1 to: code size + 1).
  => nil

One possibility is to restrict the position of the caret to valid positions only.