Community
Participate
Working Groups
I use a Combo-Widget in my code with the attribute READ_ONLY (combo = new Combo(parent, SWT.READ_ONLY);) When I select this Combo and close it by selecting another Widget the following error occures: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77d3baf7, pid=5572, tid=3964 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing) # Problematic frame: # C [USER32.dll+0x2baf7] # # An error report file with more information is saved as hs_err_pid5572.log #
Created attachment 22219 [details] PID-Log
Additional Comments: This happens only if the control will be disposed by a FocusLost Event. When control looses focus, a Method called acceptValueFromControl will be invoked. After running through its algorithm the following code will be accessed: if (control != null) { control.dispose(); control = null; } The last location i can get to with my debugger is in Dialog.java in Method windowProc the following line: return control.windowProc(hwnd, msg, wParam, lParam); I hope this will help, i can´t understand where the problem is. With style SWT.NONE everything works fine !
Second additional comment: In successfullCase (SWT.NONE) the next method appering in debugger is /** Ansi/Unicode wrappers */ public static final int CallWindowProc (int lpPrevWndFunc, int hWnd, int Msg, int wParam, int lParam) { if (IsUnicode) return CallWindowProcW (lpPrevWndFunc, hWnd, Msg, wParam, lParam); return CallWindowProcA (lpPrevWndFunc, hWnd, Msg, wParam, lParam); } in OS.java.
*** Bug 98409 has been marked as a duplicate of this bug. ***
Bug 98409 has a simple example showing the problem.
This code WORKSFORME on XP. Does it fail for you? import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; public class PR_98087 { public static void main (String [] args) { final Display display = new Display (); final Shell shell = new Shell (display); shell.setLayout (new FillLayout ()); final Combo combo = new Combo (shell, SWT.READ_ONLY); combo.addListener (SWT.FocusOut, new Listener () { public void handleEvent (Event event) { combo.dispose (); } }); new Button (shell, SWT.PUSH); shell.pack (); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }
(In reply to comment #6) > This code WORKSFORME on XP. Does it fail for you? Your code fails for me, on XP SP1 and swt 3136. An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77D31C8B Function=LockWindowUpdate+0x1A45 Library=C:\WINDOWS\system32\USER32.dll Current Java thread: at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1574) at org.eclipse.swt.widgets.Combo.callWindowProc(Combo.java:276) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3123) [...]
Strange, works for me on XP SP1, SWT 3137.
Yes, your code fails for me, to (Using 3137, XP SP2)! # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77d3baf7, pid=4928, tid=3884 # # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing) # Problematic frame: # C [USER32.dll+0x2baf7] # # An error report file with more information is saved as hs_err_pid4928.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
Created attachment 23269 [details] hs_err_pid4928.log
(In reply to comment #8) > Strange, works for me on XP SP1, SWT 3137. Updated to SWT 3137 from RC2, same result. Downloaded the nighly build N20050616-0010 but no changes. Same environment, JRE 1.4.1_02.
I´m Using Java 5, but thats not a hint, or ?
I can make this happen now by not running with the XP manifest.
(In reply to comment #13) > I can make this happen now by not running with the XP manifest. Yes, adding the manifest file has fixed the problem for me.
McQ, can we fix this for RC3?
*** Bug 74162 has been marked as a duplicate of this bug. ***
Fixed > 20050616 McQ said "yes".
Now it's fixed.
*** Bug 74757 has been marked as a duplicate of this bug. ***
Sorry for my question: Which manifest file ??
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt- home/faq.html#xpthemes