Deepprofile emptys maindictionary

Hello,

Edit: The code is just to illustrate how i tried to debug no need to read it.

I came some time ago around a strange issue which sometimes occured:
My script stops responding to most input.

Now i tried to trace the issue.

I added this to my update:

        if (g.timer % 100 == 1) {
            options = File.ReadAllLines (Path.Combine (p.gamesetpath, "update.glo"));
            if (options.Contains ("false")) {
                Debug.Log (gs.globaltemplate.Count);
                return;
            }
            if (options.Contains ("end")) gameflow.quitprogram ();
        }

It tells me gs.globaltemplate.Count is 0.

moreover i added and extra button to stop update:

disablesettings.GetComponent<Button> ().onClick.AddListener (delegate { g.disabled.Add ("update"); });

And in update:

        if (g.disabled.Contains ("update")) { pre ("update disabled"); return; }

This button too is dead!

I figured out: if i now run my app and disable or enable deepprofile this issue happens.

I think all variables and listeners are wiped then, update is however still running.

Also i like to add that the script has near 10000 lines now and does use update to create environment and other things.

Any ideas for the cause or suggestions?

I’d actually like to help, but I’m too lazy to wrap my around all the non-intuitive variable names. :smile:

*Edit I just remembered that I used deep profiling in a test version of an older project some time ago and it suddenly started to throw null reference exceptions. But the code parts weren’t mine and it was an old version anyway, so I did not have a closer look at it, as I thought it was a bug on our side in this specific version.

You dont need to look at the code.
Its just for illustration.
This is the problem:

  1. Maindictionary is empty.

  2. Listerner dont work anymore.

  3. update still running.

  4. Right mouse button input script in which is a reference to the main not working script does not work.

  5. the camera rig script which does not refer to the main script does work.