Uploaded image for project: 'libmusicbrainz'
  1. libmusicbrainz
  2. LMB-32

Ignore unknown nodes when parsing XML responses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.2, 5.0.0
    • Labels:
      None

      Description

      After the latest schema update, a user observed breakage with libmusicbrainz 4.0.1 which goes away when upgrading to 4.0.2 https://bugzilla.redhat.com/show_bug.cgi?id=822177

      16:57 < adhawkins> I wonder if seeing an invalid tag in the XML response stops
      it processing the rest of the entity?
      16:57 < teuf> ah maybe s-j parsing code is too strict
      16:57 < adhawkins> There is a new 'number' tag that is text. 4.0.1 won't know
      what to do with that.
      16:57 < adhawkins> I thought it just emitted an error and then continued, but
      I could be wrong.
      16:58 < adhawkins> Or perhaps the library is getting it wrong if it doesn't
      understand the response.
      16:58 < adhawkins> If you can raise it as a ticket in JIRA with the exact
      query that's being sent, I can investigate.
      16:58 < warp> adhawkins: in general you should ignore unrecognized elements,
      not emit errors
      16:59 < teuf> adhawkins: yeah trying to get this info
      16:59 < adhawkins> warp: Which element is the new 'number' tag part of?
      16:59 < ocharles> <track>
      16:59 < warp> adhawkins: <track>
      16:59 < adhawkins> Ah yes, found it. Looking
      17:00 < adhawkins> I think it'll write to stderr for the unrecognised element,
      but should then continue I'd have thought.
      17:01 < adhawkins> Ah hold on.
      17:01 < kepstin-work> adhawkins: well, boot up an older version of
      libmusicbrainz and give it a try
      17:01 < adhawkins> Looks like some shortcutting might be going on.
      17:01 < adhawkins> Yeah, I think once it sees something it doesn't recognise
      it will ignore everything else.
      17:01 < adhawkins> Not a good plan.
      17:02 < kepstin-work> ouch, that's a nasty bug.
      17:02 < kepstin-work> is that bug still in 4.0.2?
      17:02 < kepstin-work> if so, you really should put out a 4.0.3 with it fixed.
      17:02 < adhawkins> Yes, but 4.0.2 should recognise everything
      17:02 < kepstin-work> not after the next schema change release
      17:02 < adhawkins> I already need to do a 4.0.3 with a fix for the compilation
      error.

        Attachments

          Activity

            People

            • Assignee:
              adhawkins Andy Hawkins
              Reporter:
              teuf Christophe Fergeau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                4.0.2
                5.0.0