Frontier DLL Programming: what does "Internal Error: too many
pophashtables" mean?
Steven Manschot
steven at manschot.net
Fri Jan 18 07:25:47 PST 2002
Hi,
As the subject says:
What does "Internal Error: too many pophashtables" mean?
For your info here's the source that let it happen, I write an ImageMagick
Image object back to the ODB.
//*****************************************************************************
//
//writeImageToODB
//
void writeImageToODB(Image& image, char* path, XDLLProcTable * proctable) {
std::string funcname("writeImageToODB");
Handle hImg = NULL;;
try {
Blob blob;
image.write(&blob);
odbRef odb;
FU_OK( odb=(*(proctable->xOdbGetCurrentRoot)) (), "xOdbGetCurrentRoot" );
FU_OK( hImg = (*(proctable->xMemAlloc)) (blob.length()+4), "xMemAlloc");
char* data = NULL;
FU_OK(data = (char *) (*(proctable->xMemLock)) (hImg), "xMemLock");
memcpy(data+4,blob.data(),blob.length());
if(image.magick().compare("JPEG") == 0) { strncpy(data,"jpg ",4); } else {
if(image.magick().compare("GIF") == 0) { strncpy(data,"gif ",4); } else {
throw("unknown type");
}
}
(*(proctable->xMemUnlock)) (hImg);
odbValueRecord value;
value.data.binaryvalue = hImg;
value.valuetype = odb_binaryvaluetype;
FU_OK( (*(proctable->xOdbSetValue)) (odb, (unsigned char*)CtoPstr(path),
&value), "xOdbSetValue");
}
catch( Magick::Exception &error ) {
if(hImg) (*(proctable->xMemFree)) (hImg);
throw (funcname + "::" + error.what());
}
catch( std::string &msg ) {
if(hImg) (*(proctable->xMemFree)) (hImg);
throw(msg);
}
}
Steven Manschot.
More information about the Frontier-Users
mailing list