JDK-8140204 : IllegalArgumentException in Win32ShellFolder2 while sorting
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u40
  • Priority: P3
  • Status: Closed
  • Resolution: Incomplete
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2015-09-02
  • Updated: 2015-10-21
  • Resolved: 2015-10-21
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
1.8.0_40

ADDITIONAL OS VERSION INFORMATION :
Windows Vista

A DESCRIPTION OF THE PROBLEM :
java.lang.IllegalArgumentException: Comparison method violates its general contract!
	at java.util.TimSort.mergeHi(Unknown Source)
	at java.util.TimSort.mergeAt(Unknown Source)
	at java.util.TimSort.mergeCollapse(Unknown Source)
	at java.util.TimSort.sort(Unknown Source)
	at java.util.Arrays.sort(Unknown Source)
	at java.util.Vector.sort(Unknown Source)
	at java.util.Collections.sort(Unknown Source)
	at sun.awt.shell.Win32ShellFolder2$18.call(Unknown Source)
	at sun.awt.shell.Win32ShellFolder2$18.call(Unknown Source)
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Unknown Source)
	at sun.awt.shell.ShellFolder.invoke(Unknown Source)
	at sun.awt.shell.ShellFolder.invoke(Unknown Source)
	at sun.awt.shell.Win32ShellFolder2.sortChildren(Unknown Source)
	at sun.awt.shell.ShellFolder$1.call(Unknown Source)
	at sun.awt.shell.ShellFolder$1.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

REGRESSION.  Last worked in version 6u45


REPRODUCIBILITY :
This bug can be reproduced occasionally.


Comments
The java.util.Comparator implementation that is used in sun.awt.shell.Win32ShellFolder2$18.call is reduced to IShellFolder::CompareIDs Win32 API call. I cannot reproduce the issue by calling ShellFolder.sortChildren() in JDK 8u40 on Windows. A test or more detailed description is required to continue.
21-10-2015

does it affect 9 ?
21-10-2015

There is not enough information in the report. However, based upon limited stack trace it looks like a duplicate of JDK-8048887. I have written back to the submitter requesting more information including confirmation about the bug reproducibility with latest JDK versions 8u60 and 9 ea. ======================================== On 9/3/2015 9:25 AM, Pardeep Kumar Sharma wrote: > Hi ......., > > Can you please confirm if this issue is reproducible with the latest JDK versions 8u60 and 9 ea b78. > > You can download the respective from: > http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html > https://jdk9.java.net/download/ > > Further, if you could share more information including a test case to reproduce this issue, will help. > > Thank You, >............ =========================================================
03-09-2015