Closed Bug 126529 Opened 23 years ago Closed 1 month ago

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

Categories

(Core Graveyard :: Image: Painting, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
Future

People

(Reporter: akkzilla, Unassigned)

Details

Attachments

(2 files)

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.
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.
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.
Moving bugs to new Image: GFX component
Component: ImageLib → Image: GFX
Priority: -- → P3
Target Milestone: --- → mozilla1.1alpha
retargeting
Target Milestone: mozilla1.1alpha → Future
QA Contact: tpreston → image.gfx
Assignee: pavlov → nobody
Product: Core → Core Graveyard
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: