OnDestroy for PhotonView ... but GO is still in instantiatedObjects

Options
Unity is giving warnings on all my -network synced- GameObjects when loading a new scene and crashes.

Short description:
- Multiplayer-Game is started from mainmenu with a 'mapcycle' wich is read from a txt-file.
- Each scene has a room.
- GameObjects are instantiated with PhotonNetwork.Instantiate
- and some with PhotonNetwork.InstantiateSceneObject...
- once the game is over the next scene will be loaded from room

It's working fine on a 64Bit System, but crashes on a 32Bit computer once the new scene gets loaded.

In Unity's Output.log appears:
OnDestroy for PhotonView View (0)1 on GameObjectsName(Clone) (scene) but GO is still in instantiatedObjects. instantiationId: 1. Use PhotonNetwork.Destroy(). Loading new scene caused this. ... ... Crash!!!

PhotonNetwork.automaticallySyncScene = true;
is set in mainmenu and room.
And I use
PhotonNetwork.LoadLevel(scenename);
to load the scenes.

The question is: can these Warnings cause the crashes?
And how can I get rid of the Warnings?

Comments

  • Tobias
    Options
    The warning is just that: It tells you that some GOs are being destroyed due to loading a scene.
    Unity does that on load but for networked GameObjects, people often forget that this is the case (hence the warning).
    You can disable the warning (by commenting it out) or destroy the GOs before loading.

    The crash should not be caused by this.
    Any more info on that? You skipped some of the logging...
  • Lotte
    Lotte
    edited March 2016
    Options
    The crash was not caused by these warning messages!
    I've got a memory problem that messes up the log files.
    The skipped lines made no sense cause they were standard messages without any errors or warnings.

    Sometimes Unity crashes without any warning or log and I noticed, that the RAM increases up to 3++ GB while cycling through scenes (Unity 4.7.0 32bit, max 3GB).

    You're right, It has nothing to do with the warning messages or PUN at all.
    Thanks anyway!
    Your support is awesome!
  • Tobias
    Options
    Thanks for the update. Good to know.

    And thanks for the compliment, too! Very appreciated.