Author |
|
SimoNW Newbie
Joined: 08 August 2014 Location: New Zealand
Online Status: Offline Posts: 5
|
Posted: 09 August 2014 at 12:04am | IP Logged
|
|
|
Hello,
I have just downloaded Mailbee.Net Objects and am testing to see if the library is threadsafe. I require a component to be able to parse and extract the contents of a PST file, while being thread safe.
In my particular test, I am attempting to extract the contents of multiple different PST files. The code is simple, open the PST, count the folders and files, doing so over multiple files using the native Parallel library. Snippets are included below.
App is c#, .Net 4.5, x64. In my tests I am trying to process 9 x PST files.
The application will run correctly once every 4 or 5 attempts (at random). The exception that is generated:
"Argument value is invalid. InnerException message follows: Item has already been added. Key in dictionary: '' Key being added: '32892'"}
Do you know if your Mailbee.Net Objects code is thread safe, or am I doing something "stoopid"? (That being said, my code works fine with competing products that I am testing in the same manner)
I appreciate your time in reply.
regards
Code:
// Where fileNames is a list of PST filenames
Parallel.ForEach(fileNames, new ParallelOptions { MaxDegreeOfParallelism = 10 },
filename => ProcessFileMailBee(filename));
//The ProcessFileMailBee method:
MailBee.Global.LicenseKey = "MN800-27EFEFBEEF3AEF2FEFAB3A33FB35-B314";
PstReader pstRead = new PstReader(@filename);
PstFolderCollection folders = pstRead.GetPstRootFolders(true);
int totalItems = 0;
foreach (PstFolder folder in folders)
{
totalItems += folder.Items.Count;
}
|
|
|
|
Back to Top |
|
|
SimoNW Newbie
Joined: 08 August 2014 Location: New Zealand
Online Status: Offline Posts: 5
|
Posted: 10 August 2014 at 2:59pm | IP Logged
|
|
|
Just a quick follow-up.
I've found this is only an issue when I re-run (debugger attached) the application twice from within Visual Studio. If I close VS and reopen the solution, it runs correctly.
I'm closing the PstReader object, but there is no dispose to call.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 11 August 2014 at 12:33am | IP Logged
|
|
|
Thanks, I've asked the developers to look into this. Will let you know once there's a response; due to the vacation season, it might take a while.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 11 August 2014 at 12:48am | IP Logged
|
|
|
Actually, I've just heard from the developers on this. They've asked if you can provide sample file(s) the issue can be reproduced with. You can send us files in private using HelpDesk.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
SimoNW Newbie
Joined: 08 August 2014 Location: New Zealand
Online Status: Offline Posts: 5
|
Posted: 12 August 2014 at 9:48pm | IP Logged
|
|
|
Thanks for your response. Do you want my c# project, or the PST files, or both?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 13 August 2014 at 12:11am | IP Logged
|
|
|
The entire project with the sample file would be great. The project should be as simple as possible, with no external dependencies and so on. If the PST is big, you can send us the link to the archive (rather than the archive itself) in your HelpDesk inquiry. Thanks!
Regards,
Alex
|
Back to Top |
|
|
SimoNW Newbie
Joined: 08 August 2014 Location: New Zealand
Online Status: Offline Posts: 5
|
Posted: 24 August 2014 at 7:43pm | IP Logged
|
|
|
Hello.
Have the dev's had any luck with this issue?
Cheers.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 25 August 2014 at 2:11am | IP Logged
|
|
|
Sorry, we were having troubles getting Enron files, the download links never reached as. After trying a few email providers, it did work, and I hope there will be a response soon.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
SimoNW Newbie
Joined: 08 August 2014 Location: New Zealand
Online Status: Offline Posts: 5
|
Posted: 25 August 2014 at 7:01pm | IP Logged
|
|
|
Thanks Igor. Your prompt updates are appreciated.
If the developers could advise you/me if they can reproduce the problem and if there might be a fix available. I don't mind waiting for a answer, but if I could get an indication of timeframes that would be appreciated.
Many thanks.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 26 August 2014 at 4:42am | IP Logged
|
|
|
PST, as well as MSG, is rather complex format, so investigating and troubleshooting this might take a while and it's hardly possible to provide ETA - but there's a good chance we'll have news early next week.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|