[BUG] Exception while stopping playmode.

Forums 💬 NodeCanvas ⚙️ Support [BUG] Exception while stopping playmode.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16339
    forcepusher
    Participant

      Repro link (with Nodecanvas cut from the project): https://drive.google.com/open?id=1qrvA_7u1j784vq43RC0rVmaCB6-TlM2l

      Steps to reproduce:
      1. Open “StartHere” scene in any Unity version 2019.3.10f1 -209.3.12f1.
      2. Enter and exit Playmode repeatedly until you see the exception. It occurs about 30-50% of the time.
      3. Observe the exception:
      Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
      The following scene GameObjects were found:
      _MonoManager

      #16344
      Gavalakis
      Keymaster

        Hello,
        This has been fixed already. To fix this, please open up Graph.cs file and change line #528

        From this:
        Debug.Assert(Threader.applicationIsPlaying, "StartGraph should have been called in play mode only.");

        To this:
        Debug.Assert(Application.isPlaying, "StartGraph should have been called in play mode only.");

        Please let me know if that works for you (or if you want me to send you the fix to your registered email)

        Thanks,

        #16343
        forcepusher
        Participant

          Hello. Thanks for responding, but that didn’t solve the problem in a production game, neither the reproduction project.
          This is a minor issue, possibly related to exiting playmode during a scene load awaiting activation.
          It could be worked around by manually allocating MonoManager in one of the singleton GameObjects, so we’re not in a rush.
          Regards.

          #16342
          Gavalakis
          Keymaster

            Hello again,

            I checked out the reproduction project you’ve sent me (thanks).
            It seems that the issue is only caused in conjunction with the LoadSceneAsync (allowSceneActivation = false) task that exists in the BT, which seems to create some strange behaviour. A quickfix about this, is to add an extra protection check in MonoManager as to when an instance can be created. Please open up MonoManager.cs and change line number #36 to be like this:
            if ( _current == null && Threader.applicationIsPlaying && !isQuiting ) {

            This solves this edge case on my end. Please let me know.
            Thanks 🙂

            #16341
            forcepusher
            Participant

              This indeed solved the problem. Thanks a lot.

              #16340
              Gavalakis
              Keymaster

                Great. Thanks for letting me know 🙂

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.