Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Apr 06, 2017 11:02 am

Hi,

I'm trying out Spire.Doc v5.8.76.4040 (aquired by NuGet) in .NET 4.6.1 to create thumbnail for the first page of the document.
Most cases this works alright, but some documents fails due to "Unable to sort because the IComparer.Compare()"

ComparerTest.zip


Stack Trace:
at System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(Object comparer)
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)
at spr―.ᜀ(List`1 A_0, sprᨲ A_1, Boolean A_2)
at spr―.ᜂ(sprᨲ A_0)
at sprᫀ.ᜀ(Int32 A_0, Int32 A_1, ImageType A_2, MemoryStream A_3, Boolean A_4, Boolean A_5, Boolean A_6)
at sprᫀ.ᜀ(Int32 A_0, Int32 A_1, ImageType A_2, MemoryStream A_3, Boolean A_4)
at spr⃽.ᜀ(Int32 A_0, Int32 A_1, Document A_2, ImageType A_3)
at Spire.Doc.Document.SaveToImages(Int32 pageIndex, ImageType type)
Result Message:
System.ArgumentException: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Collections.Generic.ObjectComparer`1[spr♣]'.

jonass
 
Posts: 1
Joined: Thu Apr 06, 2017 10:21 am

Fri Apr 07, 2017 7:09 am

Dear jonass,

Thanks for your inquiry.
I have reproduced the issue and transferred it to our Dev team. We will inform you when it is fixed.
So sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed May 03, 2017 7:12 am

Dear jonass,

Thanks for waiting.
Now the issue has been fixed in Spire.Doc Pack(hot fix) Version:5.9.3, welcome to test it.
Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc