Paul.Brodin Posted July 3, 2015 Share Posted July 3, 2015 Iam really really struggling with migrating the work we had done on the v2 Beta to the v2 RC in c# Iam suffering with random crashs, with memory violation errors, as soon as anything is added to the node collection not necessarily as soon as entities are added, but within 10-20 seconds, just moving about the world and then a crash. in an attempt to address this ive moved from visual studio 2012 to 2013 - no difference started a new project off in the SDK browser started with a bklank world wiuth no nodes. even started migration code from old project to new project. created within the browser iam encountering errors very early on - just adding a terrain and applying setSurfaceDiffuseTextureName it looks good, then after a few seconds of spinning the world round there is memory crash i am really at a loss, having spent at least 2 days getting nowhere, i dont know what to try next Link to comment
silent Posted July 3, 2015 Share Posted July 3, 2015 Hi Paul, Could you please provide a small example project that worked corretly in beta2 and stopped working in RC version? This will sure will help us to get to the root of this issue faster. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Paul.Brodin Posted July 3, 2015 Author Share Posted July 3, 2015 This is a zip of the project with just a couple of functions being executed. one to load in a terrain and one to apply some image to it ive stripped everything i can out of the code it can appear work fine, but 30 seconds of spinning the terrain around, and then, what tends to happen is the terrain stops rendering, and 10seconds later you get the crash of course it may be to do with the data - but thats quite large - it would be great if you can spot an error in how entities are being created / added, just from the code source.zip DelMe1.cpp Link to comment
Paul.Brodin Posted July 4, 2015 Author Share Posted July 4, 2015 Do you want me to post the terrain and images that i was using with this project? Link to comment
silent Posted July 4, 2015 Share Posted July 4, 2015 Hi Paul, If it is possible we need to check the whole project. Unfortunately, with attached scene it is not possible, because a lot of files are missing (there is also no build instuctions included). Could you please send us a scene that can we can build on our test environment with all required files (sources and assets)?You can send me a PM via this link if your project contains some NDA data that could not be published. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Paul.Brodin Posted July 8, 2015 Author Share Posted July 8, 2015 Ive zipped and uploaded the project here m.k-matic.com/temp/DelMe1.zip you can load the solution in VS 2013 and run in the IDE, the environment will load, the terrain object is added and the images applied to the terrain, all OK click 'N'ode and zoom over the MainTerrain - still OK BUT - when you spin the world (and fly 'through' it) for a few minutes it crashes with attached error Link to comment
necris Posted July 9, 2015 Share Posted July 9, 2015 Hi Paul,Thank you for the test scene.The issue is caused by broken object instances ownership in our C# API. "Release" function doesn't work properly.I've reproduced this issue and added it to our internal bug tracker. We'll try to fix it soon.As a possible workaround you can: Initialize static variable "myTer" and use itor Rewrite "LoadTerrain" function in UnigineScript and call it for C# when necessary Link to comment
Paul.Brodin Posted July 12, 2015 Author Share Posted July 12, 2015 Hi, thanks for the reply - its good to atleast know i wasnt going completely mad. I can try some of your suggestions, but weve got 6months worth of code, thats going to take some rewriting, do you know when there will be a fix for this - happy to try out anything ' unreleased' ive already lost atleast a couple of weeks on this. can you confirm exactly which piece of code is causing the issue - is it the creation of a new object / (or the garbabge collection when that 'new' object is destroyed) or will a search and assignment of an exisiting node to a object for manipulation cause equal problems? A lot of our code is searching for existing nodes and manipulating their visibility / location Thanks Paul Link to comment
silent Posted July 13, 2015 Share Posted July 13, 2015 Hi Paul, We are still ivestigating this issue. Some useful advices we can provide you a little bit later (probably, in couple of days). Sorry for the inconvenience caused. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted July 15, 2015 Share Posted July 15, 2015 Hi Paul, We've found the reason of this behavior. After the terrain creation in loadTerrain() function you need to call myTer.release() method to pass the object instance ownership to the Editor (after you leave the loadTerrain() method). Unfortunately, due to the bug in C# API release() method was missed. You can download fixed UnigineSharp and UnigineWrapper dlls from this link: https://drive.unigine.com/f/e16c900c8c/(Float precision only). In attachment you can also find fixed DelMe1.cs file. Sorry for the inconvenience caused. DelMe1.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts