Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335402

Summary: Breakpoint Sound Action fails to change wav file
Product: [Tools] CDT Reporter: Luis Yanes <yanes.luis>
Component: cdt-debugAssignee: Marc-André Laperle <malaperle>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: critical    
Priority: P3 CC: cdtdoug, malaperle, pawel.1.piech
Version: 7.0.1   
Target Milestone: 8.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Stack trace
none
Breakpoint, sound action, gtk patch malaperle: iplog-

Description Luis Yanes CLA 2011-01-25 18:53:54 EST
Build Identifier: M20100211-1343

When on the Breakpoints tab of the debugger you enter on Properties...-> Actions, and try to make a sound action if you change the sound file after testing one, the eclipse hangs up.

Reproducible: Always

Steps to Reproduce:
1. Debug a C/C++ application
2. Create a breakpoint
3. Open the properties of a breakpoint
4. Assign a new Sound Action in Action tab of Properties window.
5. Select one file on the combobox
6. Press the "Play Sound" button.
7. Select a different file with the "Browse" button.
8. Press the combobox.
Comment 1 Marc-André Laperle CLA 2011-05-31 20:48:00 EDT
Created attachment 197055 [details]
Stack trace

I can reproduce this. Using Ubuntu 10.10, Gnome 2.32.0, CDT 7.0.1, Eclipse 3.6.1
Comment 2 Marc-André Laperle CLA 2011-06-01 02:17:45 EDT
And I should add that it works fine on Windows (x86_64) and Mac OS (cocoa x86).
Comment 3 Marc-André Laperle CLA 2011-06-04 00:50:55 EDT
Created attachment 197344 [details]
Breakpoint, sound action, gtk patch

combo.removeModifyListener(comboModifyListener);
...
combo.removeAll(); // defers a Modify event
...
combo.addModifyListener(comboModifyListener); // Modify event actually processed after this

Resetting the content of the combobox defers a Modify event to after the listener is added which means the ModifyListener triggers and receives a Modify event constantly. I don't think there's a need to rebuild the recent sound list or the combobox just when the selection changes, so I removed those elements from the ModifyListener code. I'm not sure if this is a bug in SWT itself but I think the change in the patch makes sense either way. I will open a separate SWT bug to make sure I'm not working around a real bug.
Comment 4 Marc-André Laperle CLA 2011-06-21 00:56:17 EDT
Opened bug 349900.
Comment 5 Marc-André Laperle CLA 2011-06-25 15:18:17 EDT
Fixed in 8.0.1 and master (ab8f68cc5b25f9fcad5f7d2bed94f3eab4fc9ff1).