Opened 13 years ago
Closed 7 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)
Change History (27)
by , 13 years ago
by , 13 years ago
Attachment: | deskbar_crash.png added |
---|
by , 13 years ago
Attachment: | BugsTicketSeen added |
---|
by , 13 years ago
Attachment: | HaikuVersion.png added |
---|
by , 13 years ago
Attachment: | devices.txt added |
---|
by , 13 years ago
Attachment: | gdb_BatteryStatus added |
---|
by , 13 years ago
Attachment: | syslog_deskbar_crash.log added |
---|
comment:1 by , 13 years ago
Component: | - General → Applications/PowerStatus |
---|---|
Owner: | changed from | to
comment:2 by , 13 years ago
by , 13 years ago
Attachment: | gdb_BatteryStatus2 added |
---|
by , 13 years ago
Attachment: | syslog_deskbar_crash2.log added |
---|
syslog just after a crash of the deskbar
follow-up: 5 comment:3 by , 13 years ago
Can you attatch a screnshot of you detail view of your battery from PowerStatus?
comment:4 by , 13 years ago
Cc: | added |
---|
by , 13 years ago
Attachment: | detailed_battery_status.png added |
---|
comment:5 by , 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 , 11 years ago
Yes it's the one :)
looks like there are some errors in your reported battery.
Does it still happends?
comment:7 by , 11 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 , 11 years ago
Cc: | added |
---|
comment:9 by , 11 years ago
Version: | R1/alpha3 → R1/Development |
---|
follow-up: 13 comment:11 by , 11 years ago
Would changing line 101 if (fCachedAcpiInfo.current_rate > 0)
to if (fCachedAcpiInfo.current_rate > 0 || fRateBuffer.GetMeanRate() > 0)
fix that?
or chould one add
int meanRate = fRateBuffer.GetMeanRate(); if (fCachedAcpiInfo.current_rate > 0 || meanRate > 0) info->time_left = 3600 * fCachedAcpiInfo.capacity / meanRate;
comment:12 by , 11 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.
comment:13 by , 11 years ago
Replying to modeenf:
Would changing line 101
if (fCachedAcpiInfo.current_rate > 0)
toif (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:15 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
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.