Re: XSI crashes on startup when updating a workgroup

Date : Thu, 28 Feb 2008 23:09:24 -0500
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: XSI crashes on startup when updating a workgroup
Look Matt, I'm not saying anything here.

*All* my test showed that A loads before underscore.... consistently (in 6.02).
In XSI 5.11, underscore loaded before a, in 6.02, it's A before
underscore. Consistently.

In order to reduce file I/O overhead (which is a lot more significant
with Python), I decided to have only one plugin per scripting
language. The project is called "podcats", so the plugins are named:
podcats_py.py
podcats_js.js (which also contains the events)
podcats_vb.vbs.
The workgroup syncing plugin is named async.js. It always loads first,
I assure you. I'm not pretending it is the expected behavior or it is
reliable, it just do that consistently from what I can tell.

A plugin file name is just a plugin file name. You can name it
whatever you want, effectively it should modify only the order the
plugins load.


As for your problem, remember: if you call UpdatePlugins() from a
plugin that has to be updated in the process, you'll compromise XSI's
stability. That's what my experiments led me to conclude. So do
whatever you want to deal with this.

As for your specific case, just try it mate. Perhaps your results will
be different, I'm not pretending otherwise :-)



The IDEAL scenario would be to launch XSI from a script file rather
than the factory bactch file. The script file, most likely
javascript/jscript, would really download updates from an apache
server, and then launch XSI and exit. I experimented with that at Big
Bang, just before leaving, and it worked really well. It also allowed
us to change the log commands preference without having reset to true
by XSI, by modifying the user preference file. That was sweet, users
gained performance.


Bernard


PS: Why do you require for an update upon termination? I'm not sure
it's relevant to have an update when exiting, since the next launch is
garanteed to get the update done.




On Thu, Feb 28, 2008 at 10:45 PM, Matt Lind <mlind(at)carbinestudios.com> wrote:
> So are you saying XSI loads plugins from workgroups alphabetically?  I
>  would tend to think that's not a reliable assumption.  I mean, why would
>  XSI waste time alphabetizing plugin filenames before loading them on
>  startup?  what's the point?  I would think it would load them as they're
>  encountered on the harddrive which could be any order depending on how
>  the computer is configured.
>
>  Anyway, I came onboard after many plugins had already been developed by
>  my predecessor - many of which begin with 'a' (Doh!).  I guess I can try
>  an underscore (_) as that usually sorts earlier than 'a', but I don't
>  know if XSI will accept a plugin that begins with an underscore.
>
>  Here's a small snippet of the plugins I have to deal with:
>
>         animationselector.js (operator)
>         animpik.js      (command)
>         mayamode.js (command)
>         NC_ToolsUpdate.js       (command)
>         NC_XSIOnStartup.js (event)
>         NC_XSIOnTerminate.js (event)
>         pikstart.js (command)
>         ...
>
>  My stuff is prefixed with 'NC_'.  NC_ToolsUpdate.js is my script to copy
>  latest tools from our server into the workgroups.    NC_ToolsUpdate.js
>  is called from 3 places: NC_XSIOnStartup.js (siOnStartup event),
>  NC_XSIOnTerminate.js (siOnTerminate event), and manually from a custom
>  menu inside XSI (so user can update on demand).  Each of the 3 calls
>  NC_ToolsUpdate.js with different arguments to specify what should be
>  updated.  The startup event tells NC_ToolsUpdate to update everything
>  except events, the terminate event tells NC_ToolsUpdate.js to update
>  only the events.  When called from a custom menu inside XSI,
>  NC_ToolsUpdate updates everything.  In all cases, the last thing
>  NC_ToolsUpdate.js does before terminating is call
>  XSIApplication.UpdatePlugins() to refresh the workgroup.  XSI only
>  crashes on startup or terminate, it never crashes or throws errors when
>  NC_ToolsUpdate is called on demand from a custom menu inside XSI.
>
>  If I understand you correctly, your saying if I rename
>  'NC_ToolsUpdate.js' to 'aNC_ToolsUpdate.js' (or '_NC_ToolsUpdate.js'),
>  XSI will load it first allowing it to download everything to the
>  workgroup without crashing or need to call
>  XSIApplication.UpdatePlugins()?
>
>
>
>  Matt
>
>
>  > -----Original Message-----
>  > From: owner-xsi(at)Softimage.COM
>  > [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Bernard Lebel
>
>
> > Sent: Thursday, February 28, 2008 7:04 PM
>  > To: XSI(at)Softimage.COM
>  > Subject: Re: XSI crashes on startup when updating a workgroup
>  >
>  > Yes. I use the siOnStartup to set a bunch of preferences. The
>  > plugin that has this event loads after the workgroup sync
>  > plugin has done its job.
>  > Why does that matter?
>  >
>  >
>  > Bernard
>  >
>  >
>  >
>  > On Thu, Feb 28, 2008 at 9:16 PM, Matt Lind
>  > <mlind(at)carbinestudios.com> wrote:
>  > > Good news, but do you have any events installed in your
>  > workgroup that
>  > > are of type 'siOnStartup'?  I'm wondering how that affects
>  > the update
>  > > process.
>  > >
>  > >
>  > >  Matt
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >  > -----Original Message-----
>  > >  > From: owner-xsi(at)Softimage.COM
>  > >  > [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Bernard Lebel  >
>  > > Sent: Thursday, February 28, 2008 6:06 PM  > To:
>  > XSI(at)Softimage.COM  >
>  > > Subject: Re: XSI crashes on startup when updating a workgroup  >  >
>  > > Yeah I had similar symptoms recently. In my case it was  >
>  > because I
>  > > was calling UpdatePlugins() from a plugin to be updated.
>  > >  >
>  > >  > What I did is I wrote a separate plugin that deals  >
>  > exclusively
>  > > with the synchronization of the workgroup. This  > plugin is never
>  > > updated, so no problem of having it crashing  > XSI, and I
>  > don't even
>  > > need to call  > UpdatePlugins() from it.
>  > >  >
>  > >  > This plugin name is prefixed with an a, and not the other  >
>  > > plugins, so it always loads first. Then it copies the new  > files
>  > > onto the local workgroup. Because it all other plugins  > have not
>  > > been loaded yet, I don't need to call  > UpdatePlugins(), it just
>  > > loads the fresh new plugins.
>  > >  >
>  > >  > Problem entirely solved.
>  > >  >
>  > >  >
>  > >  >
>  > >  > Cheers
>  > >  > Bernard
>  > >  >
>  > >  >
>  > >  >
>  > >  > On Thu, Feb 28, 2008 at 8:24 PM, Matt Lind  >
>  > > <mlind(at)carbinestudios.com> wrote:
>  > >  > >
>  > >  > >
>  > >  > > Hello all,
>  > >  > >     I'm trying to develop a delivery system for our custom
>  > >  > XSI tools,
>  > >  > > but am running into an issue with XSI crashing intermittently.
>  > >  > >
>  > >  > > Each of our artists has a workgroup on their computer which  >
>  > > contains  > > all our custom scripts and addons.  The
>  > latest published
>  > > > copy of each  > > of our tools is located on a
>  > centralized server.
>  > > Every  > time an artist  > > launches XSI, an XSI OnStartup
>  > event is
>  > > triggered (Jscript) which  > > deletes the contents of the artist's
>  > > workgroup Plugins folder  > > (everything except the startup event
>  > > script, of course),  > then copies  > > the latest published tools
>  > > from the server into the workgroup and  > > finishes off
>  > with a call
>  > > to XSIApplication.UpdatePlugins().
>  > >  >  For the
>  > >  > > most part this works.  However we're encountering a problem  >
>  > > which I'm having difficulty solving.
>  > >  > >
>  > >  > > When the artist starts XSI for the first time in the
>  > morning, XSI
>  > > > > crashes on startup.  The famliar XSI encountered an  >
>  > unexpected
>  > > error  > > and must close appears in a dialog.  If the
>  > artist restarts
>  > > XSI, it  > > loads just fine.  If the artist goes to lunch
>  > or takes an
>  > > extended  > > break from XSI, the first time they launch
>  > XSI after the
>  > > break, XSI  > > crashes on startup again.  But if the
>  > artist restarts
>  > > XSI, it works  > > fine.  If user exits XSI normally, then restarts
>  > > XSI within  > 5 minutes, XSI works just fine.
>  > >  > >
>  > >  > > So the pattern is: if XSI is not in use for more than ~5  >
>  > > minutes and  > > is then launched, it will crash on
>  > startup.  For the
>  > > life of me I  > > cannot figure out what's causing the
>  > problem as, to
>  > > the best of my  > > knowledge, I am not deleting any files that XSI
>  > > would need upon  > > startup.  I'm assuming there's a
>  > caching issue at
>  > > play here and  > > possibly an order of operations issue,
>  > but I don't
>  > > know  > where to look  > > as I don't have any error
>  > messages coming
>  > > from XSI to point  > me in a particular direction.
>  > >  > >
>  > >  > > Anybody got any ideas?
>  > >  > >
>  > >  > > Running XSI 6.01 on Windows XP SP2 Intel (32 bit)  > >  > >
>  > > Thanks,  > >  > > Matt  > >  > ---  > Unsubscribe? Mail
>  > > Majordomo(at)Softimage.COM with the following  > text in body:
>  > >  > unsubscribe xsi
>  > >  >
>  > >
>  > >  ---
>  > >  Unsubscribe? Mail Majordomo(at)Softimage.COM with the
>  > following text in body:
>  > >  unsubscribe xsi
>  > >
>  > ---
>  > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following
>  > text in body:
>  > unsubscribe xsi
>  >
>
>  ---
>  Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
>  unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.