Skip to main content
Aug 29, 2009 1:20 PM UTC
Question

Bug Report: application.onAppStart

If LoadVars.sendAndLoad is used from within application.onAppStart and if LoadOnStartup is true in Application.xml, then the application will crash when the server is restarted, and won't load up. It appears that onAppStart isn't the best place to put startup code, since the FMS server isn't completely initialized at that point? This requires fixing.

Workaround: used setInterval() to execute a function 2 seconds after onAppStart and put my initialization stuff in there (the init stuff requires sendAndLoad because it calls an API on a web server that does some database initialization).

Bug tested on FMIS 3.5.2

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Sep 3, 2009 2:56 PM UTC

    Thanks for pointing this out... I've not read anything about this in the past.

    Just curious... do you see the same problem if the LoadVars call is outside the onAppStart method, and that method is called in the onAppStart?

    Translate
    Sep 4, 2009 5:49 PM UTC

    That is how I was testing it, LoadVars is called from a method, which is called from onAppStart

    Can you not reproduce the problem on your machine?

    Translate
    Sep 8, 2009 12:34 PM UTC

    I haven't tried. I've never had cause to start an application when the vhost starts. I was just wondering what your experience was.

    Translate