[Pharo-project] Problem with NonInteractiveUIManager
I'm trying to do some Katas in deploying pharo images on my server. After finding my image crashing all the time I tried to research what I need to take care of. I came to the conclusion that UIManager default: UIManager default nonInteractiveManager. NonInteractiveUIManager snapshotErrorImage: true. would be the right thing to do in a server environment. But I only get the stack trace attached. So I'm asking myself if I need to do something different in order to get the stack trace of my own application in case something goes wrong. Norbert ---- 28 November 2011 3:35:54 pm VM: Mac OS - intel - 1072 - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.52] Cog VM 4.0.0 Image: Pharo1.3 [Latest update: #13320] NonInteractiveUIManager(Object)>>doesNotUnderstand: #openDebuggerOn:context:label:contents:fullView: Receiver: a NonInteractiveUIManager Arguments and temporary variables: aMessage: openDebuggerOn: a Process in GRPharoPlatform>>openDebuggerOn: context...etc... exception: MessageNotUnderstood: NonInteractiveUIManager>>openDebuggerOn:contex...etc... resumeValue: nil Receiver's instance variables: uiManager: a MorphicUIManager doNotQuitOnRestart: false Debugger class>>openOn:context:label:contents:fullView: Receiver: Debugger Arguments and temporary variables: process: a Process in GRPharoPlatform>>openDebuggerOn: context: OrderedCollection(Object)>>error: title: 'Error: startIndex is out of bounds' contentsStringOrNil: nil bool: true fullView: true Receiver's instance variables: superclass: CodeHolder methodDict: a MethodDictionary(#addOptionalButtonsTo:at:plus:->(Debugger>>#addO...etc... format: 166 instanceVariables: #('interruptedProcess' 'interruptedController' 'contextStack...etc... organization: ('*Ocompletion' guessTypeForName:) ('*Polymorph-Widgets' addOptio...etc... subclasses: nil name: #Debugger classPool: a Dictionary(#AlwaysOpenFullDebugger->false #ContextStackKeystrokes-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Tools-Debugger' traitComposition: nil localSelectors: nil [:tool | ^ tool openOn: aProcess context: aContext label: aString contents: contents fullView: aBool] in ToolRegistry>>debug:context:label:contents:fullView: Receiver: a ToolRegistry Arguments and temporary variables: aProcess: Debugger aContext: a Process in GRPharoPlatform>>openDebuggerOn: aString: OrderedCollection(Object)>>error: contents: 'Error: startIndex is out of bounds' aBool: nil tool: true Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc... ToolRegistry>>using:do: Receiver: a ToolRegistry Arguments and temporary variables: aToolName: #debugger aBlock: [:tool | ^ tool openOn: aProcess context: aContext label: aString...etc... tool: Debugger Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc... ToolRegistry>>debug:context:label:contents:fullView: Receiver: a ToolRegistry Arguments and temporary variables: aProcess: a Process in GRPharoPlatform>>openDebuggerOn: aContext: OrderedCollection(Object)>>error: aString: 'Error: startIndex is out of bounds' contents: nil aBool: true Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc... Process>>debug:title:full: Receiver: a Process in GRPharoPlatform>>openDebuggerOn: Arguments and temporary variables: context: OrderedCollection(Object)>>error: title: 'Error: startIndex is out of bounds' bool: true topCtxt: GRPharoPlatform>>openDebuggerOn: Receiver's instance variables: nextLink: nil suspendedContext: GRPharoPlatform>>openDebuggerOn: priority: 60 myList: nil threadId: nil errorHandler: nil name: 'ZnMultiThreadedServer HTTP worker' env: nil [process debug: anError signalerContext title: anError description full: true] in GRPharoPlatform>>openDebuggerOn: Receiver: a GRPharoPlatform Arguments and temporary variables: anError: Error: startIndex is out of bounds process: a Process in GRPharoPlatform>>openDebuggerOn: Receiver's instance variables: a GRPharoPlatform WorldState>>runStepMethodsIn: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] queue: SharedQueue with 0 items nextInQueue: [process debug: anError signalerContext title: anError descrip...etc... Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil PasteUpMorph>>runStepMethods Receiver: a PasteUpMorph(425197568) [world] Arguments and temporary variables: Receiver's instance variables: bounds: 0@0 corner: 1296@875 owner: nil submorphs: an Array(a TaskbarMorph(984088576) a SystemWindow(347865088) a Syste...etc... fullBounds: nil color: (Color r: 0.97 g: 0.98 b: 1.0) extension: a MorphExtension (666632192) [eventHandler = an EventHandler] [othe...etc... borderWidth: 0 borderColor: (Color r: 0.03 g: 0.02 b: 0.0) backgroundMorph: nil worldState: a WorldState griddingOn: nil WorldState>>doOneCycleNowFor: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil WorldState>>doOneCycleFor: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil PasteUpMorph>>doOneCycle Receiver: a PasteUpMorph(425197568) [world] Arguments and temporary variables: Receiver's instance variables: bounds: 0@0 corner: 1296@875 owner: nil submorphs: an Array(a TaskbarMorph(984088576) a SystemWindow(347865088) a Syste...etc... fullBounds: nil color: (Color r: 0.97 g: 0.98 b: 1.0) extension: a MorphExtension (666632192) [eventHandler = an EventHandler] [othe...etc... borderWidth: 0 borderColor: (Color r: 0.03 g: 0.02 b: 0.0) backgroundMorph: nil worldState: a WorldState griddingOn: nil [[World doOneCycle. Processor yield. false] whileFalse. nil] in Project class>>spawnNewProcess Receiver: Project Arguments and temporary variables: Receiver's instance variables: superclass: Model methodDict: a MethodDictionary(#beep->(Project>>#beep "a CompiledMethod(3169320...etc... format: 132 instanceVariables: nil organization: ('*sound' beep) subclasses: nil name: #Project classPool: a Dictionary(#UIProcess->a Process in nil ) sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil [self value. Processor terminateActive] in BlockClosure>>newProcess Receiver: [[World doOneCycle. Processor yield. false] whileFalse. nil] Arguments and temporary variables: Receiver's instance variables: outerContext: Project class>>spawnNewProcess startpc: 57 numArgs: 0 --- The full stack --- NonInteractiveUIManager(Object)>>doesNotUnderstand: #openDebuggerOn:context:label:contents:fullView: Debugger class>>openOn:context:label:contents:fullView: [:tool | ^ tool openOn: aProcess context: aContext label: aString contents: contents fullView: aBool] in ToolRegistry>>debug:context:label:contents:fullView: ToolRegistry>>using:do: ToolRegistry>>debug:context:label:contents:fullView: Process>>debug:title:full: [process debug: anError signalerContext title: anError description full: true] in GRPharoPlatform>>openDebuggerOn: WorldState>>runStepMethodsIn: PasteUpMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [[World doOneCycle. Processor yield. false] whileFalse. nil] in Project class>>spawnNewProcess [self value. Processor terminateActive] in BlockClosure>>newProcess
Ok, this is the behaviour with an image #13320 and the newest cog vm. I don't need to do anything because the NonInteractiveUIManager is set to default automatically regardless if -nodisplay or -headless is specified. And in my case this is broken. However if I hack away the noninteractive stuff by doing UIManager default: (UIManager default instVarAt: 1). than it works. A debugger pops up in the image and can see the real exception with VNC. So to me it seems that there is something broken. Igor, can you add anything. I think Marcus is not available at the moment. Norbert Am 28.11.2011 um 15:42 schrieb Norbert Hartl:
I'm trying to do some Katas in deploying pharo images on my server. After finding my image crashing all the time I tried to research what I need to take care of. I came to the conclusion that
UIManager default: UIManager default nonInteractiveManager. NonInteractiveUIManager snapshotErrorImage: true.
would be the right thing to do in a server environment. But I only get the stack trace attached. So I'm asking myself if I need to do something different in order to get the stack trace of my own application in case something goes wrong.
Norbert
----
28 November 2011 3:35:54 pm
VM: Mac OS - intel - 1072 - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.52] Cog VM 4.0.0 Image: Pharo1.3 [Latest update: #13320]
NonInteractiveUIManager(Object)>>doesNotUnderstand: #openDebuggerOn:context:label:contents:fullView: Receiver: a NonInteractiveUIManager Arguments and temporary variables: aMessage: openDebuggerOn: a Process in GRPharoPlatform>>openDebuggerOn: context...etc... exception: MessageNotUnderstood: NonInteractiveUIManager>>openDebuggerOn:contex...etc... resumeValue: nil Receiver's instance variables: uiManager: a MorphicUIManager doNotQuitOnRestart: false
Debugger class>>openOn:context:label:contents:fullView: Receiver: Debugger Arguments and temporary variables: process: a Process in GRPharoPlatform>>openDebuggerOn: context: OrderedCollection(Object)>>error: title: 'Error: startIndex is out of bounds' contentsStringOrNil: nil bool: true fullView: true Receiver's instance variables: superclass: CodeHolder methodDict: a MethodDictionary(#addOptionalButtonsTo:at:plus:->(Debugger>>#addO...etc... format: 166 instanceVariables: #('interruptedProcess' 'interruptedController' 'contextStack...etc... organization: ('*Ocompletion' guessTypeForName:) ('*Polymorph-Widgets' addOptio...etc... subclasses: nil name: #Debugger classPool: a Dictionary(#AlwaysOpenFullDebugger->false #ContextStackKeystrokes-...etc... sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'Tools-Debugger' traitComposition: nil localSelectors: nil
[:tool | ^ tool openOn: aProcess context: aContext label: aString contents: contents fullView: aBool] in ToolRegistry>>debug:context:label:contents:fullView: Receiver: a ToolRegistry Arguments and temporary variables: aProcess: Debugger aContext: a Process in GRPharoPlatform>>openDebuggerOn: aString: OrderedCollection(Object)>>error: contents: 'Error: startIndex is out of bounds' aBool: nil tool: true Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc...
ToolRegistry>>using:do: Receiver: a ToolRegistry Arguments and temporary variables: aToolName: #debugger aBlock: [:tool | ^ tool openOn: aProcess context: aContext label: aString...etc... tool: Debugger Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc...
ToolRegistry>>debug:context:label:contents:fullView: Receiver: a ToolRegistry Arguments and temporary variables: aProcess: a Process in GRPharoPlatform>>openDebuggerOn: aContext: OrderedCollection(Object)>>error: aString: 'Error: startIndex is out of bounds' contents: nil aBool: true Receiver's instance variables: tools: an IdentityDictionary(#basicInspector->BasicInspector #browser->[self de...etc... inspectorsMap: an IdentityDictionary(#CompiledMethod->#CompiledMethodInspector ...etc...
Process>>debug:title:full: Receiver: a Process in GRPharoPlatform>>openDebuggerOn: Arguments and temporary variables: context: OrderedCollection(Object)>>error: title: 'Error: startIndex is out of bounds' bool: true topCtxt: GRPharoPlatform>>openDebuggerOn: Receiver's instance variables: nextLink: nil suspendedContext: GRPharoPlatform>>openDebuggerOn: priority: 60 myList: nil threadId: nil errorHandler: nil name: 'ZnMultiThreadedServer HTTP worker' env: nil
[process debug: anError signalerContext title: anError description full: true] in GRPharoPlatform>>openDebuggerOn: Receiver: a GRPharoPlatform Arguments and temporary variables: anError: Error: startIndex is out of bounds process: a Process in GRPharoPlatform>>openDebuggerOn: Receiver's instance variables: a GRPharoPlatform
WorldState>>runStepMethodsIn: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] queue: SharedQueue with 0 items nextInQueue: [process debug: anError signalerContext title: anError descrip...etc... Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil
PasteUpMorph>>runStepMethods Receiver: a PasteUpMorph(425197568) [world] Arguments and temporary variables:
Receiver's instance variables: bounds: 0@0 corner: 1296@875 owner: nil submorphs: an Array(a TaskbarMorph(984088576) a SystemWindow(347865088) a Syste...etc... fullBounds: nil color: (Color r: 0.97 g: 0.98 b: 1.0) extension: a MorphExtension (666632192) [eventHandler = an EventHandler] [othe...etc... borderWidth: 0 borderColor: (Color r: 0.03 g: 0.02 b: 0.0) backgroundMorph: nil worldState: a WorldState griddingOn: nil
WorldState>>doOneCycleNowFor: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil
WorldState>>doOneCycleFor: Receiver: a WorldState Arguments and temporary variables: aWorld: a PasteUpMorph(425197568) [world] Receiver's instance variables: hands: an Array(a HandMorph(843055104)) viewBox: 0@0 corner: 1296@875 canvas: a FormCanvas on: RFBDisplayScreen(1296x875x32) damageRecorder: a DamageRecorder stepList: a Heap(StepMessage(#stepAt: -> an OverflowRowMorph(210239488))(an Ove...etc... lastStepTime: 19250 lastStepMessage: nil lastCycleTime: 19271 alarms: a Heap() lastAlarmTime: 19250 menuBuilder: nil
PasteUpMorph>>doOneCycle Receiver: a PasteUpMorph(425197568) [world] Arguments and temporary variables:
Receiver's instance variables: bounds: 0@0 corner: 1296@875 owner: nil submorphs: an Array(a TaskbarMorph(984088576) a SystemWindow(347865088) a Syste...etc... fullBounds: nil color: (Color r: 0.97 g: 0.98 b: 1.0) extension: a MorphExtension (666632192) [eventHandler = an EventHandler] [othe...etc... borderWidth: 0 borderColor: (Color r: 0.03 g: 0.02 b: 0.0) backgroundMorph: nil worldState: a WorldState griddingOn: nil
[[World doOneCycle. Processor yield. false] whileFalse. nil] in Project class>>spawnNewProcess Receiver: Project Arguments and temporary variables:
Receiver's instance variables: superclass: Model methodDict: a MethodDictionary(#beep->(Project>>#beep "a CompiledMethod(3169320...etc... format: 132 instanceVariables: nil organization: ('*sound' beep)
subclasses: nil name: #Project classPool: a Dictionary(#UIProcess->a Process in nil ) sharedPools: nil environment: a SystemDictionary(lots of globals) category: #'System-Support' traitComposition: {} localSelectors: nil
[self value. Processor terminateActive] in BlockClosure>>newProcess Receiver: [[World doOneCycle. Processor yield. false] whileFalse. nil] Arguments and temporary variables:
Receiver's instance variables: outerContext: Project class>>spawnNewProcess startpc: 57 numArgs: 0
--- The full stack --- NonInteractiveUIManager(Object)>>doesNotUnderstand: #openDebuggerOn:context:label:contents:fullView: Debugger class>>openOn:context:label:contents:fullView: [:tool | ^ tool openOn: aProcess context: aContext label: aString contents: contents fullView: aBool] in ToolRegistry>>debug:context:label:contents:fullView: ToolRegistry>>using:do: ToolRegistry>>debug:context:label:contents:fullView: Process>>debug:title:full: [process debug: anError signalerContext title: anError description full: true] in GRPharoPlatform>>openDebuggerOn: WorldState>>runStepMethodsIn: PasteUpMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [[World doOneCycle. Processor yield. false] whileFalse. nil] in Project class>>spawnNewProcess [self value. Processor terminateActive] in BlockClosure>>newProcess
On 28 November 2011 17:44, Norbert Hartl <norbert@hartl.name> wrote:
Ok,
this is the behaviour with an image #13320 and the newest cog vm. I don't need to do anything because the NonInteractiveUIManager is set to default automatically regardless if -nodisplay or -headless is specified. And in my case this is broken. However if I hack away the noninteractive stuff by doing
UIManager default: (UIManager default instVarAt: 1).
than it works. A debugger pops up in the image and can see the real exception with VNC. So to me it seems that there is something broken. Igor, can you add anything. I think Marcus is not available at the moment.
a non-interactive manager takes ownership when you either: - run image with -headless param - during image startup (StartupUIManager). the default behavior of it, when any interaction with user is requested, it signals ErrorNonInteractive error, and default action for this error is to print stack trace to log file and leave to OS. signaling any other unhandled error leading to opening a debugger window, which is considered a user interaction request, and consequently bails out to OS as well by signaling ErrorNonInteractive. if you run headless and don't want to use this manager, you can disable it, just by setting a morphic ui manager: UIManager default: MorphicUIManager new.
Norbert
-- Best regards, Igor Stasenko.
Am 28.11.2011 um 18:53 schrieb Igor Stasenko:
On 28 November 2011 17:44, Norbert Hartl <norbert@hartl.name> wrote:
Ok,
this is the behaviour with an image #13320 and the newest cog vm. I don't need to do anything because the NonInteractiveUIManager is set to default automatically regardless if -nodisplay or -headless is specified. And in my case this is broken. However if I hack away the noninteractive stuff by doing
UIManager default: (UIManager default instVarAt: 1).
than it works. A debugger pops up in the image and can see the real exception with VNC. So to me it seems that there is something broken. Igor, can you add anything. I think Marcus is not available at the moment.
a non-interactive manager takes ownership when you either: - run image with -headless param - during image startup (StartupUIManager).
the default behavior of it, when any interaction with user is requested, it signals ErrorNonInteractive error, and default action for this error is to print stack trace to log file and leave to OS. signaling any other unhandled error leading to opening a debugger window, which is considered a user interaction request, and consequently bails out to OS as well by signaling ErrorNonInteractive.
if you run headless and don't want to use this manager, you can disable it, just by setting a morphic ui manager:
UIManager default: MorphicUIManager new.
Yes, that's the same as what I did with restoring the original manager. Using the non-interactive manager does not output the stack trace of the exception that occured but the exception that is triggered because openDebuggerOn:context:label:contents:fullView: is not implemented in NonInteractiveUIManager. And even if I impement the method with ^ self nonInteractive I don't get the exception that originally ocurred. So you cannot see the exception that caused the image to exit. Shouldn't that be different? Norbert
On 28 November 2011 20:01, Norbert Hartl <norbert@hartl.name> wrote:
Am 28.11.2011 um 18:53 schrieb Igor Stasenko:
On 28 November 2011 17:44, Norbert Hartl <norbert@hartl.name> wrote:
Ok,
this is the behaviour with an image #13320 and the newest cog vm. I don't need to do anything because the NonInteractiveUIManager is set to default automatically regardless if -nodisplay or -headless is specified. And in my case this is broken. However if I hack away the noninteractive stuff by doing
UIManager default: (UIManager default instVarAt: 1).
than it works. A debugger pops up in the image and can see the real exception with VNC. So to me it seems that there is something broken. Igor, can you add anything. I think Marcus is not available at the moment.
a non-interactive manager takes ownership when you either: - run image with -headless param - during image startup (StartupUIManager).
the default behavior of it, when any interaction with user is requested, it signals ErrorNonInteractive error, and default action for this error is to print stack trace to log file and leave to OS. signaling any other unhandled error leading to opening a debugger window, which is considered a user interaction request, and consequently bails out to OS as well by signaling ErrorNonInteractive.
if you run headless and don't want to use this manager, you can disable it, just by setting a morphic ui manager:
UIManager default: MorphicUIManager new.
Yes, that's the same as what I did with restoring the original manager. Using the non-interactive manager does not output the stack trace of the exception that occured but the exception that is triggered because
openDebuggerOn:context:label:contents:fullView:
is not implemented in NonInteractiveUIManager. And even if I impement the method with
^ self nonInteractive
I don't get the exception that originally ocurred. So you cannot see the exception that caused the image to exit. Shouldn't that be different?
ok, seems like someone extended protocol without implementing analog in non-interactive manager. please file a bug report we will fix that.
Norbert
-- Best regards, Igor Stasenko.
Am 29.11.2011 um 02:24 schrieb Igor Stasenko:
ok, seems like someone extended protocol without implementing analog in non-interactive manager. please file a bug report we will fix that.
done. http://code.google.com/p/pharo/issues/detail?id=5040 Norbert
Igor Stasenko wrote
the default behavior of it, when any interaction with user is requested, it signals ErrorNonInteractive error, and default action for this error is to print stack trace to log file and leave to OS. signaling any other unhandled error leading to opening a debugger window, which is considered a user interaction request, and consequently bails out to OS as well by signaling ErrorNonInteractive.
Igor, I added your response to the class comment, but could you expand the above paragraph (maybe some periods, lol). I don't understand it. -- View this message in context: http://forum.world.st/Problem-with-NonInteractiveUIManager-tp4115412p4116981... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 28 November 2011 23:36, Sean P. DeNigris <sean@clipperadams.com> wrote:
Igor Stasenko wrote
the default behavior of it, when any interaction with user is requested, it signals ErrorNonInteractive error, and default action for this error is to print stack trace to log file and leave to OS. signaling any other unhandled error leading to opening a debugger window, which is considered a user interaction request, and consequently bails out to OS as well by signaling ErrorNonInteractive.
Igor, I added your response to the class comment, but could you expand the above paragraph (maybe some periods, lol). I don't understand it.
here what happens: [ some error signal ] -> attempt to open debugger -> [signal ErrorNonInteractive] -> leave to OS
-- View this message in context: http://forum.world.st/Problem-with-NonInteractiveUIManager-tp4115412p4116981... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
On 29 November 2011 16:42, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I'm confused by your sentence
if you run headless and don't want to use this manager, you can disable it, just by setting a morphic ui manager:
UIManager default: MorphicUIManager new.
we disable it by setting a morphic ui manager?
perhaps we should introduce another message like: UIManager ensureInteractive. so, then you don't have to mention the concrete class name. -- Best regards, Igor Stasenko.
send the code and open a bug entry. There is no simple useless easy code. Improving all the time is the only way. Stef On Nov 29, 2011, at 4:56 PM, Igor Stasenko wrote:
On 29 November 2011 16:42, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I'm confused by your sentence
if you run headless and don't want to use this manager, you can disable it, just by setting a morphic ui manager:
UIManager default: MorphicUIManager new.
we disable it by setting a morphic ui manager?
perhaps we should introduce another message like: UIManager ensureInteractive.
so, then you don't have to mention the concrete class name.
-- Best regards, Igor Stasenko.
This is what I have for a class comment, between what was already there and what Igor said in this thread: I am a UI manager which doesn't provide any kind of interactivity with users. I guarantee that your task(s) will run in fully-automated mode. This is useful for things like: - an image runing as a persistent application on a server - an image running headless from the command-line with some batch scripts/commands I automatically take ownership: - when you run an image with the -headless parameter - during image startup (StartupUIManager) To install me: UIManager default: NonInteractiveUIManager new. To replace me: UIManager default: MorphicUIManager new. To handle requests when a UI is not available, catch ErrorNonInteractive. For example: response := [ UIManager default request: 'what is your name?' ] on: ErrorNonInteractive do: [:ex | ex return: 'Mr. John Smith' ]. My default error handling: for any unhandled error, print a stack trace to a log file and exit to the OS. -- View this message in context: http://forum.world.st/Problem-with-NonInteractiveUIManager-tp4115412p4119806... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
sounds good to me. open an entry. On Nov 29, 2011, at 5:32 PM, Sean P. DeNigris wrote:
This is what I have for a class comment, between what was already there and what Igor said in this thread:
I am a UI manager which doesn't provide any kind of interactivity with users. I guarantee that your task(s) will run in fully-automated mode. This is useful for things like: - an image runing as a persistent application on a server - an image running headless from the command-line with some batch scripts/commands
I automatically take ownership: - when you run an image with the -headless parameter - during image startup (StartupUIManager)
To install me: UIManager default: NonInteractiveUIManager new.
To replace me: UIManager default: MorphicUIManager new.
To handle requests when a UI is not available, catch ErrorNonInteractive. For example: response := [ UIManager default request: 'what is your name?' ] on: ErrorNonInteractive do: [:ex | ex return: 'Mr. John Smith' ].
My default error handling: for any unhandled error, print a stack trace to a log file and exit to the OS.
-- View this message in context: http://forum.world.st/Problem-with-NonInteractiveUIManager-tp4115412p4119806... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (4)
-
Igor Stasenko -
Norbert Hartl -
Sean P. DeNigris -
Stéphane Ducasse