When rendering deepshadows in network mode, if there's transparent object, the deepshadow file isn't valid and crash Pixie, this can be resolved by adding:
"fseek(tsmFile,curPos,SEEK_SET);" at the end of the function CRemoteTSMChannel::sendRemoteBucket(...).
----
int CRemoteTSMChannel::sendRemoteBucket(SOCKET s,int x,int y) {
// record current position, seek back to tile start
uint64_t curPos = ftell(tsmFile);
fseek(tsmFile,lastPosition,SEEK_SET);
uint64_t sz = curPos - lastPosition;
rcSend(s,&sz,sizeof(uint64_t));
// send the tile data
char buf[NETWORK_BUFFER_LENGTH];
while(sz > 0){
int nn = (int) ((sz>(NETWORK_BUFFER_LENGTH)) ? (NETWORK_BUFFER_LENGTH) : sz);
fread(buf,nn,1,tsmFile);
rcSend(s,buf,nn,FALSE);
sz -= nn;
}
uint64_t newPos = ftell(tsmFile);
if(newPos != curPos) {
fseek(tsmFile,(long) curPos,SEEK_SET);
error(CODE_BUG,"Error reading tsm file.\n");
}
lastPosition = (long) curPos;
fseek(tsmFile,curPos,SEEK_SET);
return TRUE;
}
Logged In: NO
Cedric PAILLE.
Logged In: NO
I understand that it's weird, because the current position is equal to the new position, but it really crash on windows if not set again, not tested on Unix.
Cheers.
Logged In: YES
user_id=555300
Originator: NO
I added this fix into the trunk. This is really weird.
Cedric, again, I would appreciate you giving the SVN trunk a try to make sure the TSM rendering in networked mode words now.
Thank you,
Okan
Logged In: YES
user_id=954786
Originator: NO
Okan,
I gived a try to the SVN, and it works, but I always have issues with white spaces in pathes (see post in the forum "Crash on windows when net-rendering" (help section)) and the error handler at netSetup function (in the post too, it crashes on WIN32 & LINUX).
Best regards.