We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Crash of the application after rendering html


I created an application to convert docx to html (main reason of me buying Aspose Word).
After a while I change my windows service and since that the application is crashing on this line of code (The service is stopping no exception has been thrown!).

I checked everything

In the event viewer:

.Net runtime:
Application: XXXXX.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean ByRef)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef)
at Microsoft.Win32.Win32Native.SetEvent(Microsoft.Win32.SafeHandles.SafeWaitHandle)
at System.Threading.EventWaitHandle.Set()
at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Application error:
Faulting application name: XXXXX.exe, version:, time stamp: 0x55f6f84b
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17415, time stamp: 0x54504ade
Exception code: 0xe0434352
Fault offset: 0x00014598
Faulting process id: 0x69c
Faulting application start time: 0x01d0ef8c2b0fe823
Faulting application path: C:\Services\XXXXX.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: a71c7daf-5b7f-11e5-80d2-005056aeb79b
Faulting package full name:
Faulting package-relative application ID:

  • Visual studio 2015 Enterprise
  • C# 6
  • .Net Framework 4.5
  • Aspose.Words

The code:
Stream stream = new MemoryStream(File.ReadAllBytes(“xxxxxxx”));
var doc = new Document(stream);
return doc.ToString(SaveFormat.Html); // Bug here

I am kind of stuck and this is quite urgent actually.


.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas, "Courier New", Courier, Monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #a31515; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

Hi Lenny,

As discussed on live support replacing 15.8.1 with 15.8.0 resolves this issue. Please let us know if you see any other issue.

Best Regards,