MapiMessage.ToMailMessage is crashing the process

Hi , I just added a PST support for my app.
I encounter a crash while run MapiMessage.ToMailMessage , there is a throw there from Debug.Assert , so even try…catch not helping here.

There is a chance to release a version that not include Debug.Assert in the code ?
This is the error I’m getting:

Process terminated. Assertion failed.
TnefPropertyType.TypeError
   at ???..ctor(BinaryReader , Boolean )
   at ???.(Byte[] , Boolean )
   at Aspose.Email.Mapi.MapiCalendarAttendees..ctor(MapiMessageItemBase )
   at Aspose.Email.Mapi.MapiCalendar..ctor(MapiMessageItemBase , Boolean )
   at Aspose.Email.Mapi.MapiCalendar..ctor(MapiMessage )
   at Aspose.Email.Mapi.MapiMessage.ToMapiMessageItem()
   at ???.?????(MapiMessage )
   at Aspose.Email.Mapi.MapiMessage.ToMailMessage(MailConversionOptions options)
   at Gofer.PST.Process.PSTSourceItemProjector.Project(IProjectorSession session, PSTSourceItem entity) in D:\a\1\s\Plugins\Gofer.PST\Process\PSTSourceItemProjector.cs:line 36

Thanks

@Gofer,

I have observed the issue shared by you and request you to please share the source file and used sample project reproducing the issue. I am assuming that you are using Aspose.Email for .NET 20.1 on your end.

I’m using Aspose.Email 19.12.0 , this is the last published release on nuget.org. (all other aspose products are 20.1…)

My code is pretty simple , I extractMessage from the PersonalStorage (pst file) and then try to convert the returned MapiMessage into MailMessage , then it fails.
It not happens all the time , not even on my environments.
But happens to a user in production , something in his data is unique and get into edge case that uses Debug.Assert.

The code is something like that:

var storage = PersonalStorage.FromFile(("<file_path>"));
var mapiMessage = storage.ExtractMessage(entryId);
var mailMessage = mapiMessage.ToMailMessage(new MailConversionOptions());

@Gofer,

I have observed the issue shared by you and request you to please share the working sample project along with source file reproducing the issue. Please also share the environment details of production server where things failed and environment details where things work.

This happens only on specific data on the client machine , I can’t rep this , I don’t have the data.

But my code or machine has nothing related to the problem.

The Aspose.Email package contains a Debug.Assert , which is not normal behavior in production published packages.
A developer (like me) cannot handle this type of assertion and it crashes my environment.

It’s like releasing a car with a bomb inside of it. no matter how rare the case , Debug.Assert should never be called in production.

Could you please consult with the devs to this issue?

Thank you!

@Gofer,

I have observed your comments and understand them. I have created an issue with ID EMAILNET-39714 as investigation to further investigate the reported issue and will share feedback with you as soon as it will be fixed.

Hi @mudassir.fayyaz ,

Thank you for creating the issue.
This creates a HUGE problem for us and our users, because it crashes the whole application(!)
Could we get an estimation for when this will be fixed? It is supposed to be a very simple fix, and every day that passes is critical for us.

Thank you!

@Gofer,

We request for your patience as the issue is under investigation. We will share the good news with you as soon as it will addressed.

Hello,

I see " EMAILNET-39714 ---- Status : Resolved".
Does this mean you resolved the issue? If so, where can we find the fix?

It’s been 2 weeks since we opened this issue. It is a CRITICAL issue, making our application crash, and hurting our business.
You should be able to release a fix very easily - simply build the library with the default/standard build option to remove all asserts (which shouldn’t be included in production code).

Thank you, and we would really appreciate to get an update.

@Gofer,

I have verified from our issue tracking system and like to share that issue has been marked as resolved in upcoming Aspose.Email for .NET 20.2. We request for your patience till the time the product will be shared online during this month. We will share release notification with you as well in this regard.

1 Like

Hi @mudassir.fayyaz,

Thank you for resolving the issue in Aspose.Email for .NET 20.2.

We see that other Aspose libraries have already shipped version 20.2, and would appreciate to understand when Aspose.Email for .NET 20.2 will be shipped? (as you know our clients’ systems are crashing because of this issue :slight_smile:

Thank you for your help!

@Gofer,

We request for your patience. Generally we have some some APIs getting released during first half of month and some getting by end of month. We will be sharing the product online anyways during February and will share notification with you too.

The issues you have found earlier (filed as EMAILNET-39714) have been fixed in this update.