JDK-6792023 : Print suspends on Windows 2000 Pro since 6u12 b01
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u12
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2009-01-09
  • Updated: 2011-01-19
  • Resolved: 2009-01-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u12 b04Fixed 7Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Reproduce:
1.  login windows 2000 pro
2. download and install 6u12 b01 from http://jre.sfbay/java/re/jdk/6u12/promoted/all/b01/bundles/windows-i586/jdk-6u12-ea-bin-b01-windows-i586-p-17_nov_2008.exe
3. unzip attached PrintTester.zip
4. java PrintTester
5. click "Plain" button

Problem:
Print does not work. The program suspends and there is no any exception or error. 

Environment:
This can only be reproduced on Windows 2000 Pro. No problem on other windows platforms, linux or Solaris.
This problem exists since 6u12 b01. All builds for 6u12 have the same problem.
Cannot be reproduced with 6u11 or earlier builds.

Languages:
Tried with Japanese, Simplified Chinese, Traditional Chinese and Korean.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/6u14/6792023/
14-01-2009

EVALUATION I was able to reproduce this failure on Win2K only. The test works fine on Windows XP/Vista. But the initial window procedure for the native dialogs wasn't called on Windows XP/Vista as well. It's not clear why the bug is reproducible on Win2K only and isn't reproducible on other Windows platforms. It looks like the scope of the issue depends on the implementation of the native dialogs.
14-01-2009

SUGGESTED FIX the quick fix for the bug is below (similar changes should be applied to awt_PrintDialog.cpp | awt_PrintJob.cpp) ------- awt_FileDialog.cpp ------- *** /tmp/sccs.dqo4zc 2009-01-14 18:51:05.000000000 +0300 --- awt_FileDialog.cpp 2009-01-14 18:50:50.000000000 +0300 *************** *** 40,45 **** --- 40,47 ---- /* Non-localized suffix of the filter string */ static const TCHAR s_additionalString[] = TEXT(" (*.*)\0*.*\0"); + static WNDPROC prevWndProc = NULL; + /***********************************************************************/ void *************** *** 83,89 **** break; } } ! return ComCtl32Util::GetInstance().DefWindowProc(NULL, hWnd, message, wParam, lParam); } static UINT_PTR CALLBACK --- 85,91 ---- break; } } ! return ComCtl32Util::GetInstance().DefWindowProc(prevWndProc, hWnd, message, wParam, lParam); } static UINT_PTR CALLBACK *************** *** 117,123 **** } // subclass dialog's parent to receive additional messages ! ComCtl32Util::GetInstance().SubclassHWND(parent, FileDialogWndProc); break; --- 119,125 ---- } // subclass dialog's parent to receive additional messages ! prevWndProc = ComCtl32Util::GetInstance().SubclassHWND(parent, FileDialogWndProc); break;
14-01-2009

EVALUATION This is a regression of the fix for 6714829. The fix for 6714829 sets a new window procedure for the native dialogs to handle some native messages (WM_COMMAND | IDCANCEL) intended for the native dialogs (it was done for modality purposes). The previous window procedure should be kept and the new window procedure should call the previous one.
14-01-2009

EVALUATION A quick test of java.awt.FileDialog shows that it is also broken on Win2000.
13-01-2009

EVALUATION Its not because of that bug. We obtained access to the submitter's system over VNC and commented out the pageDialog() call so that there was no way that changed would be invoked, but the hang was also seen with printDialog(). Looking for other causes we discovered 6u12 b01 has the following fix 6714829: Wrong modal dialog activated after child closed, causes freeze The webrev for that bug report shows significant changes to the windows print and page dialog event and modality handling, so almost certainly introduced this problem. Reassigning to AWT.
13-01-2009

EVALUATION There was only one Windows printing change in 6u12 b01 : the fix for 6359283. However I can't see any problem with it. Requesting more info.
09-01-2009