-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Specific SVG file with bundled PNG image fails to be imported #68822
Comments
@metanoder Please upload a minimal reproduction project to make this easier to troubleshoot. How large are the images in total? Which format are they using? What's their size in pixels on average? Any images that are really small or really large? To get an accurate crash backtrace, consider compiling a debug build then running the editor from a terminal until it crashes. |
I isolated problem to a single SVG. I've tried a number of content creation software to create SVGs (CCS = [Vectornator, Affinity Designer, and Inkscape]) my process for svg... Project file zipped attached with svg from inkscape, but all svgs I've created with this crashed.... Further testing... Looks to be copying and pasting icons from MacOS icons. Copied pasted from MacOS icons SVG all don't work... |
It doesn't crash for me, but it fails importing the SVG indeed and enters a loop of attempting to reimport and failing:
The reimport loop issue is tracked in this issue: #62271. But this issue here can focus on the SVG import failure. |
So the macOS icon in that SVG is a PNG, so it seems we fail loading a SVG with a bundled PNG. |
Seems like the upstream test project |
@metanoder @akien-mga I hope the problem disappears after thorvg/thorvg#1279 |
Thanks @mgrudzinska! If I understand correctly, aside from that SVG being a pathological case, the problem in Godot might be that since the canvas area is empty (the actual PNG icon + vector graphics star icon being outside the canvas), we fail drawing because there's nothing to draw? The failure in Godot happens here: godot/modules/svg/image_loader_svg.cpp Lines 109 to 113 in a8a8819
I assume this is then an expected error condition for I can try to improve the error handling here. Maybe we can also provide users with useful feedback that the canvas is empty before attempting to draw - is there any easy way to check that? (I haven't spent much time with thorvg myself yet, the implementation was done by @fire.) |
Yep, the file I uploaded is definitely "off" due to how I made it... that was my mistake. However, I tried this in multiple instances without the canvas oversized / non-pathological and still crashes if used with MacOS icon copied from info tab. Admittedly, after pinpointing it to a Mac folder icon, not exactly wide use case... Thank you @akien-mga !!! |
|
Thank you for checking. Sorry if this was all a fire drill. Glad its not a problem. Maybe its my specific build with plugin... |
For posterity... Downloaded Godot 4 beta 6. Looks like an obscure MacOS specific problem (which is my main development IDE). Note to self, leave MacOS icons alone. Thanks again for taking the time. |
Godot version
4.0 Beta 5
System information
M1 MacBook Pro Arm 32gb
Issue description
Single SVG file crashes Godot
I have a game on Godot 3.5 and use the plug in dialogic 2.0 for my dialog.
Single SVG file crashes Godot. Size of SVG is tiny. Under 1mb (854 kb).
Steps to reproduce
introduce and upload single svg file to file system.
Game Engine Crashes...
Minimal reproduction project
In comment below...
The text was updated successfully, but these errors were encountered: