when rendering dispersion example, pixie always cashed with stack overflow. I had tried all version after 2.0,but all is the same. So I had to debug it, and find it crashed in following function:
void CPhotonMap::lookup(float *Cl,const float *Pl,int maxFound) {
maxFound is a huge number, then memory overflowed in :
const CPhoton **indices = (const CPhoton **) alloca((maxFound+1)*sizeof(CPhoton *));
after a long time debuging (because a lots of macros) , I found bug is in this declare:
struct {
int estimator; } photonmapParams;
estimator is integer ,but number read from shader is float, and then memcpy to this integer.
after changed int to float,all is OK.
But I'm not sure about this correction, because nobody report this bug online.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks Okan ,this bug is fixed.
but I found another bug in texmake.cpp.
from line 424:
for (i=0;i<newHeight*newHeight;i++) {
normalizer_ = 0;
filteredData = 0;
}
for (;i<newHeight*newHeight*numSamples;i++) {
filteredData = 0;
}
should be:
for (i=0;i<newHeight*newWidth;i++) {
normalizer = 0;
filteredData = 0;
}
for (;i<newHeight*newWidth*numSamples;i++) {
filteredData = 0;
}
this bug can make some texture incorrect_
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
when rendering dispersion example, pixie always cashed with stack overflow. I had tried all version after 2.0,but all is the same. So I had to debug it, and find it crashed in following function:
void CPhotonMap::lookup(float *Cl,const float *Pl,int maxFound) {
maxFound is a huge number, then memory overflowed in :
const CPhoton **indices = (const CPhoton **) alloca((maxFound+1)*sizeof(CPhoton *));
after a long time debuging (because a lots of macros) , I found bug is in this declare:
struct {
int estimator; } photonmapParams;
estimator is integer ,but number read from shader is float, and then memcpy to this integer.
after changed int to float,all is OK.
But I'm not sure about this correction, because nobody report this bug online.
Hi Jerry,
This problem is resolved in the SVN. Can you verify that you do not have this crash anymore?
Thank you,
Okan
thanks Okan ,this bug is fixed.
but I found another bug in texmake.cpp.
from line 424:
for (i=0;i<newHeight*newHeight;i++) {
normalizer_ = 0;
filteredData = 0;
}
for (;i<newHeight*newHeight*numSamples;i++) {
filteredData = 0;
}
should be:
for (i=0;i<newHeight*newWidth;i++) {
normalizer = 0;
filteredData = 0;
}
for (;i<newHeight*newWidth*numSamples;i++) {
filteredData = 0;
}
this bug can make some texture incorrect_