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

appstream-util validate crashes on a certain file #273

Closed
Exalm opened this issue Apr 25, 2020 · 4 comments
Closed

appstream-util validate crashes on a certain file #273

Exalm opened this issue Apr 25, 2020 · 4 comments

Comments

@Exalm
Copy link

Exalm commented Apr 25, 2020

 ~/Projects/gnome-games/data  appstream-util validate org.gnome.Games.appdata.xml   
org.gnome.Games.appdata.xml: zsh: segmentation fault (core dumped)  appstream-util validate org.gnome.Games.appdata.xml
#0  0x00007ffff7a70525 in __strlen_avx2 () at /lib64/libc.so.6
#1  0x00007ffff797b9ee in __vfprintf_internal () at /lib64/libc.so.6
#2  0x00007ffff798d705 in __vasprintf_internal () at /lib64/libc.so.6
#3  0x00007ffff7e9cae3 in g_vasprintf () at /lib64/libglib-2.0.so.0
#4  0x00007ffff7e72e31 in g_strdup_vprintf () at /lib64/libglib-2.0.so.0
#5  0x00007ffff7e3b43b in g_error_new_valist () at /lib64/libglib-2.0.so.0
#6  0x00007ffff7e3b81f in g_set_error () at /lib64/libglib-2.0.so.0
#7  0x00007ffff7f66250 in as_node_get_localized_unwrap () at /lib64/libappstream-glib.so.8
#8  0x00007ffff7f6b5c4 in as_release_node_parse () at /lib64/libappstream-glib.so.8
#9  0x00007ffff7f51c97 in as_app_node_parse_full () at /lib64/libappstream-glib.so.8
#10 0x00007ffff7f52dc7 in as_app_parse_data () at /lib64/libappstream-glib.so.8
#11 0x00007ffff7f53306 in as_app_parse_file () at /lib64/libappstream-glib.so.8
#12 0x0000555555560e7a in as_util_validate_files ()
#13 0x000055555555cfde in main ()

The file (org.gnome.Games.appdata.xml):

<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015 Adrien Plazas -->
<component type="desktop-application">
  <id>org.gnome.Games</id>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
  <name>Games</name>
  <summary>Simple game launcher for GNOME</summary>

  <description>
    <p>
      Games is a GNOME 3 application to browse your video games library and to
      easily pick and play a game from it. It aims to do for games what Music
      already does for your music library.
    </p>
    <p>
      You want to install Games if you just want a very simple and comfortable
      way to play your games and you don’t need advanced features such as
      speedrunning tools or video game development tools.
    </p>
    <p>Features:</p>
    <ul>
      <li>List your installed games, your Steam games, your game ROMs…</li>
      <li>Search in your games collection</li>
      <li>Play your games</li>
      <li>Resume your game to where you left it</li>
    </ul>
  </description>

  <screenshots>
    <screenshot type="default">
      <image width="800" height="450">https://gitlab.gnome.org/GNOME/gnome-games/raw/master/data/appdata/3-30-games-search.png</image>
    </screenshot>
    <screenshot>
      <image width="800" height="450">https://gitlab.gnome.org/GNOME/gnome-games/raw/master/data/appdata/3-30-platforms-steam.png</image>
    </screenshot>
    <screenshot>
      <image width="800" height="450">https://gitlab.gnome.org/GNOME/gnome-games/raw/master/data/appdata/3-30-retro-resume.png</image>
    </screenshot>
    <screenshot>
      <image width="800" height="450">https://gitlab.gnome.org/GNOME/gnome-games/raw/master/data/appdata/3-30-gamepad-test.png</image>
    </screenshot>
  </screenshots>

  <releases>
    <release version="3.37.1" type="development" date="2020-04-25" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Support running Nintendo 64 games</li>
            <ul>
              <li>Show a menu for switching controller expansion paks</li>
            </ul>
          <li>Run games in a secondary process</li>
          <li>Show an error if a game crashes</li>
          <li>Cache collection in the database, dramatically improving loading times after the first run</li>
          <li>Speed up and reenable MAME plugin</li>
          <li>Cache game icons</li>
          <li>Add a search provider for GNOME Shell</li>
          <li>Add screen gap for Nintendo DS games when using top/bottom layout</li>
            <ul>
              <li>Optimize the gap width for 15 known games, use 80px for others</li>
            </ul>
          <li>Disable keyboard gamepad emulation for MS-DOS games, as most games use keyboard</li>
            <ul>
              <li>Physical gamepads are still recognized as gamepads</li>
            </ul>
          <li>Ask for confirmation when trying to restart a game that doesn't support snapshots</li>
          <li>Show a message when there are no search results</li>
          <li>Prevent headerbar from hiding while there are open popovers</li>
          <li>Show a warning when Tracker is not present</li>
          <li>Show analog sticks in controller preferences as moving dots, animate them in mapping mode</li>
          <li>Support back swipe:</li>
            <ul>
              <li>In platforms view in mobile mode</li>
              <li>In preferences window in mobile mode</li>
              <li>In controller preferences</li>
            </ul>
          <li>Switch to HdyWindow, allowing round bottom corners</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Ensure analog works for pcsx_rearmed core</li>
          <li>Ensure loading notification is shown after unpausing</li>
          <li>Correctly create version file for 3.34.0 savestate migration</li>
          <li>Stop recalculating game titles when they're already cached</li>
          <li>Don't show headerbar menus for unsupported games</li>
          <li>Grab game view focus immediately after running a game</li>
          <li>Stop counting files like GameSomething.jpg as covers for Game.rom</li>
          <li>Don't open files when a game is already running</li>
          <li>Fix --help command line option output</li>
          <li>Use display name instead of basename for user-facing strings</li>
          <li>Stop translating internal errors that are never shown in the UI</li>
          <li>Stop listing application/x-desktop MIME type in desktop file</li>
          <li>Stop using core descriptor as URI for standalone libretro games</li>
        </ul>
        <p>Translation updates.</p>
      </description>
    </release>
    <release version="3.35.90" type="development" date="2020-02-03" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Allow to restart the current game from secondary menu</li>
          <li>Rename savestates to snapshots</li>
          <li>Rename backup to export, restore to import</li>
          <li>Add a nightly icon</li>
          <li>Present sidebar as a content list in mobile mode</li>
          <li>Tweak lists: make them rounded, add separators and use thicker rows</li>
          <li>Use darker colors for the main window, matching other content apps</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Make controller use JOYPAD type regardless of having analog sticks</li>
          <li>Fix a runtime warning when starting standalone games</li>
          <li>Restore state and memory before running the first frame</li>
          <li>Fix a runtime error when loading a snapshot migrated from 3.32.x</li>
          <li>Don't allow type-to-search and Ctrl+F shortcuts with empty collection</li>
          <li>Fix libhandy and rsvg deprecations</li>
        </ul>
        <p>Translation updates.</p>
      </description>
    </release>
    <release version="3.35.2" type="development" date="2019-11-22" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Collection should now load faster and with less UI stuttering:
            <ul>
              <li>Collection and cover loading are now threaded instead of using Vala's async functions</li>
              <li>Game runners are now created on demand when starting a game</li>
              <li>Steam plugin was simplified and should work a bit faster</li>
            </ul>
          </li>
          <li>New-style vertical covers are now supported for Steam games</li>
          <li>List savestate shortcuts in shortcuts dialog</li>
          <li>Use shorter date formats for savestates when possible</li>
          <li>Fix a grammar issue</li>
          <li>Stop styling Restore button in fullscreen mode</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Don't show Steam tools, such as Proton, as games</li>
          <li>Skip junk files when migrating savestates from 3.32 or earlier</li>
          <li>MAME plugin now builds</li>
          <li>Fixed pointer input not working until saving the game</li>
          <li>Save directory is now properly loaded after a reset</li>
          <li>Nintendo DS screen mode is now reset to vertical after a reset</li>
          <li>Fixed opening savestate manager with GTK animations disabled</li>
          <li>Ensure bottom bar is always shown or hidden correctly on mobile</li>
          <li>Appdata now validates in strict mode</li>
        </ul>
        <p>Translation updates.</p>
      </description>
    </release>
    <release version="3.34.0" type="stable" date="2019-09-09" urgency="medium">
      <description>
        <p>Translation updates.</p>
      </description>
    </release>
    <release version="3.33.92" type="development" date="2019-09-02" urgency="medium">
      <description>
        <p>Fixes:</p>
        <ul>
          <li>Missing savestate thumbnails don't corrupt UI anymore</li>
          <li>Media button doesn't steal focus from the game anymore</li>
          <li>Miscellaneous UI fixes</li>
        </ul>
      </description>
    </release>
    <release version="3.33.91" type="development" date="2019-08-17" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Manually created savestates can be renamed now</li>
          <li>Nintendo DS screen layout settings are now stored inside savestates instead of dconf</li>
          <li>Added shortcuts for saving and loading the game, and for showing savestates</li>
          <li>Creating a new savestate briefly flashes the game, similarly to screenshots</li>
          <li>Creation and deletion of savestate rows is now anumated</li>
          <li>Added keyboard navigation in the savestates sidebar:
            <ul>
              <li>Selecting a row immediately previews the savestate</li>
              <li>Pressing Enter loads the savestate</li>
              <li>Pressing Delete deletes the savestate</li>
              <li>Pressing Esc closes the sidebar</li>
            </ul>
          </li>
          <li>When opening savestates sidebar, the game view cannot change height anymore</li>
          <li>Covers and savestate thumbnails aren't blurry on HiDPI anymore</li>
          <li>Sync fullscreen restore button style with Adwaita, making it smaller and round</li>
          <li>Preferences window now has a Back button when the window is small</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Headerbar autohide in fullscreen works properly now</li>
          <li>Keyboard shortcuts don't depend on keyboard layout anymore</li>
          <li>Savestate thumbnails now use correct aspect ratio for newly created savestates</li>
          <li>Creating multiple savestates in one second doesn't result in an error anymore</li>
          <li>Fixed a few runtime errors when working with savestates</li>
          <li>Fixed crash when opening multliple Nintendo DS games in a row</li>
          <li>Savestates created by closing window with savestate sidebar have correct thumbnail now</li>
          <li>New savestate row in savestate sidebar cannot be selected anymore</li>
          <li>Opening savestate sidebar shifts the game in the correct direction on RTL</li>
          <li>Game covers have proper colors now instead of being 10% darker</li>
        </ul>
      </description>
    </release>
    <release version="3.33.90" type="development" date="2019-08-11" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Support multiple savestates for libretro games</li>
          <li>Only show fullscreen headerbar when cursor is nearby, sync behavior with libdazzle</li>
          <li>Hide cursor after a timeout in non-fullscreen mode</li>
        </ul>
      </description>
    </release>
    <release version="3.33.4" type="development" date="2019-07-20" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Center headerbar title in adaptive mode</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Explicitly specify 'm' dependency</li>
        </ul>
      </description>
    </release>
    <release version="3.33.3" type="development" date="2019-06-21" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Main window is now fully adaptive</li>
          <li>Added dropdown arrow to media switcher button to match Nintendo DS screen layout switcher</li>
          <li>Removed unused subtitles from collection</li>
          <li>Increased padding on platforms sidebar items</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Fixed backup/restore skipping empty directories</li>
        </ul>
      </description>
    </release>
    <release version="3.33.2" type="development" date="2019-05-24" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Remove Developers view</li>
          <li>Add backup and restore functions</li>
          <li>List Nintendo DS shortucts in shortcuts dialog</li>
          <li>Add mnemonics to primary menu</li>
          <li>Use adaptive view switcher in collection</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Fixed error infobar being visible on empty collection screen</li>
          <li>Pressing Enter key twice immediately after starting a game from a file doesn't exit the game anymore</li>
        </ul>
      </description>
    </release>
    <release version="3.33.1" type="development" date="2019-04-23" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Allow to change screen layouts for Nintendo DS games when using DeSmuME and DeSmuME 2015 cores</li>
          <li>Replace plugin list in preferences by platform list, and allow to select libretro cores to be used for each platform</li>
          <li>Show an error when trying to open a non-game file</li>
          <li>Use a better icon for missing game thumbnails</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>Help doesn't show up as a game anymore</li>
        </ul>
      </description>
    </release>
    <release version="3.32.0" type="stable" date="2019-03-10" urgency="medium">
      <description>
        <p>Improvements:</p>
        <ul>
          <li>Collection loading is now paused in game, leading to vastly improved performance when opening a game from file manager</li>
          <li>Disable MAME plugin because of major performance and reliability problems</li>
          <li>Revert to non-portal file chooser for Flatpak, to allow adding games consisting of multiple files</li>
          <li>Update primary menu layout according to app menu retirement initiative</li>
          <li>Allow to switch between gamepad and keyboard input in standalone Libretro games</li>
          <li>New application icons from GNOME Design team, symbolic icon is now used for HighContrast</li>
          <li>Many refinements in preferences window</li>
        </ul>
        <p>Fixes:</p>
        <ul>
          <li>It's not possible to open multiple main windows anymore</li>
          <li>Binding directional pads should work for more gamepads now</li>
          <li>Keyboard doesn't control every player in multiplayer games anymore</li>
          <li>Invalid discs in PlayStation disc selector are now disabled</li>
          <li>Quit dialog now actually appears when exiting a game that doesn't support snapshots</li>
          <li>Opening a game by double-clicking while another game is running now quits the previous game correctly</li>
          <li>Database file is now correctly created even if data directory didn't exist</li>
          <li>During search, developers and platforms without any games to show are now hidden</li>
          <li>Steam plugin reliability improvements</li>
        </ul>
      </description>
    </release>
  </releases>

  <provides>
    <binary>gnome-games</binary>
  </provides>

  <launchable type="desktop-id">org.gnome.Games.desktop</launchable>
  <url type="homepage">https://wiki.gnome.org/Apps/Games</url>
  <url type="bugtracker">https://gitlab.gnome.org/GNOME/gnome-games/issues</url>
  <url type="donation">http://www.gnome.org/friends/</url>
  <url type="translate">https://wiki.gnome.org/TranslationProject</url>
  <project_group>GNOME</project_group>
  <developer_name>The GNOME Project</developer_name>
  <update_contact>kekun.plazas_at_laposte.net</update_contact>
  <translation type="gettext">org.gnome.Games</translation>

  <content_rating type="oars-1.1">
    <content_attribute id="violence-cartoon">none</content_attribute>
    <content_attribute id="violence-fantasy">none</content_attribute>
    <content_attribute id="violence-realistic">none</content_attribute>
    <content_attribute id="violence-bloodshed">none</content_attribute>
    <content_attribute id="violence-sexual">none</content_attribute>
    <content_attribute id="violence-desecration">none</content_attribute>
    <content_attribute id="violence-slavery">none</content_attribute>
    <content_attribute id="violence-worship">none</content_attribute>
    <content_attribute id="drugs-alcohol">none</content_attribute>
    <content_attribute id="drugs-narcotics">none</content_attribute>
    <content_attribute id="drugs-tobacco">none</content_attribute>
    <content_attribute id="sex-nudity">none</content_attribute>
    <content_attribute id="sex-themes">none</content_attribute>
    <content_attribute id="sex-homosexuality">none</content_attribute>
    <content_attribute id="sex-prostitution">none</content_attribute>
    <content_attribute id="sex-adultery">none</content_attribute>
    <content_attribute id="sex-appearance">none</content_attribute>
    <content_attribute id="language-profanity">none</content_attribute>
    <content_attribute id="language-humor">none</content_attribute>
    <content_attribute id="language-discrimination">none</content_attribute>
    <content_attribute id="social-chat">none</content_attribute>
    <content_attribute id="social-info">none</content_attribute>
    <content_attribute id="social-audio">none</content_attribute>
    <content_attribute id="social-location">none</content_attribute>
    <content_attribute id="social-contacts">none</content_attribute>
    <content_attribute id="money-purchasing">none</content_attribute>
    <content_attribute id="money-gambling">none</content_attribute>
  </content_rating>
</component>
@Exalm
Copy link
Author

Exalm commented Apr 25, 2020

appstream-util 0.7.17, Fedora 32.

@Exalm
Copy link
Author

Exalm commented Apr 25, 2020

Looks like it's fixed in 0.7.18 from org.gnome.Sdk//master:

org.gnome.Games.appdata.xml: failed to parse org.gnome.Games.appdata.xml: Tag ul in ul invalid

@Exalm Exalm closed this as completed Apr 25, 2020
@ximion
Copy link
Owner

ximion commented Apr 25, 2020

Very good!
Despite the name, appstream-util is not from the AppStream project though, the similar tool from the AppStream project is called appstreamcli. If you want to report a bug against appstream-util in future, please go to https://github.com/hughsie/appstream-glib :-)

@Exalm
Copy link
Author

Exalm commented Apr 25, 2020

Oh. Thanks, good to know!

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

2 participants