Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-10712

SLog2InfoRunner does not display slog2 messages for processes with long names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 3.0.0-rc1
    • Qt Creator 3.0.0-rc1
    • QNX Support
    • None

    Description

      How to reproduce:
      1) Have a BB10 application with bar-descriptor.xml that has 'id' tag containing a 50-char long name e.g. ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx
      2) Run the application and see if the slog2info messages are printed.

      Expected behavior:
      Messages are printed as usual.

      Actual behavior:
      Messages are not printed.

      Evaluation:

      The issue is caused by incorrect evaluation of ApplicationID. The ApplicationID is resolved by BlackBerryProcessParser class when searching for pattern:

      Info: Launching APPLICATIONID...
      

      This is incorrect since the APPLICATIONID printed during launch command is not the real application name. It seems that only first 63 characters are correct - the rest is a hash of previous letters.

      This incorrectly resolved APPLICATIONID is then used for slog2info using:

      slog2info -w -b APPLICATIONID
      

      which filters all messages out because there is no matching APPLICATIONID in the log.

      1. Example - corrently handled:

      When a packageName is ABCDEFGHIJKLMNOPQRSTUVWXYZ, then blackberry-nativepackager creates a packageId e.g. testDev_nopq and then the log entry is:

      Nov 08 15:07:29.965 ABCDEFGHIJKLMNOPQRSTUVWXYZ.testDev_PQRSTUVWXYZd0831ad_.131227885                           0  -----ONLINE-----
      

      but the launching sequence is:

      Info: Sending request: LAUNCH
      Info: Action: Launch
      Info: Launching ABCDEFGHIJKLMNOPQRSTUVWXYZ.testDev_PQRSTUVWXYZd0831ad_...
      result::131227885
      Info: done
      

      Then the resolved ApplicationID is: ABCDEFGHIJKLMNOPQRSTUVWXYZ.testDev_PQRSTUVWXYZd0831ad_ and is used by SLog2InfoRunner class for filtering and messages are correctly printed.

      2. Example - incorrectly handled:

      When a packageName is ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx, then blackberry-nativepackager creates a packageId e.g.

      Nov 08 15:10:24.964 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx.testDev_nopq.144978160                           0  -----ONLINE-----
      

      but the launching sequence is:

      Info: Sending request: LAUNCH
      Info: Action: Launch
      Info: Launching ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx.testDev_nopqrstuvwxcffc439_...
      result::144978160
      Info: done
      

      Then the resolved ApplicationID is: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx.testDev_nopqrstuvwxcffc439_ and is used by SLog2InfoRunner class for filtering.

      But this is not correct since the log entry is using different ApplicationID in the output aka this:
      ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx.testDev_nopqrstuvwxcffc439_
      but expected is:
      ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx.testDev_nopq.144978160

      Solution:
      APPLICATIONID should be at maximum 63 letters long the rest should be cut.

      Attachments

        Activity

          People

            mfekari Mehdi Fekari
            dkaspar David Kaspar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: