Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Recent upgrade from MediaBin 4.5.2 to 4.5.3 is throwing errors in custom code
System
Hi,
We have a web page which incorporates code to query MediaBin for an asset. This used to work fine in MediaBin 4.5.2 however, since we’ve upgraded a few days ago it’s having issues. Oddly enough, this works fine on some machine but, not on others and seems intermittent.
It seems random and only some users are affected by it more than others. We have one user while she is on a specific machine receives this error consistently. If she tries on a different machine, it will work. However, it’s not just her as an isolated instance. We have other users that report exactly the same error and behavior, including myself.
For myself, I could not reproduce the error but, this morning I rec’d the error. I closed the IE7 window and reopened it to get the same error. I rebooted my machine and still got the error. Later, I was showing another developer in my team, I did it again, and it worked. Weird.
This is the error:
MBException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
-or-
MBException: Writing data to the server failed. You may have lost the connection to the MediaBin Server. If this message persists, log-off and attempt to reconnect to the server, or contact your system administrator. (0x8004041E)
Here is the source code and your help is greatly appreciated.
protected Boolean SaveMediaBinValues() // This is the main procedure //
{
const String META_DATA_NAME = "{B297C571-F083-11D4-8200-0060080D8AC2}";
// all my code (blaa blaa blaa) //
try
{
// Build search constraint //
MBSearchConstraint[] mbSearchConstraints = new MBSearchConstraint[1];
mbSearchConstraints[0] = SaveMediaBinValues_AddConstraint(META_DATA_NAME, mediaRefIDHexString, "Contains", "And");
// more of my code (blaa blaa blaa) //
}
private MBSearchConstraint SaveMediaBinValues_AddConstraint(String newSearchMetaDataID, String newSearchValue, String newSearchOperator, String newSearchJoin)
//==============================================================================
// Purpose : Create a new search constraint for MediaBin SearchCriteria
//
// Notes : If the GetMetadata() fails, error will be thrown upwards
//
// History :
//------------------------------------------------------------------------------
// Date Developer Description
//------------------------------------------------------------------------------
// 2006-10-24 stacyhan Initial Creation
// Notes: 1) None
//==============================================================================
{
try
{
MBSearchConstraint mbSearchConstraint = new MBSearchConstraint();
mbSearchConstraint.mMetadata = _mediaBinServer.GetMetadata(newSearchMetaDataID);
mbSearchConstraint.mMetadata.mValue = newSearchValue;
mbSearchConstraint.mSearchOperator = newSearchOperator;
switch (newSearchJoin)
{
case "And":
mbSearchConstraint.mBooleanOperator = MBBooleanOperator.AND;
break;
case "Or":
mbSearchConstraint.mBooleanOperator = MBBooleanOperator.OR;
break;
default:
mbSearchConstraint.mBooleanOperator = MBBooleanOperator.NotSet;
break;
}
return mbSearchConstraint;
}
catch (Exception exception)
{
{
MessageBoxDisplay.Show("An unexpected error occurred while building the search constraints for search criteria " + newSearchMetaDataID + "=" + newSearchValue + ".\n\n" + exception.Message, MessageBoxDisplayType.Error);
}
}
// Nothing as fall-through //
return null;
}
Find more posts tagged with
Comments
There are no comments yet