-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FVWM 1.1.1] Crash when using SVG images {fvwm3: calloc: zero size} #1133
Comments
If you specify the image size, does it work, for example:
And if that works, do the SVG images include a default |
With image size it doesn't crash but the images are not shown (I assume not found):
The issue is with FvwmScript too:
user-home.svg
|
If you revert this commit, do things start working as expected? |
Yes |
@ThomasAdam Maybe you can look closer at that commit, I'm unsure what could be going on with the API change that was added. |
This happens only with SVG images that do not have the dimensions defined:
No crash after adding dimensions:
|
That is what I thought, it looked like some division by zero error. Looks like the old deprecated methods dealt with that case while our newer code doesn't. Thanks, this does give us something to look into. |
Right, so according to this: https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/method.Handle.get_intrinsic_size_in_pixels.html The API has changed:
So I've got some work to do here to choose the appropriate values. When I tested this, I'd only ever had SVGs set with an explicit |
In the librsvg API calls for >=2.52, the newer API of handle_get_intrinsic_size_in_pixels() doesn't set the default width/height of the image if none is supplied. In this case, set those to a default value of 16.0 for both width and height. Fixes #1133
I'm working on this on |
In the librsvg API calls for >=2.52, the newer API of handle_get_intrinsic_size_in_pixels() doesn't set the default width/height of the image if none is supplied. In this case the viewbox attribute of the SVG file can be used to determine the width/height. If the viewbox attribute isn't present the image is not processed further. Fixes #1133
Hi @sebaro Would you mind trying out the patch on the From what I can tell, this seems to be "working" -- whether it's doing the correct thing in all cases, I'm not sure. But in my testing of eliding the |
Yes, it's fine with this branch. Thanks. |
Thanks for reporting your bug here! The following template will help with
giving as much information as possible so that it's easier to diagnose and
fix.
Upfront Information
Please provide the following information by running the command and providing
the output.
Fvwm3 version (run:
fvwm3 --version
)fvwm3 1.1.1 (released)
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, XRandR, XRender, XCursor, XFT, XFixes, NLS
Linux distribution or BSD name/version
Gentoo
Platform (run:
uname -sp
)Linux AMD Athlon(tm) 5350 APU with Radeon(tm) R3
Steps to Reproduce
Does Fvwm3 crash?
Yes
Extra Information
librsvg-2.57.3
The text was updated successfully, but these errors were encountered: