EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Troubleshooting MMF Initialization

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#10682
Posted: 07/28/2009 11:50:05
by Tim Sullivan (Standard support level)
Joined: 06/25/2008
Posts: 26

Hi Eugene,
I was able to modify the MCMMF.cpp SetActive code, as you suggested.
Our try catch block now catches the MsgConnect exception with error code: 103

Based on a quick look, this error is thrown in the MCMMFReceiverThread::Initialize method, around line 959.

Please let me know if you need more information.
Thanks.
#10685
Posted: 07/28/2009 12:05:37
by Eugene Mayevski (EldoS Corp.)

(I am away from the development computer now so I will be able to check the code only tomorrow)

Now you need to check what exactly causes the failure. If it's a call to some OS function, you can modify the code to call GetLastError() or (if it's called) pass the error code via exception in some way in order to get the actual error.


Sincerely yours
Eugene Mayevski
#10686
Posted: 07/28/2009 15:03:26
by Tim Sullivan (Standard support level)
Joined: 06/25/2008
Posts: 26

Hi Eugene,
I added a quick log file write snippet into the MCMMFReceiverThread::Initialize method:
Code
   if((FMMFFreeMutex && (i == ERROR_ALREADY_EXISTS)) || (!FMMFFreeMutex && (i != 0)))
   {
      char fPath[MAX_PATH];
      sprintf_s(fPath, MAX_PATH, "C:\\windows\\activePDF\\Logs\\MMF.log", Owner->getMessengerName(), GetTickCount());
      FILE* fPtr = fopen(fPath, "a");
      fprintf(fPtr, "Last Error: %d", i);
      fclose(fPtr); //AMS 7/28/2009
        THROW_ERROR(MCError_MutexCreationFailed);
   }

Where i is the result of your existing call to GetLastError().
When we encounter the MMF initialization problem, the error code written to our log is 183, ERROR_ALREADY_EXISTS. I assume this means that the mutex already exists.

In addition to this information, I did want to give you some more info on how we're running our tests to reproduce this issue:
Classic asp page calls our COM object 10 times.
If only one window is open to the page, then all 10 calls succeed w/o any problems.
As soon as more than one window access the asp page at the same time, one of the windows (usually the first) reports our error code indicating that MMF initialization failed.

Please let me know if you need anymore information.
#10695
Posted: 07/29/2009 13:28:35
by Tim Sullivan (Standard support level)
Joined: 06/25/2008
Posts: 26

Hi Eugene,
I wanted to let you know that we found the problem.
Our class that uses MsgConnect contained a static variable that was causing all the problems.

Thanks for all your help.
#10696
Posted: 07/29/2009 15:02:50
by Eugene Mayevski (EldoS Corp.)

Thank you for letting me know.


Sincerely yours
Eugene Mayevski
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 11507 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!