ASSERTION: You can't draw an image with a 0 width or height!

NEW
Unassigned

Status

Core Graveyard
Image: Painting
P3
normal
16 years ago
8 years ago

People

(Reporter: Akkana Peck, Unassigned)

Tracking

Trunk
Future
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
I see this all the time when I browse with a debug build:

###!!! ASSERTION: You can't draw an image with a 0 width or height!: 'aSWidth >
0 && aDWidth > 0 && aSHeight > 0 && aDHeight > 0', file nsImageGTK.cpp, line 623
###!!! Break: at file nsImageGTK.cpp, line 623

One way to get it reproducibly: Load Tinderbox when something is flaming (not
sure if it works when everything is green).  Scroll down so that you don't see
the flames.  Hit reload (it reloads then scrolls down to where you were).  Now
use the mousewheel to scroll up again, and you get the assertion.

Can we turn this off if it's not important, or fix it if it is?  It happens a
lot in general browsing.

Comment 1

16 years ago
Created attachment 70725 [details]
Testcase that triggers the assert.

This is one of the things that trigger the assert. gray_bar.gif is a GIF89a,
1x22 pixels. Changing that picture to a bigger one makes the assert go away.
Removing or line breaking the code makes the assert go away.

Comment 2

16 years ago
Created attachment 70752 [details]
Stacktrace when the assert occurs

By calling TransformCoord() in nsRenderingContextImpl.cpp |sr.width| becomes 0.
This goes through to img->Draw() a few lines down. The source for |sr.width| to
become 0 is TransformCoord() in nsTransform2D.cpp. |aWidth| is 1 at entrance,
|m00| is 0.062500 and |ex| is 0. At line 577 |aWidth| gets set to 0.

Someone else should look at this.

Comment 3

16 years ago
Moving bugs to new Image: GFX component
Component: ImageLib → Image: GFX

Updated

16 years ago
Priority: -- → P3
Target Milestone: --- → mozilla1.1alpha

Comment 4

15 years ago
retargeting
Target Milestone: mozilla1.1alpha → Future
QA Contact: tpreston → image.gfx

Updated

11 years ago
Assignee: pavlov → nobody

Updated

8 years ago
Component: Image: Painting → Image: Painting
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.