Skip to main content
August 29, 2009
Question

Bug Report: application.onAppStart

  • August 29, 2009
  • 1 reply
  • 1289 views

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 has been closed for replies.

    1 reply

    September 3, 2009

    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?

    September 4, 2009

    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?

    September 8, 2009

    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.