freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FR-devel] Problem with RUNNING state


From: Laurent Julliard
Subject: Re: [FR-devel] Problem with RUNNING state
Date: Fri, 28 Jun 2002 17:30:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Curt Hibbs wrote:

Laurent


GuiSetup was supposed to fulfill this need. When GuiSetup is started, then
the Gui system was supposed to be up and running. Obviously this is not the
case as I can see Gui Renderers starting even after GuiSetup has finished.

I should point out that GuiSetup itself does not care whether or not the gui
renderers are up, is it merely does the configuration/layout of the GUI on
the databus, knowing that it *will* get rendered at some point.

What we want is for GuiSetup to be dependent on the gui renderer, but we
don't want GuiSetup to have to know what renderer is being used.

I think our pluging dependency stuff isn't sufficient for this, plus I've
been feeling that its a little too complicated and inflexible. But if we can
get by (temporarily) I'd rather not deal with it right now.

For now, why not make GuiSetup dependent on the subsystem GuiRenderFox. This
hard codes then renderer, but should work for now, until we have something
better.


Rich made the modification for the subsytem dependency and I have it in my working copy. However even with making GuiSetup dependent on GuiRenderFox it still crashes FreeRIDE. Looking at the log file (attached) here is what happens: all plugins seems to be loading and starting ok with the Debugger starting late in the process (which is what we want).

If you look at the 2 last lines of the log right after the Debugger started you can see the MenuPane plugin in action because the debugger wants to insert the "Debug" item in the Run menu like this:

runmenu = plugin["/system/ui/components/MenuPane/pool/Run_menu"].manager
runmenu.add_command("/system/ui/commands/AppCommands/Debugger")

# Associate a command with the Debug menu item
base_slot = plugin["/system/ui/commands/AppCommands"]
base_slot["Debugger"].data =
      GenericCommand.new("&Debug\tShift-F10") {
        base_slot["/system/ui/services/Debugger"].call
      }

And right after the 2 last lines in the log file the application crashes.

The reason for that is because at that point and eventhough AppFrameRenderFox has already started none of the FOX resources have been properly initialized (there is no Main Window initialized) so the MenuPaneRenderFox does its job thinking that is everything is already running ok but what "RUNNING" says for now is only that we have entered the start method note the initialization is finished.

So I think there is something wrong in the design here. I see several expelnations:

a) the semantic of the "RUNNING" state is not good in the sense that this is not because a plugin is in a running state that it is ready to work. may be we should introduce another transient state like "INITIALIZING" that woudl eventually become "RUNNING" once the initialization has completed

b) Another problem is that the RUNNING state is associated with the **Class** method start and what we care about is the state of the instances of that plugin.

c) we could ask the plugin to the running state later in the process. Instead of transitioning in the start method we could transition at the end of the initialize method. But then it becomes an action that we do in an instance method and I don;t know what are the implications of this.

I'm open to discussion here because I really think that something is flawed in the way we use the state transitions in the plugin but I don;t yet see how to fix it in the proper way.

laurent

--
Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team
>> Host your Xerox Software project on CodeX: http://codex.xerox.com
>> address@hidden community: http://xww.linux.world.xerox.com
 INFO FreeRIDE: Plugin(DatabusInspector): Loading
 INFO FreeRIDE: Plugin(DatabusInspectorSubsystem): Loading
 INFO FreeRIDE: Plugin(Logger): Loading
 INFO FreeRIDE: Plugin(DatabusInspectorRenderFox): Loading
 INFO FreeRIDE: Plugin(DockBarRenderFox): Loading
 INFO FreeRIDE: Plugin(MenuBarRenderFox): Loading
 INFO FreeRIDE: Plugin(GuiRenderFox): Loading
 INFO FreeRIDE: Plugin(DockPanes): Loading
 INFO FreeRIDE: Plugin(DockBars): Loading
 INFO FreeRIDE: Plugin(EditPanes): Loading
 INFO FreeRIDE: Plugin(MenuPanes): Loading
 INFO FreeRIDE: Plugin(MenuBars): Loading
 INFO FreeRIDE: Plugin(AppFrames): Loading
 INFO FreeRIDE: Plugin(GuiSetup): Loading
 INFO FreeRIDE: Plugin(GuiCore): Loading
 INFO FreeRIDE: Plugin(EditCommands): Loading
 INFO FreeRIDE: Plugin(AppCommands): Loading
 INFO FreeRIDE: Plugin(System_Commands): Loading
 INFO FreeRIDE: Plugin(System_Commands_Subsystem): Loading
 INFO FreeRIDE: Plugin(Logger): Starting
 INFO FreeRIDE: Plugin(EditPanes): Starting
 INFO FreeRIDE: Plugin(DockBars): Starting
 INFO FreeRIDE: Plugin(DockPanes): Starting
 INFO FreeRIDE: Plugin(AppFrames): Starting
 INFO FreeRIDE: Plugin(MenuBars): Starting
 INFO FreeRIDE: Plugin(AppFrameRenderFox): Starting
 INFO FreeRIDE: Plugin(AppFrameRenderFox): AppFrame Listener started
 INFO FreeRIDE: Plugin(EditPaneRenderFox): Starting
 INFO FreeRIDE: Plugin(EditPaneRenderFox): EditPane Listener started
 INFO FreeRIDE: Plugin(MenuPaneRenderFox): Starting
 INFO FreeRIDE: Plugin(MenuPaneRenderFox): MenuPaneListener started
 INFO FreeRIDE: Plugin(DatabusInspectorRenderFox): Starting
 INFO FreeRIDE: Plugin(MenuBarRenderFox): Starting
 INFO FreeRIDE: Plugin(MenuBarRenderFox): MenuBarListener started
 INFO FreeRIDE: Plugin(DockBarRenderFox): Starting
 INFO FreeRIDE: Plugin(DockBarRenderFox): DockBarListener started on 
/system/ui/components/DockBar/pool/
 INFO FreeRIDE: Plugin(GuiRenderFox): Starting
 INFO FreeRIDE: Plugin(EditCommands): Starting
 INFO FreeRIDE: Plugin(EditCommands): Command component created for EditCut
 INFO FreeRIDE: Plugin(EditCommands): Command component created for EditCopy
 INFO FreeRIDE: Plugin(EditCommands): Command component created for EditPaste
 INFO FreeRIDE: Plugin(AppCommands): Starting
 INFO FreeRIDE: Plugin(AppCommands): Command component created for FileOpen
 INFO FreeRIDE: Plugin(AppCommands): Command component created for FileClose
 INFO FreeRIDE: Plugin(AppCommands): Command component created for FileSave
 INFO FreeRIDE: Plugin(AppCommands): Command component created for Exit
 INFO FreeRIDE: Plugin(AppCommands): Command component created for About
 INFO FreeRIDE: Plugin(System_Commands): Starting
 INFO FreeRIDE: Plugin(MenuPanes): Starting
 INFO FreeRIDE: Plugin(GuiSetup): Starting
 INFO FreeRIDE: Plugin(Debugger): Starting
 INFO FreeRIDE: Plugin(DebuggerSubsystem): Starting
 INFO FreeRIDE: Plugin(MenuPanes): MenuPane component created for Run_menu
 INFO FreeRIDE: Plugin(MenuPaneRenderFox): MenuPane Run_menu started

reply via email to

[Prev in Thread] Current Thread [Next in Thread]