Xamarin iOS Failed to load AOT module

Options
lampshade9909
edited August 2013 in DotNet
Failed to load AOT module 'PhotonLoadbalancingApi' while running in aot-only mode because a dependency cannot be found or it is out of date.

I'll walk you through what's happening. I'm using Xamarin Studio on a MAC. I added the Photon Cloud component into my iOS project. I ran the demo several times and it worked fine. I even uploaded the demo onto several devices. I had two iPads and the iPad simulator (on my mac) running the demo on the same server. I later made an extremely minor change to some code: In GameLogic.c, I literally changed "this.JoinRandomGame = true;" to "this.JoinRandomGame = false;" and then back again. Nothing else was changed. I rebuilt the project in the simulator, noticed that the simulator was no longer able to connect to the same game as the two iPads (probably because it's a different build now?). So I did a build clean, then built for one of the iPads. It builds successfully but on start up it crashes with this error message. The funny thing is, it runs just fine on the simulator, it only crashes on the device. I was building in Debug mode, so I decided to build in Release mode. I built in release mode to the iPad, it worked just fine! So I deleted the app, and built in Debug mode again, it crashes with the error message again!

Failed to load AOT module 'PhotonLoadbalancingApi' while running in aot-only mode because a dependency cannot be found or it is out of date.

Comments

  • Tobias
    Options
    Hm. I am unsure if this is a problem we can solve or if it's something Xamarin should know of and comment.
    Basically you say everything worked fine until you changed some code and re-compiled. The setup is also fine for release builds but not for debug.
    This is more or less out of reach for me. The lib is there and runs. Xamarin Components only contain one library build: debug, so I don't know why it compiles one time but not the other.

    The only hint I know: You can check your project setup if it references the PhotonLoadbalancingApi.dll. In that case, don't use the LoadBalancing API's code (we include the source in the project).
    This is very vague, as it should lead to very different issues if you used both.

    If you post on the Xamarin forum, please post a link to it here. I might add details, if needed by Xamarin.
  • I just sent Xamarin's support an email and included a link to this thread. If needed they could post here or I'll play middle man and post any questions they have.
  • So for some reason, this problem quit happening and I can't reproduce it. I sent my log files off to Xamarin to be analyzed. For now, just assume this problem has been resolved.

    Thanks!
  • Tobias
    Options
    Thanks for the heads up!!
    I got no info from them so far and assume it was an issue in a Xamarin version which is now updated / replaced.
    Let us know if anything else is odd...