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

Can not add component without ID to results set #51

Closed
iainlane opened this issue Aug 7, 2017 · 4 comments
Closed

Can not add component without ID to results set #51

iainlane opened this issue Aug 7, 2017 · 4 comments
Assignees
Labels

Comments

@iainlane
Copy link
Collaborator

iainlane commented Aug 7, 2017

object.Exception@../src/asgen/result.d(130): Can not add component from 'gthumb/3:3.5.1-3ubuntu1/armhf' without ID to results set: [desktop-application::unknown/os/package/(null)]> name: gThumb | summary: Image viewer | package: <none>

I got called by our automated monitoring the middle of the night about this! :)

Not sure what it's trying to tell me?

@ximion
Copy link
Owner

ximion commented Aug 7, 2017

Something went terribly wrong, is what this wants to tell you ^^
A component should always have an ID, and in this case it for some reason didn't get one.

@ximion ximion self-assigned this Aug 7, 2017
@ximion ximion added the bug label Aug 7, 2017
@iainlane
Copy link
Collaborator Author

iainlane commented Aug 7, 2017

Thread 63 "appstream-gener" hit Breakpoint 1, asgen.result.GeneratorResult.addComponent(appstream.Component.Component, immutable(char)[]) (this=0x7fdfcee13300, cpt=0x7fcf77c44880, data=...)
    at result.d:130
130	            throw new Exception ("Can not add component from '%s' without ID to results set: %s".format (this.pkid, cpt.toString));
(gdb) bt
#0  asgen.result.GeneratorResult.addComponent(appstream.Component.Component, immutable(char)[]) (this=0x7fdfcee13300, cpt=0x7fcf77c44880, data=...) at result.d:130
#1  0x000000000053fa42 in asgen.handlers.metainfoparser.parseMetaInfoFile(appstream.Metadata.Metadata, asgen.result.GeneratorResult, const(immutable(char)[])) (mdata=0x7fdfacf78870, 
    res=0x7fdfcee13300, data=...) at metainfoparser.d:52
#2  0x000000000050edee in asgen.extractor.DataExtractor.processPackage(asgen.backends.interfaces.Package) (this=0x7fffffffdd68, pkg=0x7fdfe2412600) at extractor.d:96
#3  0x00000000004f9fe4 in asgen.engine.Engine.processPackages(asgen.backends.interfaces.Package[], asgen.handlers.iconhandler.IconHandler).__foreachbody3(ref asgen.backends.interfaces.Package) (
    pkg=<optimized out>) at engine.d:136
#4  0x00000000004ffdb6 in std.parallelism.ParallelForeach!(asgen.backends.interfaces.Package[]).ParallelForeach.opApply(scope int(ref asgen.backends.interfaces.Package) delegate).doIt() ()
    at /usr/lib/ldc/x86_64-linux-gnu/include/d/std/parallelism.d-mixin-3785:3829
#5  0x00007ffff5b6dc79 in std.parallelism.TaskPool.executeWorkLoop() () from /usr/lib/x86_64-linux-gnu/libphobos2-ldc.so.71
#6  0x00007ffff5616098 in thread_entryPoint () from /usr/lib/x86_64-linux-gnu/libdruntime-ldc.so.71
#7  0x00007ffff4b456ba in start_thread (arg=0x7fdfacf7a700) at pthread_create.c:333
#8  0x00007ffff50d23dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

@iainlane
Copy link
Collaborator Author

iainlane commented Aug 7, 2017

laney@nightingale> dpkg --fsys-tarfile gthumb_3%3a3.5.1-3ubuntu1_amd64.deb | tar xO- ./usr/share/metainfo/gthumb.appdata.xml                                                                   ~/temp
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
  <summary>Image viewer</summary>
  <name>gThumb</name>
  <x-launchable type="desktop-id">gthumb.desktop</x-launchable>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-2.0+</project_license>
  <description>
    <p>
      gThumb is an image viewer, editor, browser and organizer.  It is designed
      to be well integrated with the GNOME 3 desktop.
    </p>
    <p>
      As an image viewer gThumb allows to view common image file formats
      such as BMP, JPEG, GIF (including the animations), PNG, TIFF, TGA and
      RAW images.
      It is also possible to view various metadata types embedded inside an
      image such as EXIF, IPTC and XMP.
    </p>
    <p>
      As an image editor gThumb allows to scale, rotate and crop the images;
      change the saturation, lightness, contrast as well as other color
      transformations.
    </p>
    <p>
      As an image browser gThumb shows the thumbnails of the images saved on
      your disk, allows to perform the common operations of a file manager such
      as copy, move and delete files and folders.
      Furthermore there is a series of image specific tools such as JPEG
      lossless transformations; image resize; format conversion; slideshow;
      setting an image as desktop background and several others.
    </p>
    <p>
      As an image organizer gThumb allows to add comments and other metadata to
      images; organize images in catalogs and catalogs in libraries; search
      for images and save the result as a catalog.
    </p>
  </description>
  <screenshots>
    <screenshot type="default">
       <image>https://git.gnome.org/browse/gthumb/plain/data/appdata/ss-browser.png</image>
    </screenshot>
    <screenshot>
       <image>https://git.gnome.org/browse/gthumb/plain/data/appdata/ss-viewer.png</image>
    </screenshot>
  </screenshots>
  <url type="homepage">https://wiki.gnome.org/Apps/gthumb</url>
  <update_contact>paobac_at_src.gnome.org</update_contact>
  <x-kudos>
    <kudo>AppMenu</kudo>
    <kudo>HiDpiIcon</kudo>
    <kudo>ModernToolkit</kudo>
    <kudo>UserDocs</kudo>
  </x-kudos>
  <project_group>GNOME</project_group>
  <translation type="gettext">gthumb</translation>
</component>
laney@nightingale> appstream-util validate-strict gthumb.appdata.xml
gthumb.appdata.xml: 
(appstream-util:4745): GLib-CRITICAL **: g_str_has_suffix: assertion 'str != NULL' failed
FAILED:
• markup-invalid        : <id> does not have correct extension for kind
• value-missing         : <!-- Copyright [year] [name] --> is not present
• tag-invalid           : XML data contains unknown tag
• tag-missing           : <id> is not present
• style-invalid         : Too many <p> tags for a good description [5/4]
• translations-required  : <name> has no translations
• translations-required  : <summary> has no translations
• translations-required  : <description> has no translations
Validation of files failed
laney@nightingale> appstreamcli validate gthumb.appdata.xml
Validation was successful.

@ximion
Copy link
Owner

ximion commented Aug 7, 2017

FTR (since Laney is sitting right next to me): The validation issue is a bugg in AppStream itself, which has just now been fixed, while asgen also should have detected this earlier and should have failed with the right error, instead of asserting later.

@ximion ximion closed this as completed in 3895b90 Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants