Opened 11 years ago

Closed 10 years ago

#10832 closed bug (fixed)

[IFS] Divide error in IFSSaver::_Init(BRect)

Reported by: dexterkidd Owned by: jessicah
Priority: normal Milestone: R1
Component: Add-Ons/Screen Savers Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #10842
Platform: x86

Description (last modified by diver)

hrev47213.

After I installed some Chinese fonts: simsun, microsoft yahei, wqy zenhei, wqy bitmapsong in /boot/system/non-packaged/data/fonts/ and change haiku's appearance and WebPositive's main font I could not start ScreenSaver preference. Every time I get a crash when I open ScreenSaver.

Attachments (1)

ScreenSaver-8118-debug-13-05-2014-10-04-27.report (21.3 KB ) - added by dexterkidd 11 years ago.
ScreenSaver crash dump

Download all attachments as: .zip

Change History (17)

by dexterkidd, 11 years ago

ScreenSaver crash dump

comment:1 by diver, 11 years ago

Component: Preferences/ScreenSaverAdd-Ons/Screen Savers
Description: modified (diff)
Owner: changed from axeld to stippi
Status: newassigned
Summary: Can not open screensaver in preference,hrev47213[IFS] Divide error in IFSSaver::_Init(BRect)

From the crash report it looks like it's IFS screensaver which cause the crash. Could you attach your /boot/home/config/settings/ScreenSaver_settings?

comment:2 by stippi, 11 years ago

I've looked at the code, but don't understand where it would divide anything in IFSSaver::_Init(BRect). The IFS constructor would not be inlined either, I believe. And if something confuses the locking code, I would think the real bug is not where it crashes.

in reply to:  2 comment:3 by anevilyak, 11 years ago

Replying to stippi:

I've looked at the code, but don't understand where it would divide anything in IFSSaver::_Init(BRect). The IFS constructor would not be inlined either, I believe. And if something confuses the locking code, I would think the real bug is not where it crashes.

It's actually crashing in the IFS constructor, its symbol simply isn't properly demangled (3IFSG5BRect + 0x2d6).

Version 0, edited 11 years ago by anevilyak (next)

comment:4 by korli, 11 years ago

It seems it happens here: we have a division by zero when the rect width and height are zero.

comment:5 by stippi, 11 years ago

Yes. And thanks! Should be fixed in hrev47221. Of course, this only fixes symptoms. The fact remains that the rect is invalid, I didn't investigate that. I looked over the code in IFS to make sure it works properly when exiting the constructor early. I'll leave the ticket open, since I didn't test the change, and would like more feedback on what happens now.

comment:6 by pulkomandy, 11 years ago

Owner: changed from stippi to jscipione

The rect is the bounds of the view passed to StartSaver. I guess the screensaver preview is started too early, before the view is layouted?

comment:7 by stippi, 11 years ago

Sounds like a very likely scenario, indeed.

comment:8 by jscipione, 11 years ago

Please retest in >= hrev47223, the crash should be fixed.

The views are laid out before the preview starts.

comment:9 by diver, 11 years ago

Blocking: 10842 added

comment:10 by HAL, 11 years ago

I tried hrev47223 and the bug is fixed.

comment:11 by HAL, 11 years ago

It is fixed when Screensaver app is started with IFS previously selected but if Flurry is selected, starting ScreenSaver causes a very similar crash. I am not certain if it is the same. I have a debug from the crash. I will upload it if it looks the same.

in reply to:  11 comment:12 by HAL, 11 years ago

Replying to HAL:

It is fixed when Screensaver app is started with IFS previously selected but if Flurry is selected, starting ScreenSaver causes a very similar crash. I am not certain if it is the same. I have a debug from the crash. I will upload it if it looks the same.

No I think this is a different bug: segment violation.

comment:13 by diver, 11 years ago

Resolution: fixed
Status: assignedclosed

Flurry issue is probably already being tracked in #10206. If the stack trace is different, please open a new ticket. This one is fixed in hrev47223.

comment:14 by jessicah, 10 years ago

Resolution: fixed
Status: closedreopened

The fix only hides the issue. Affects many other screensavers (Gravity is an example).

comment:15 by jessicah, 10 years ago

Owner: changed from jscipione to jessicah
Status: reopenedassigned

comment:16 by pulkomandy, 10 years ago

Resolution: fixed
Status: assignedclosed

All screensavers fixed now.

Note: See TracTickets for help on using tickets.