Opened 10 years ago

Closed 7 years ago

#10885 closed bug (fixed)

[PowerStatus] crashes Deskbar

Reported by: diver Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/PowerStatus Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev47284.

  • Install PowerStatus replicant
  • Open Battery info window
  • Quit replicant

Attachments (2)

Deskbar-265-debug-30-05-2014-09-47-13.report (14.7 KB ) - added by diver 10 years ago.
0001-PowerStatus-close-extended-info-window-on-quit.patch (1.0 KB ) - added by gbl08ma 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by waddlesplash, 10 years ago

I wonder if this crash always happens, or does it only happen on systems with a battery?

comment:2 by gbl08ma, 8 years ago

After some experimentation, it seems the crash occurs because the PowerStatusReplicant destructor stops and releases the reference of the DriverInterface while the extended battery info window is still using it.

If _Quit() is modified to always close the battery information window before removing the replicant from the deskbar, the deskbar no longer crashes under the specified conditions.

However, with this modification, PowerStatus still crashes in a different situation, presumably for the same reason. Steps to reproduce:

  1. Open the PowerStatus applet and specify to Run in window
  1. Drag, using the bottom-right corner, the replicant to the desktop
  1. Close the PowerStatus window (not the replicant)
  1. Right-click the battery icon on the replicant and select "Battery info...", leave the window open.
  1. Right-click the dragger on the bottom-right of the replicant and select "Remove replicant.". The Tracker will crash.

I'm not sure how to solve this last problem as _Quit() is not called in this situation (in fact, using the "Quit" option provided by PowerStatus won't work when it is a stand-alone replicant). Perhaps some message (that is not B_QUIT_REQUESTED) will be sent to the replicant before it is closed, or the code I added to close the window can be safely moved to the destructor?

I'll submit a patch but it is certainly not the ideal solution.

comment:3 by gbl08ma, 8 years ago

patch: 01

comment:4 by pulkomandy, 8 years ago

I would go with a deeper re-strucuration of PowerStatus.

The extended info window should be started in its own dedicated team, not inside Tracker's or DeskBar's one. So, the replicant should open it by launching the main app. This way the replicant and the window can live independantly.

comment:5 by axeld, 8 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:6 by Janus, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev51579.

Note: See TracTickets for help on using tickets.