Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Jiraiyah · Jan 16, 2015 at 06:49 PM · errormemorydialogprogress bar

EditorUtility.DisplayDialog memory Issue

Hi I'm developing an AI system and at some points in the development / Analyse scene time, I need to first confirm if the user want to do part of analysis or he would like to bypass one section and continue the rest, so I want to ask about process and if he agree do that and then move on to the next, each process has a progress bar showing up that indicates one on one run of internal cycle of the method and sometimes that cycle happens for 18,000 time each method, the code is like this :

    bool ok = EditorUtility.DisplayDialog("Analyze", "Analyze the scene? Depending on multi factors, this may take minutes!",
                 "Ok", "Cacel");
             if (ok)
             {
                 bool neighb = EditorUtility.DisplayDialog("Analyze", "Generate Neighbour Lookup Table?", "Ok", "Cacel");
                 if (neighb)
                 {
                     CollectNeighborData();
                 }
                 EditorUtility.ClearProgressBar();
                 bool rang = EditorUtility.DisplayDialog("Analyze", "Generate Inrange Lookup Table?", "Ok", "Cacel");
                 if (rang)
                 {
                     CollectInRangeData();
                 }
                 EditorUtility.ClearProgressBar();
                 bool zon = EditorUtility.DisplayDialog("Analyze", "Generate zones?", "Ok", "Cacel");
                 if (zon)
                 {
                     CollectZoneData(_zoneX, _zoneZ);
                 }
                 EditorUtility.ClearProgressBar();
                 bool vis = EditorUtility.DisplayDialog("Analyze", "Generate Line of Sight Lookup Table?", "Ok", "Cacel");
                 if (vis)
                 {
                     CollectLineOfSightData();
                 }
                 EditorUtility.ClearProgressBar();
                 bool ser = EditorUtility.DisplayDialog("Serialization", "Serialize Data? If you cancel, all calculated Analisis will be lost on project update.", "Ok", "Cacel");
                 if (ser)
                 {
                     Nodes.SaveNodes();
                 }
                 EditorUtility.ClearProgressBar();
             }
 

each of the methods is more or less like this, this is the smallest one so I put it in the code but others are also similar in the aspect that they have internal loops and at the end of the loop I update the progress bar :

 void CollectNeighborData()
     {
         Stopwatch sw = new Stopwatch();
         sw.Start();
         Nodes.Neighbours = new Dictionary<Node, List<Node>>();
         List<Node> neighbours = new List<Node>();
         int k = 0;
         foreach (var node in Nodes.AllNodes)
         {
             neighbours = GridHandler.GetNeighbourNodes(node, Nodes.Gap);
             Nodes.Neighbours.Add(node, neighbours);
             EditorUtility.DisplayProgressBar(
                     "Neighbour Data",
                     "Collecting Data Lookup Table for Node Neighbours",
                     k / (float)Nodes.AllNodes.Count);
             k++;
         }
         sw.Stop();
         Debug.Log("Neighbour Data Table in : " + sw.ElapsedMilliseconds + " ms = " + sw.Elapsed);
     }

Now the problem is after the first two questions is being shown and the first progress bar finish his job, I get this error :

Error displaying dialog: The current process has used all of its system allowance of handles for Window Manager objects.

 UnityEditor.EditorUtility:DisplayDialog(String, String, String, String)
 GridGeneratorEditor:analyseScene() (at Assets/UnityAI.net/Editor/GridGeneratorEditor.cs:229)
 GridGeneratorEditor:OnInspectorGUI() (at Assets/UnityAI.net/Editor/GridGeneratorEditor.cs:76)
 UnityEditor.DockArea:OnGUI()
 

I think it's more about some memory being used by GUI stuff and not being released, so the question is how to fix this issue?

thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What are all these warnings about? 0 Answers

"Fatal error! CheckDisalowAllowcation" when making a huge 2d array 2 Answers

m_Memory.renderTextureBytes<0 1 Answer

[CRASH] Memory can not be "read" / "write" 1 Answer

RAM problem on mobile phone? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges