Jump to content

Image crash on copy


photo

Recommended Posts

Posted

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

Posted

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.

Posted

I think you should better update to 2.0 SDK version....

Posted

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?

Posted

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:

×
×
  • Create New...