Opened 13 years ago

Closed 6 years ago

#7810 closed bug (fixed)

Deskbar crashs when Battery::GetBatteryInfoCached

Reported by: Arnaud M. Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/PowerStatus Version: R1/Development
Keywords: Cc: modeenf, mati@…
Blocked By: Blocking:
Platform: x86

Description

Hi,

I have recently installed Haiku alpha 3 as the single operating system of an old laptop Nec Versa (see attachment for details) and I would like to report a crash of the deskbar without explicit reason i.e. I was just surfing on the net using WebPositive.

The bug is quitely reproductible and seems to happen each time I use WebPositive. And when I launch gdb, it appears that we have stopped during the GetBatteryInfo of PowerStatusView.

I attached all files I thought necessary in this ticket (the description is the README files so read the readme first)

Hope this helps.

Attachments (11)

README (981 bytes ) - added by Arnaud M. 13 years ago.
deskbar_crash.png (146.2 KB ) - added by Arnaud M. 13 years ago.
BugsTicketSeen (61 bytes ) - added by Arnaud M. 13 years ago.
HaikuVersion.png (43.2 KB ) - added by Arnaud M. 13 years ago.
devices.txt (2.5 KB ) - added by Arnaud M. 13 years ago.
gdb_BatteryStatus (7.1 KB ) - added by Arnaud M. 13 years ago.
syslog_deskbar_crash.log (278.4 KB ) - added by Arnaud M. 13 years ago.
gdb_BatteryStatus2 (4.3 KB ) - added by Arnaud M. 13 years ago.
syslog_deskbar_crash2.log (120.6 KB ) - added by Arnaud M. 13 years ago.
syslog just after a crash of the deskbar
detailed_battery_status.png (24.2 KB ) - added by Arnaud M. 13 years ago.
Deskbar-500-debug-24-11-2013-21-21-37.report (15.9 KB ) - added by Wizard 10 years ago.
crash report

Download all attachments as: .zip

Change History (27)

by Arnaud M., 13 years ago

Attachment: README added

by Arnaud M., 13 years ago

Attachment: deskbar_crash.png added

by Arnaud M., 13 years ago

Attachment: BugsTicketSeen added

by Arnaud M., 13 years ago

Attachment: HaikuVersion.png added

by Arnaud M., 13 years ago

Attachment: devices.txt added

by Arnaud M., 13 years ago

Attachment: gdb_BatteryStatus added

by Arnaud M., 13 years ago

Attachment: syslog_deskbar_crash.log added

comment:1 by anevilyak, 13 years ago

Component: - GeneralApplications/PowerStatus
Owner: changed from nobody to axeld

comment:2 by Arnaud M., 13 years ago

Let the "WebPositive" clue over, the crash has just hapened now without WebPositive running ... I attach 2 new files (syslog_deskbar_crash2.log and gdb_BatteryStatus2) related to this occurence in order to eventually put in evidence a common point.

by Arnaud M., 13 years ago

Attachment: gdb_BatteryStatus2 added

by Arnaud M., 13 years ago

Attachment: syslog_deskbar_crash2.log added

syslog just after a crash of the deskbar

comment:3 by modeenf, 13 years ago

Can you attatch a screnshot of you detail view of your battery from PowerStatus?

comment:4 by modeenf, 13 years ago

Cc: modeenf added

by Arnaud M., 13 years ago

Attachment: detailed_battery_status.png added

in reply to:  3 comment:5 by Arnaud M., 13 years ago

Replying to modeenf:

Can you attatch a screnshot of you detail view of your battery from PowerStatus?

I don't know if my attachment (detailed_battery_status.png) is what you want so do not hesitate to precise your request if I am wrong.

comment:6 by modeenf, 11 years ago

Yes it's the one :)

looks like there are some errors in your reported battery.

Does it still happends?

by Wizard, 10 years ago

crash report

comment:7 by Wizard, 10 years ago

As of hrev46415 this still happens on my asus t101mt. Deskbar crashes randomly when PowerStatus replicant is installled in it.

comment:8 by Wizard, 10 years ago

Cc: mati@… added

comment:9 by anevilyak, 10 years ago

Version: R1/alpha3R1/Development

comment:10 by korli, 10 years ago

fRateBuffer.GetMeanRate() can be zero and provokes a divide error.

comment:11 by modeenf, 10 years ago

if (fCachedAcpiInfo.current_rate > 0 && fRateBuffer.GetMeanRate() > 0) would be fine.

Version 1, edited 10 years ago by korli (previous) (next) (diff)

comment:12 by tqh, 10 years ago

IMO GetMeanRate return value should be checked and the logic have different cases for 0, -1 and >0. -1: a error code (-1?), currently it is used in calculation. 0: should return infinity. greater than 0: calculate.

Perhaps this shouldn't be integer math at all.

in reply to:  11 comment:13 by korli, 10 years ago

Replying to modeenf:

Would changing line 101 if (fCachedAcpiInfo.current_rate > 0) to if (fCachedAcpiInfo.current_rate > 0 || fRateBuffer.GetMeanRate() > 0) fix that?

if (fCachedAcpiInfo.current_rate > 0 && fRateBuffer.GetMeanRate() > 0) would be fine.

Sorry BTW I clicked on "Edit" instead of "Answer", and accidentally modified your comment.

comment:14 by korli, 10 years ago

Applied a fix in hrev46454.

comment:15 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:16 by korli, 6 years ago

Resolution: fixed
Status: assignedclosed

Assume fixed.

Note: See TracTickets for help on using tickets.