Community
Participate
Working Groups
Build ID: I20070503-1400 Steps To Reproduce: 1. Window > Preferences... 2. Java > Editor > Templates 3. Cancel actual: dialog stops responding, unable to close window, have to force close Eclipse expected: preferences dialog dismiss More information:
Created attachment 66041 [details] log with bug reproduced multiple times
This works for me using I20070503-1400 using WindowsXP, Linux and MAC OS X. We don't have a Windows2000 machine. Moving to SWT as it works on all other systems. SWT, please also see similar bug 109376.
Grant, can you try this on your 2000 machine? If it crashes, we need to fix this for 3.3. RC1.
I don't see this problem on Win2000 SP4, using the same build. Are there possibly more steps that are required (eg.- your workspace may be in a different state)? Does it happen for you if you switch to a new workspace and immediately do the steps?
Yes, even if I switch workspace it is reproducible. I also have Windows 2k SP4. More details: -There is no entries in the templates list -Even if I switch to another preferences node in the tree the problems occurs in the tree when canceling. However, if I don't access that particular tree node I can cancel the dialog correctly. -Import... doesn't work; I can select a file but nothing is imported -New... doesn't work; I can edit a new template when once saved it doesn't appear in the list I also tried unsuccessfully to: -launch Eclipse with -clean -with both Sun JRE 1.5.0_6 and JRE 1.6.0_1 -re-decompressing the archive -use a different name for the workspace -use workspace on different drives Some possible differences between my setup and yours: -my Windows 2000 is in French -my Windows main drive is F:\ and not the usual C:\ -my screen resolution is 1920x1200
Created attachment 66972 [details] what the dialog looks like when locking up
I cannot reproduce the problem on a different French Windows 2K, so that probably isn't related to the problem at hand.
After some further investigation, I've finally found what seems to be the source of the problem and it is rather surprising: I have a Logitech MX518 Optical Mouse with multiple programmable buttons. That mouse comes with a tray software called Logitech SetPoint (Control Center/Driver version 3.0.104 and also 3.1.116). If the program is active, Eclipse's Templates dialog crashes. If the program is not active (right-click, exit on the tray icon), the dialog works correctly. I tried this many times in a row (exiting the SetPoint, restarting SetPoint) and the behavior is consistent. What is the link between both? I have no idea! But there it is... This might be worth looking into since I'm having an hard time believing that this would be the only case where this can happen. I've also tested with SetPoint 3.10 (latest version supported by W2K SP4 according to Logitech FAQ) with the same results.
Since we can't create the problem, the best I can think of is getting you to run SWT from HEAD, debug/inspect/hack etc. until we can see what is going on. See http://www.eclipse.org/swt/cvs.php
Ok, I'll look into that... I'd be happy to go deeper than just reporting bugs for once ;-). Just 2 questions: 1) when you say you haven't been able to reproduce, have you tried downloading and running the SetPoint software even if you don't have this particular mouse? If not, I'll try that first on my second W2K computer tonight. 2) are we sure this is an SWT problem? I wonder since there is no entries in the templates list.
I installed the SetPoint on the other w2k fr computer that doesn't have a mouse managed by SetPoint and I can still reproduce the behavior. Also, if after Eclipse as started and I verify that the dialog works, I can immediately reproduce the bad behavior by starting SetPoint. So: -SetPoint stop, Eclipse start, templates = ok -SetPoint started, Eclipse start, templates = bug -SetPoint started, Eclipse start, SetPoint stop, templates = ok -SetPoint stop, Eclipse start, SetPoint start, templates = bug
Run Eclipse within Eclipse, make the problem happen, get the stack, paste it here. If it really is a AIIOBE in Tree, hack Tree.java to catch AIIOBE's around where the thing is happening and put a break. Have a look at the variables in the tree instance. What is the size of the array? What is the index?
Did I say Tree? I meant Table.
>hack Tree.java to catch AIIOBE's around where >the thing is happening and put a break. No need to hack the code: simply add a Java exception breakpoint on AIIOBE (assuming they don't happen that often).
As suggested, I imported all the plugins from Eclipse 3.3 and ran a few debug sessions, looking at both Table swt widget and the org.eclipse.jdt.ui Java templates preference pages. Everything a bit fuzzy, but I think the problem must be twofold; 1) problem when taking the data and putting it inside the table 2) problem when the table is disposed I see that the preferences objects are loaded in memory but it seems the table only creates the 4 default items. My hypothesis is that the bug makes the items count incorrect and when the table is disposed the widget tries to access outside of that actual 0-3 index of those 4 default items. I'm going to checkout the relevant two plugins from source so I can start trying a few things in the code.
More testing today... The exception occurs repeatedly when opening the dialog. I found out that if I added extra checks in Table I could prevent the exception by not trusting the itemCount (from `int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);`) in releaseChildren and Table._getItem. With these changes, I still get the empty table the first time but subsequent times it is filled with the correct data from the templates. I've also looked at what SetPoint was doing. The only DLL common between it and Eclipse is lgscroll.dll that is installed with SetPoint. It has methods "InstallScrollHooks" and "UninstallScrollHooks"; probable that those hooks are causing the problem?
Created attachment 67578 [details] stack captured by debug
Created attachment 67579 [details] changes that prevent the exception
Created attachment 67580 [details] pedump of what I think is the offending dll
Ricky, you've done a great job. My guess is that SetPoint is installing a Windows system wide hook and that is causing trouble. Let's look into the table getting disposed. What does the operating system think that the item count is (ie. what does OS.LVM_GETITEMCOUNT return?). What is the actual size and contents of the array at that point? Note: We are late in the Eclipse 3.3 end game and we may be unable to get any more fixes in or be unable to spend the time debugging with you right now but please don't give up on us. If this bug report goes inactive for a while, ping it.
Is this still happening? Is there a new version of the Logitech software? Is the Logitech software supposed to work on win2k? Should this be resolved as NOT_ECLIPSE?
Grant to retest on his Windows 2000 box.
After installing SetPoint 3.10 on my win2000 I can reproduce this with eclipse 3.3 but it works with 3.4M6, so this is yet another manifestation of bug 142965. Closing report as a duplicate. *** This bug has been marked as a duplicate of bug 142965 ***