Opened 5 years ago

Closed 20 months 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:
Has a Patch: yes 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 5 years ago.
0001-PowerStatus-close-extended-info-window-on-quit.patch (1.0 KB) - added by gbl08ma 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by waddlesplash

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

comment:2 Changed 3 years ago by gbl08ma

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 Changed 3 years ago by gbl08ma

Has a Patch: set

comment:4 Changed 3 years ago by pulkomandy

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 Changed 2 years ago by axeld

Owner: changed from axeld to nobody
Status: newassigned

comment:6 Changed 20 months ago by Janus

Resolution: fixed
Status: assignedclosed

Fixed in hrev51579.

Note: See TracTickets for help on using tickets.