<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic R6025 - pure virtual function call,,  Unity crashes in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008248#M32913</link>
    <description>&lt;P&gt;hi all&lt;/P&gt;

&lt;P&gt;I am currently working on face recognition on the R2 release in Unity.. At one place i am trying to load another scene by pressing on a button and it is resulting in an error .ie.&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;STRONG&gt;Runtime Error!&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;R6025 - pure virtual function call&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;and then unity crashes.. the button has a different script attached to it. and also i am using &amp;nbsp;my face recognition camera to use &amp;nbsp;by using dontdestroyonload function and in that script which is attached to the button i am destroying the camera object such as no two camera may exist in one scene...&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	plz can anyone help me??..&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	thanks.&lt;BR /&gt;
	Akshay&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Apr 2015 06:59:06 GMT</pubDate>
    <dc:creator>Akshay_A_</dc:creator>
    <dc:date>2015-04-03T06:59:06Z</dc:date>
    <item>
      <title>R6025 - pure virtual function call,,  Unity crashes</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008248#M32913</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;

&lt;P&gt;I am currently working on face recognition on the R2 release in Unity.. At one place i am trying to load another scene by pressing on a button and it is resulting in an error .ie.&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;STRONG&gt;Runtime Error!&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;R6025 - pure virtual function call&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;and then unity crashes.. the button has a different script attached to it. and also i am using &amp;nbsp;my face recognition camera to use &amp;nbsp;by using dontdestroyonload function and in that script which is attached to the button i am destroying the camera object such as no two camera may exist in one scene...&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	plz can anyone help me??..&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	thanks.&lt;BR /&gt;
	Akshay&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2015 06:59:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008248#M32913</guid>
      <dc:creator>Akshay_A_</dc:creator>
      <dc:date>2015-04-03T06:59:06Z</dc:date>
    </item>
    <item>
      <title>Ok, I can understand, I think</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008249#M32914</link>
      <description>&lt;P&gt;Ok, I can understand, I think, why you are using the DontDestroyOnLoad function. &amp;nbsp;You want to change the scene but have your camera-driven object remain in the same position on the screen when the new scene loads in?&lt;/P&gt;

&lt;P&gt;As for destroying the camera object ... do you mean the game camera that shows the user the view of what it is seeing? &amp;nbsp;If so, I can understand about not having two of these cameras active in the same scene, as Unity says that there is already a camera with an audio listener in the scene and that you should remove one of them.&lt;/P&gt;

&lt;P&gt;You can have more than one camera in a scene though. &amp;nbsp;You just need to look at the camera's settings in the Inspector panel un-tick the "Audio Listener" option on all of the cameras except your main game one.&lt;/P&gt;

&lt;P&gt;Also remember that when you create a new scene, a "Main Camera" is automatically created. &amp;nbsp;If you are going to import into that scene an object that already has a camera attached then just delete this Main Camera. &amp;nbsp;Then you would not have to use a script to destroy the camera.&lt;/P&gt;

&lt;P&gt;Regarding loading in a new scene: in my own project, I used this JavaScript script on my title screen to change to another scene when the button was left-clicked on with the mouse.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(59, 59, 59); font-family: Arial; font-size: 16.2791996002197px; line-height: 24.4188003540039px;"&gt;function OnMouseDown() {&lt;/SPAN&gt;&lt;BR style="color: rgb(59, 59, 59); font-family: Arial; font-size: 16.2791996002197px; line-height: 24.4188003540039px;" /&gt;
	&lt;SPAN style="color: rgb(59, 59, 59); font-family: Arial; font-size: 16.2791996002197px; line-height: 24.4188003540039px;"&gt;Application.LoadLevel ("NAME OF SCENE FILE");&lt;/SPAN&gt;&lt;BR style="color: rgb(59, 59, 59); font-family: Arial; font-size: 16.2791996002197px; line-height: 24.4188003540039px;" /&gt;
	&lt;SPAN style="color: rgb(59, 59, 59); font-family: Arial; font-size: 16.2791996002197px; line-height: 24.4188003540039px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Make sure that you have added each of your scenes to the "build list", which you use when your project has more than one scene file. &amp;nbsp;In each of your scene files, go to the 'File &amp;gt; Build Settings' menu option to open the pop-up build window and then click the "Add Current" button to add that scene name to the build list. &amp;nbsp;Unity will then know how to move from one scene to another when your button is clicked. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Your list should have both the scene file with the button on it and the scene that you want to go to when the button is clicked. &amp;nbsp;It is like creating a link on a website.&lt;/P&gt;

&lt;P&gt;Best of luck!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2015 11:49:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008249#M32914</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2015-04-03T11:49:53Z</dc:date>
    </item>
    <item>
      <title>@Marty well thanks for your</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008250#M32915</link>
      <description>&lt;P&gt;@Marty well thanks for your guidance..&lt;BR /&gt;
	&lt;BR /&gt;
	i just fixed that error by loading a script on my welcome screen camera such as if that scene is loaded again from the last scene after face recognition &amp;nbsp;and the camera from the face recognition is still appearing in my welcome scene where i dont want it then i use a script which destroys that camera which was using the face recognition script and everything now works fine..&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 06:01:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008250#M32915</guid>
      <dc:creator>Akshay_A_</dc:creator>
      <dc:date>2015-04-04T06:01:46Z</dc:date>
    </item>
    <item>
      <title>I'm happy you found a</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008251#M32916</link>
      <description>&lt;P&gt;I'm happy you found a solution. &amp;nbsp;Good luck with the rest of your project, Akshay!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 07:26:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008251#M32916</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2015-04-04T07:26:32Z</dc:date>
    </item>
    <item>
      <title>@marty the only problem i am</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008252#M32917</link>
      <description>&lt;P&gt;@marty the only problem i am facing now is that if i run the application for quite a long time then it suddenly appears to crash..&lt;BR /&gt;
	Dont know why this crash is happening also it happens only a few times not a consistent crash like 2 out of 10 times it crashes..&amp;nbsp;&lt;BR /&gt;
	&lt;BR /&gt;
	So if you can say anything about it , it would be very helpful..&lt;BR /&gt;
	&lt;BR /&gt;
	Thanks...&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 07:44:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008252#M32917</guid>
      <dc:creator>Akshay_A_</dc:creator>
      <dc:date>2015-04-04T07:44:36Z</dc:date>
    </item>
    <item>
      <title>You are not the only person</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008253#M32918</link>
      <description>&lt;P&gt;You are not the only person who has had this problem. &amp;nbsp;Late last year there was a poster on this forum who wanted to make a RealSense app that would run for three days, but after a while performance started to decline.&lt;/P&gt;

&lt;P&gt;I have come across something similar myself. &amp;nbsp;I have had many times where the performance is great at first and then starts to get jerky and more unresponsive. &amp;nbsp;I spent a lot of time making changes to my project because I thought it was something I had done wrong when I made an earlier change to something. &amp;nbsp;It was only recently that I realized that the deterioration happened whether I made changes or not. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Ironically, all those changes I made probably helped me to make better RealSense tech in Unity. &amp;nbsp;:)&lt;/P&gt;

&lt;P&gt;Now what I do is reboot the PC as soon as the project becomes more difficult to control and that fixes the problem and restores smooth movement.&lt;/P&gt;

&lt;P&gt;The symptoms would suggest either that the camera uses up a lot of memory when doing certain applications (I use a lot of simultaneous hand and face tracking and muscle / fat simulation in my game avatar) or there is what is known as a "memory leak" in Unity or the RealSense camera's library files that causes a decline as time passes.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Edit: I just remembered something I read recently about Unity and memory in a game developer's blog. &amp;nbsp;He claimed that once something loads into memory in Unity then it stays there even if you destroy the object unless you use scripting to "unload" it from memory. &amp;nbsp;He recommended using memory management strategies to enhance the performance of Unity projects. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Edit 2: I tracked the article down.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.gamasutra.com/blogs/WendelinReich/20131109/203841/C_Memory_Management_for_Unity_Developers_part_1_of_3.php" target="_blank"&gt;http://www.gamasutra.com/blogs/WendelinReich/20131109/203841/C_Memory_Management_for_Unity_Developers_part_1_of_3.php&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 12:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008253#M32918</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2015-04-04T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Just to state the obvious....</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008254#M32919</link>
      <description>&lt;P&gt;Just to state the obvious....&lt;/P&gt;

&lt;P&gt;Start Task Manager and check the resources used by your application...wait....wait...wait..check the resources used are the same as before.&amp;nbsp; If you are using more memory you have a memory leak.&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 13:08:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008254#M32919</guid>
      <dc:creator>daflippers</dc:creator>
      <dc:date>2015-04-04T13:08:54Z</dc:date>
    </item>
    <item>
      <title>I remember using Task Manager</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008255#M32920</link>
      <description>&lt;P&gt;I remember using Task Manager when developing the particle stream emission systems for my game (which were used to generate a sunset effect and a light halo around the moon). &amp;nbsp;When the particle emitters were running, the game would run okay for a while and then start grinding to a halt. &amp;nbsp;The task manager said that 99% of the CPU's capacity was being used while the particles were running, which was insane. &amp;nbsp;When I disabled the emitters, CPU usage dropped to 5%.&lt;/P&gt;

&lt;P&gt;This was on a 3rd Generation Intel budget CPU. &amp;nbsp;Once I upgraded to an Intel Core i3 4th Gen CPU, I was able to run all the emitters simultaneously with only 3% CPU usage, so the age of chip architecture also seems to be a factor in performance. &amp;nbsp;Although right now, Unity is using 47% of my memory capacity when my game is running even with the Core CPU!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Edit: I did some memory usage tests with my game. &amp;nbsp;I turned off the particle emitters and memory usage fell from 47% to 42%. &amp;nbsp;I turned off the avatar, which uses multiple TrackingAction scripts simultaneously, and usage dropped to 40% (so it seems the camera doesn't put much strain on the memory). &amp;nbsp;Finally, I disabled all the light sources in the game (of which there are probably about 50) and memory dropped to 36%. &amp;nbsp;It remained at 36% even in editor mode when nothing was actively running.&lt;/P&gt;

&lt;P&gt;So even after all the particles and scripts were switched off, there was still something in Unity that was causing a high drain on memory. &amp;nbsp;Definitely something I'll do follow up research on sometime to see what optimizations I can make before the game comes out.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 13:19:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008255#M32920</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2015-04-04T13:19:00Z</dc:date>
    </item>
    <item>
      <title>It sounds like your particle</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008256#M32921</link>
      <description>&lt;P&gt;It sounds like your particle emitter CPU usage benefitted from running on different core(s) to other processes.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;There is a difference between memory use and memory leak.&amp;nbsp; If you have 90% memory use when started and 90% after&amp;nbsp;2 hours then that is ok.&amp;nbsp; If you have 10% memory use&amp;nbsp;when started and 30% after 2 hours you probably have a memory leak and eventually your computer will crash.&lt;/P&gt;

&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 14:14:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008256#M32921</guid>
      <dc:creator>daflippers</dc:creator>
      <dc:date>2015-04-04T14:14:16Z</dc:date>
    </item>
    <item>
      <title>*nods about usage vs leak*</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008257#M32922</link>
      <description>&lt;P&gt;*nods about usage vs leak* &amp;nbsp;This subject is a lot more interesting than you'd think it would be!. &amp;nbsp; / geek&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I did a reboot of my PC and ran Unity again and it started at 27% in editor mode, as opposed to the 36% usage before the reboot. &amp;nbsp;When I ran my app for the first time, usage jumped to 31%, then stayed at that level no matter how many times I re-ran the app and waved my hands in front of the camera during the next few minutes (not enough time for a leak to show up). &amp;nbsp;Which would give credence to the memory blogger's claim that once Unity loads something into memory (like when an app is run), it stays there.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Oh, the memory usage has gone up from 31% to 35% in the 10 minutes I was sitting here writing this without being in the Unity window. &amp;nbsp;:)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Anyway, like I said, it's a topic I'll definitely take another look at one day, especially as I still have a lot to add to my app yet and so it'll become increasingly important to manage memory well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 14:36:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008257#M32922</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2015-04-04T14:36:59Z</dc:date>
    </item>
    <item>
      <title>That's a very good test Marty</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008258#M32923</link>
      <description>&lt;P&gt;That's a very good test Marty. It also depends on your processor, RAM and other applications running on your system.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 16:32:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008258#M32923</guid>
      <dc:creator>Vidyasagar_MSC</dc:creator>
      <dc:date>2015-04-04T16:32:05Z</dc:date>
    </item>
    <item>
      <title>@Marty @daflippers Thanks</title>
      <link>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008259#M32924</link>
      <description>&lt;P&gt;@Marty @daflippers Thanks both of you for your suggestions...&lt;BR /&gt;
	&lt;BR /&gt;
	Would definitely check the memory issue...and post my result regarding it..&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 19:18:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/R6025-pure-virtual-function-call-Unity-crashes/m-p/1008259#M32924</guid>
      <dc:creator>Akshay_A_</dc:creator>
      <dc:date>2015-04-04T19:18:19Z</dc:date>
    </item>
  </channel>
</rss>

