Simon.Anderson Posted September 3, 2015 Share Posted September 3, 2015 Hi, Does anyone know why the following bit of code might be crashing on the last line? Am I using the Image class correctly here? Image alpha = new Image();alpha.create2D(m_coarseDiffuseAlpha.getWidth(),m_coarseDiffuseAlpha.getHeight(), IMAGE_FORMAT_R8);alpha.copy(m_coarseDiffuseAlpha);alpha.resize(newDiffuse.getWidth(),newDiffuse.getHeight()); // CRASHING HERE ON COPY() newDiffuse.copy(alpha, 3, 0); Not sure why this might be happening. I suspect I'm trashing memory elsewhere in the code but not sure where. Thanks, Simon Link to comment
silent Posted September 3, 2015 Share Posted September 3, 2015 Hi Simon, Could you please provide a minimal test sample that caused crash? If I remember correctly, you are still using 2013 SDK? Thanks! 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
Simon.Anderson Posted September 3, 2015 Author Share Posted September 3, 2015 yes I am (2013) - and sorry, it's tied into a lot of code. It's hard to separate out as it is tightly coupled to thousands of lines of code. Just to be clear - this code only crashes when unigine is in the middle of loading and our user interface and assets are all being initialised. This code gets called again once everything is up and running (say, 1min after initialisation). And it works fine. Not sure what's going on here. Link to comment
ulf.schroeter Posted September 3, 2015 Share Posted September 3, 2015 I think you should better update to 2.0 SDK version.... Link to comment
Simon.Anderson Posted September 4, 2015 Author Share Posted September 4, 2015 I know, I know - upgrading 50,000 lines of code is something I have to justify with management unfortunately :( However, I think I have tracked down the issue - and the problem seems to be in unigine: This crashes with channel targets: newDiffuse.copy(alpha, 3, 0); This doesn't (no channel targets): newDiffuse.copy(alpha) Is there So, either some initialisation has to be done at the channel level, or it's a bug in unigine. Any ideas? Link to comment
silent Posted September 4, 2015 Share Posted September 4, 2015 Hi Simon, I'm afraid a small sample is still required to get at least the stable reproduction on our side. There are so many things that can affect on script behavior, especially with textures copying that uses very large memory chunks. 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