Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition here by menu when current state is nil ->DNU #99

Open
2 tasks
jfabry opened this issue Dec 18, 2015 · 3 comments
Open
2 tasks

Transition here by menu when current state is nil ->DNU #99

jfabry opened this issue Dec 18, 2015 · 3 comments

Comments

@jfabry
Copy link
Owner

jfabry commented Dec 18, 2015

I don't have code to reproduce and I don't remember how I got there, sorry

If I do a transition to with currentstate being nil then there is a DNU because anotherLRPState = nil. The problem originates in LRPInterpreter>>changeToState:withActions: because there currentstate is read.

  • we should be able to reproduce and have that as a test
  • the bug should be fixed

Full stack:

UndefinedObject(Object)>>doesNotUnderstand: #container
LRPInterpreter>>recursiveSetState:exitState:withActions:
LRPInterpreter>>recursiveSetState:exitState:withActions:
LRPInterpreter>>changeToState:withActions:
LRPInterpreter>>transitionTo:
[ :e | 
self code interpreter transitionTo: aState.
self highlightNode: aState name ] in LRPProgramVisualization>>elementForState: in Block: [ :e | ...
BlockClosure>>cull:
[ | selArgCount |
"show cursor in case item opens a new MVC window"
(selArgCount := selector numArgs) = 0
    ifTrue: [ target perform: selector ]
    ifFalse:
        [ selArgCount = arguments size
            ifTrue: [ target perform: selector withArguments: arguments ]
            ifFalse: [ target
                    perform: selector
                    withArguments: (arguments copyWith: evt) ] ].
self changed ] in ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in Block: [ | selArgCount |...
BlockClosure>>ensure:
CursorWithMask(Cursor)>>showWhile:
ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
ToggleMenuItemMorph(MenuItemMorph)>>mouseUp:
ToggleMenuItemMorph(MenuItemMorph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
ToggleMenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseUp:
MouseButtonEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in Block: [ ^ anEvent sentTo: self ]
BlockClosure>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
ToggleMenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseUp:
MouseButtonEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with: in Block: [ ^ anEvent sentTo: self ]
BlockClosure>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
@mcamp
Copy link
Collaborator

mcamp commented Jan 4, 2016

I know the problem but I cannot fully tested in Pharo5 because visualization problems. I will make a fix and let's hope it never happens again

@mcamp
Copy link
Collaborator

mcamp commented Jan 4, 2016

I went deeper into the code and I should reproduce it before trying to fix it

@jfabry
Copy link
Owner Author

jfabry commented Jan 4, 2016

Load slice 17280 from the Pharo Inbox in Pharo 5 to make the visualization work correctly. When this slice is integrated in Pharo 5 everything will work out of the box again. (see https://pharo.fogbugz.com/f/cases/17280/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants