Ticket #67 (closed defect: fixed)

Opened 20 months ago

Last modified 19 months ago

scenario in which muCommander gets into a deadlock

Reported by: arik851@… Owned by: maxence@…
Priority: high Milestone:
Component: UI > Main window Version: Nightly build
Severity: critical Keywords:
Cc: Operating System: unspecified
Java version: unspecified

Description

Hey,

Maxence, I have already informed you about this bug. I sent a QUIT signal as you wrote and discovered that there is a deadlock.

The scenario:
1. muCommander starts at folder "/home/arik"
2. enter folder "/home/arik/workspace/mucommanderPopup/bin/status_bar/"
3. from the locationComboBox, enter parent folder "/home/arik"
4. return to "/home/arik/workspace/mucommanderPopup/bin/status_bar/" by the "back" action
5. from the locationComboBox, enter parent folder "/home"
6. then the program get stuck.

os: ubuntu 8.04.
sdk: sun-1.6.0
mucmmander: Version: 0.8.3 Build date: 2008/07/26

Attachments

bug (35.4 kB) - added by arik851@… 20 months ago.
dump

Change History

Changed 20 months ago by arik851@…

  • attachment bug added

dump

Changed 19 months ago by maxence@…

Hi Arik,
Thanks a bunch for the trace which allowed me to understand the deadlock and fix it (hopefully).

Can you please confirm that the deadlock can't be reproduce anymore?

What I learned in the process is that one should never synchronize methods of a java.awt.Component subclass, because AWT/Swing already use the instance's intrinsic lock to synchronize some operations like painting (which is bad practice IMO). Dedicated lock objects with synchronized statements should always be used in components instead of synchronized methods, to prevent any deadlock.

Changed 19 months ago by maxence@…

  • status changed from new to closed
  • resolution set to fixed

Changed 19 months ago by maxence@…

  • severity changed from normal to critical

Changed 19 months ago by arik851@…

Hey Maxence,

The deadlock can't be reproduce anymore.

Thanks.

Note: See TracTickets for help on using tickets.