Skip to content
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

Segmentation fault on Blender appdata #337

Open
bochecha opened this issue Nov 25, 2019 · 5 comments
Open

Segmentation fault on Blender appdata #337

bochecha opened this issue Nov 25, 2019 · 5 comments

Comments

@bochecha
Copy link

I'm trying to update Blender in Flathub, and appstream-util crashes on the new appdata:

$ appstream-util validate _build/files/share/appdata/org.blender.Blender.appdata.xml 
_build/files/share/appdata/org.blender.Blender.appdata.xml: Segmentation fault (core dumped)

While that's probably a problem with the appdata being invalid, it would be much better if it could handle it gracefully and report the failure.

The problem happens because the new file has a <p> tag inside a <ul> tag in its <release> -> <description>:

        <release version="2.81" date="2019-11-14">
            <description>
                <p>New features:</p>
                <ul>
                    <li>Many sculpt tools and poly build tool for retopology</li>
                    <li>Voxel remesh and quad remesh</li>
                    <li>Transform origins, new snapping, mirroring and auto merge options</li>
                    <li>Revamped shaders for texturing</li>
                    <li>Cycles denoising with OpenImageDenoise and NVIDIA RTX support</li>
                    <li>Library overrides to make local overrides to linked characters and other data</li>
                </ul>
                <ul>
                <p>Enhancements:</p>
                    <li>Eevee shadows, transparency and bump mapping redesigned</li>
                    <li>Viewport options for look development with Cycles and Eevee</li>
                    <li>Finer control over rotations and scale in bones, constraints and drivers</li>
                    <li>Outliner improvements, new file browser and batch rename</li>
                </ul>
            </description>
        </release>
@bochecha
Copy link
Author

And here's the backtrace:

Thread 2 (Thread 0x7ffff6a66700 (LWP 9)):
#0  0x00007ffff7a2d8ef in __GI___poll (fds=0x5555555ac300, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff7e7022e in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x5555555ac300, timeout=<optimized out>, context=0x5555555ac470) at ../glib/gmain.c:4228
#2  0x00007ffff7e7022e in g_main_context_iterate (context=context@entry=0x5555555ac470, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3922
#3  0x00007ffff7e70363 in g_main_context_iteration (context=0x5555555ac470, may_block=may_block@entry=1) at ../glib/gmain.c:3988
#4  0x00007ffff7e703b1 in glib_worker_main (data=<optimized out>) at ../glib/gmain.c:5868
#5  0x00007ffff7e994c1 in g_thread_proxy (data=0x5555555a9050) at ../glib/gthread.c:805
#6  0x00007ffff78175e2 in start_thread (arg=<optimized out>) at pthread_create.c:479
#7  0x00007ffff7a38413 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ffff6d32780 (LWP 5)):
#0  0x00007ffff7a9b337 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96
#1  0x00007ffff79a4716 in __vfprintf_internal (s=s@entry=0x7fffffffcc50, format=format@entry=0x7ffff7f9a721 "Tag %s in %s invalid", ap=ap@entry=0x7fffffffcdf0, mode_flags=mode_flags@entry=2) at vfprintf-internal.c:1688
#2  0x00007ffff79b63c5 in __vasprintf_internal (result_ptr=result_ptr@entry=0x7fffffffcda0, format=0x7ffff7f9a721 "Tag %s in %s invalid", format@entry=0x7fffffffcda0 "", args=0x7fffffffcdf0, args@entry=0x7ffff7f9a721, mode_flags=mode_flags@entry=2) at vasprintf.c:57
#3  0x00007ffff7a4808c in __vasprintf_chk (result_ptr=result_ptr@entry=0x7fffffffcda0, flag=flag@entry=1, format=format@entry=0x7fffffffcda0 "", ap=ap@entry=0x7ffff7f9a721) at vasprintf_chk.c:36
#4  0x00007ffff7eb7cbd in vasprintf (__ap=0x7ffff7f9a721, __fmt=0x7fffffffcda0 "", __ptr=0x7fffffffcda0) at /usr/include/x86_64-linux-gnu/bits/stdio2.h:213
#5  0x00007ffff7eb7cbd in g_vasprintf (string=string@entry=0x7fffffffcda0, format=format@entry=0x7ffff7f9a721 "Tag %s in %s invalid", args=args@entry=0x7fffffffcdf0) at ../glib/gprintf.c:330
#6  0x00007ffff7e8fdd1 in g_strdup_vprintf (format=format@entry=0x7ffff7f9a721 "Tag %s in %s invalid", args=args@entry=0x7fffffffcdf0) at ../glib/gstrfuncs.c:514
#7  0x00007ffff7e598c4 in g_error_new_valist (domain=69, code=1, format=0x7ffff7f9a721 "Tag %s in %s invalid", args=args@entry=0x7fffffffcdf0) at ../glib/gerror.c:416
#8  0x00007ffff7e59caf in g_set_error (err=err@entry=0x7fffffffd170, domain=<optimized out>, code=code@entry=1, format=format@entry=0x7ffff7f9a721 "Tag %s in %s invalid") at ../glib/gerror.c:586
#9  0x00007ffff7f805ac in as_node_get_localized_unwrap_type_ul (node=<optimized out>, error=<optimized out>, hash=<optimized out>) at ../libappstream-glib/as-node.c:345
#10 0x00007ffff7f805ac in as_node_get_localized_unwrap (node=node@entry=0x5555555abd30, error=error@entry=0x7fffffffd170) at ../libappstream-glib/as-node.c:2109
#11 0x00007ffff7f859d8 in as_release_node_parse (release=release@entry=0x5555555be080 [AsRelease], node=node@entry=0x5555555abd00, ctx=ctx@entry=0x5555555ba710, error=error@entry=0x7fffffffd170) at ../libappstream-glib/as-release.c:1013
#12 0x00007ffff7f6ce07 in as_app_node_parse_child (error=0x7fffffffd170, ctx=0x5555555ba710, flags=<optimized out>, n=0x5555555abcd0, app=0x5555555b3290 [AsApp]) at ../libappstream-glib/as-app.c:5279
#13 0x00007ffff7f6ce07 in as_app_node_parse_full (app=0x5555555b3290 [AsApp], node=<optimized out>, flags=<optimized out>, ctx=0x5555555ba710, error=0x7fffffffd170) at ../libappstream-glib/as-app.c:5429
#14 0x00007ffff7f6d9c6 in as_app_parse_data (app=0x5555555b3290 [AsApp], data=<optimized out>, flags=0, error=0x7fffffffd170) at ../libappstream-glib/as-app.c:6291
#15 0x00007ffff7f6ded6 in as_app_parse_appdata_file (error=0x7fffffffd1e0, flags=0, filename=0x7fffffffd888 "org.blender.Blender.appdata.xml", app=0x5555555b3290 [AsApp]) at ../libappstream-glib/as-app.c:6324
#16 0x00007ffff7f6ded6 in as_app_parse_file (app=app@entry=0x5555555b3290 [AsApp], filename=filename@entry=0x7fffffffd888 "org.blender.Blender.appdata.xml", flags=flags@entry=0, error=error@entry=0x7fffffffd1e0) at ../libappstream-glib/as-app.c:6386
#17 0x0000555555564218 in as_util_validate_file (error=0x7fffffffd1e0, flags=AS_APP_VALIDATE_FLAG_NONE, filename=0x7fffffffd888 "org.blender.Blender.appdata.xml") at ../client/as-util.c:2795
#18 0x0000555555564218 in as_util_validate_files (filenames=0x7fffffffd4a8, flags=AS_APP_VALIDATE_FLAG_NONE, error=0x7fffffffd278) at ../client/as-util.c:2836
#19 0x000055555555dea4 in as_util_run (error=0x7fffffffd278, values=<optimized out>, command=0x7fffffffd87f "validate", priv=0x5555555a89a0) at ../client/as-util.c:165
#20 0x000055555555dea4 in main (argc=<optimized out>, argv=<optimized out>) at ../client/as-util.c:4623

@hughsie
Copy link
Owner

hughsie commented Nov 26, 2019

I'm mad busy with RHEL 8 at the moment, but I'd gladly merge a PR if you can see the bug :)

@luyatshimbalanga
Copy link

The issue occurred on the latest stable version of Blender 2.8.2 as well.

@bochecha
Copy link
Author

The issue occurred on the latest stable version of Blender 2.8.2 as well.

Because upstream Blender didn't fix their appdata in that release, only in master. As @hughsie said he was too busy to work on this, and as I didn't say this is way above my C proficiency, so you can see there was no fix in appstream-glib either and this issue is still open.

Even if appstream-glib didn't segfault, the upstream appdata would still be invalid, so if this is blocking your Fedora build you need to patch it manually, as I do for Flathub.

@luyatshimbalanga
Copy link

luyatshimbalanga commented Feb 23, 2020

Even if appstream-glib didn't segfault, the upstream appdata would still be invalid, so if this is blocking your Fedora build you need to patch it manually, as I do for Flathub.

Noted. Manual patch applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants