Aspose.Words .NET with Mono corruption message?

Compiling using:
gmcs test.cs /r:System.Windows.Forms.dll /r:Aspose.Words.dll
Running as:
mono test.exe

I have also just tested on a Gentoo distribution of Linux, running Mono 1.9.1, and encountered another error message, if this helps at all. Am I not installing Mono correctly?
Loading.

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for ?.? ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
`  `at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
`  `at System.Drawing.GDIPlus..cctor () [0x00000] --- End of inner exception stack trace ---

`  `at System.Drawing.KnownColors..cctor () [0x00000] --- End of inner exception stack trace ---

`  `at System.Drawing.Color.get_White () [0x00000] 
`  `at ?.?..cctor () [0x00000] --- End of inner exception stack trace ---

`  `at Aspose.Words.Drawing.ShapeBase..ctor (Aspose.Words.Document doc) [0x00000] 
`  `at Aspose.Words.Drawing.Shape..ctor (Aspose.Words.Document doc) [0x00000] 
`  `at ?.?.? (?.? ?) [0x00000] 
`  `at ?.?.? (?.? ?) [0x00000] 
`  `at ?.?.? (System.IO.BinaryReader ?, Int32 ?, Int32 ?, System.IO.BinaryReader ?) [0x00000] 
`  `at ?.?.? () [0x00000] 
`  `at Aspose.Words.Document.? (System.IO.Stream ?, LoadFormat ?, System.String ?) [0x00000] 
`  `at Aspose.Words.Document..ctor (System.String fileName, LoadFormat loadFormat, System.String password) [0x00000] 
`  `at Aspose.Words.Document..ctor (System.String fileName) [0x00000] 
`  `at Hello.Main () [0x00000]

Hi,
Sorry to keep throwing error messages at you!
The previous Linux error message can be ignored, I hadn’t installed Mono correctly and libgdiplus was missing. However, upon fixing that I get the same error message as I do on Mac OS X:

Unhandled Exception: Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. ---> System.ArgumentException: Comparer threw an exception.
`  `at System.Collections.ArrayList.BinarySearch (System.Object value) [0x00000] 
`  `at ?.?.? (Int32 ?) [0x00000] 
`  `at ?.?.? (Int32 ?) [0x00000] 
`  `at ?.?.? () [0x00000] 
`  `at ?.?.? () [0x00000] 
`  `at Aspose.Words.Document.? (System.IO.Stream ?, LoadFormat ?, System.String ?) [0x00000] --- End of inner exception stack trace ---

`  `at Aspose.Words.Document.? (System.Exception ?) [0x00000] 
`  `at Aspose.Words.Document.? (System.IO.Stream ?, LoadFormat ?, System.String ?) [0x00000] 
`  `at Aspose.Words.Document..ctor (System.String fileName, LoadFormat loadFormat, System.String password) [0x00000] 
`  `at Aspose.Words.Document..ctor (System.String fileName) [0x00000] 
`  `at Hello.Main () [0x00000] 

/Mark

Hi,

Found a solution to the problem: use mcs and the net1.1 libraries instead of gmcs and net2.0. Works perfectly!

Are there any disadvantages to using the 1.1 libraries over the 2.0 ones?

Regards,
Mark.

Hi
It is nice that you already found solution. No there is no functionality differences between 1.1 and 2.0 versions of library.
Best regards.

I got the same problem. Using mono net-1.1 is no solution for me as my visitor depends on net-2.0.

Is there any new information on that topic?

Hi
Thanks for your inquiry. Which versions of mono and Aspose.Words are you using? Please provide me more information about your environment. I will try to reproduce the problem and provide you more information.
Best regards.

I can reproduce that problem on a linux server machine:

Linux host 2.6.16-xen #2 SMP Sun Jul 9 15:43:58 CEST 2006 i686 GNU/Linux

Mono JIT compiler version 1.9.1 (tarball)

Copyright © 2002-2007 Novell, Inc and Contributors. www.mono-project.com

TLS: __thread

GC: Included Boehm (with typed GC)

SIGSEGV: altstack

Notifications: epoll

Architecture: x86

Disabled: none

And on my MacBook:

Darwin Ernst 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386

Mono JIT compiler version 2.0.1 (tarball)

Copyright © 2002-2008 Novell, Inc and Contributors. www.mono-project.com

TLS: normal

GC: Included Boehm (with typed GC)

SIGSEGV: normal

Notification: Thread + polling

Architecture: x86

Disabled: none

Exception:

Unhandled Exception: Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. —> System.ArgumentException: Comparer threw an exception.

at System.Collections.ArrayList.BinarySearch (System.Object value) [0x00000]

at ᧦.᧍.᳥ (Int32 ᦯) [0x00000]

at ᦡ.ᦠ.᦮ (Int32 ᦯) [0x00000]

at ᦡ.ⅿ.ஷ () [0x00000]

at ᦡ.ᦠ.ࠆ () [0x00000]

at Aspose.Words.Document.ࠛ (System.IO.Stream َ, LoadFormat ೡ, System.String ح) [0x00000] — End of inner exception stack trace —

at Aspose.Words.Document.ೢ (System.Exception ೣ) [0x00000]

at Aspose.Words.Document.ࠛ (System.IO.Stream َ, LoadFormat ೡ, System.String ح) [0x00000]

at Aspose.Words.Document…ctor (System.String fileName, LoadFormat loadFormat, System.String password) [0x00000]

at Aspose.Words.Document…ctor (System.String fileName) [0x00000]

(And I use the latest version of Aspose.Words)

Hi
Thank you for more information. We will investigate the problem and provide you more information.
Best regards.

Hi

i have got the same problem like Wanderer!
Would love to hear any news about this problem!

thank you
J.

Hi
Thanks for your inquiry. I managed to reproduce the problem on my side. We will investigate the issue further and provide you more information.
NOTE: Aspose.Words .NET1.1 assembly works fine with mcs compiler.
Best regards.

I’m glad we’re not the only ones having this problem. Everything works fine on Windows by the way. As I already stated I can’t use net-1.1 as the application relies on some net2.2 assemblies.

Thank you

Hi
Thanks for your request. We will try to fix this problem before next release. Next release is planed on next Monday (24th of November).
Best regards.

Still got the same problem using Aspose.Words 6.0.0. Are you able to reproduce the problem? Do you need more details?

Hi
Thanks for your request. Unfortunately this issue is not fixed yet. I am able to reproduce the problem on Ubuntu Linux. I created issue #6629 in our defect database.
Best regards.

Anything new on that topic? When is the problem expected to be solved?
We’re currently using Windows instance as workaround for development but don’t want to use it in production.

Thanks

Hi
Unfortunately the issue is still unresolved. Aspose.Words releases are published every 3-4 weeks. Hopefully the problem will be fixed in the next version.
Best regards.

I fixed the problem that was causing the exception. It was related to a difference in the way Array.BinarySearch uses IComparable in MONO vs .NET.
I have few more tests on MONO and was satisfied, but we do not yet routinely run all Aspose.Words tests on MONO.
Since we just had a release a day ago I don’t want to make another release today, I am attaching a special build just for you in this forum that has the exception on MONO resolved.
Let us know if you come across any other issues we will try to resolve them asap. We do not yet have a dedicated project to support Aspose.Words on MONO, only casual tests and your help testing is much appreciated.

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