Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28259

Memory map plugin fails when Linker Command FIle is not UTF-8 (Texas Instruments) (case 12990 Praqma)

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • memory-map-plugin
    • None
    • jenkins 1.6.12, memory-map-plugin 1.02

      Steps to reproduce:

      • use a Linker command file that contains umlauts like öäü
      • save it as with this encoding: cp1252
      • run a build with jenkins
      • now you'll see that jenkins will fail, because it opens the command file as utf-8 and will fail to decode the umlauts

      Background:
      Texas Instruments C6000 Code generation tools Version 6.1.x can't even use utf-8 encoded linker command files, the linker will fail.

      Possible solutions:

      • add some magic to determine the command file encoding
      • let the user define the encoding
      • use the systems default encoding ( java:Charset.defaultCharset() )
      • try utf-8 and ascii (attached patch, low quality, just as a idea)

          [JENKINS-28259] Memory map plugin fails when Linker Command FIle is not UTF-8 (Texas Instruments) (case 12990 Praqma)

          Bue Petersen added a comment -

          Hi Florian

          Thanks for the report, and the suggestions (and patch).

          I think we prefer to determine the encoding automatically for the files, as this would create the best user experience (if we can always do it correctly!).
          Alternatively we could use the system default encoding, but the build slaves on Jenkins might be different from the developers environments, so a failback solution is your suggestion 4.

          Does that patch solve your problem?
          We would be very happy to accept a pull request, or patch for the problem, but we would also like some tests added as part of the change.

          We are maintaining the plugin through Joint Open Source Roadmap Alliance (josra.org), and there is a roadmap for the plugin with very interesting new features on the way

          https://trello.com/b/eOsTMooO/memory-map-plugin-for-jenkins-ci

          Bue Petersen added a comment - Hi Florian Thanks for the report, and the suggestions (and patch). I think we prefer to determine the encoding automatically for the files, as this would create the best user experience (if we can always do it correctly!). Alternatively we could use the system default encoding, but the build slaves on Jenkins might be different from the developers environments, so a failback solution is your suggestion 4. Does that patch solve your problem? We would be very happy to accept a pull request, or patch for the problem, but we would also like some tests added as part of the change. We are maintaining the plugin through Joint Open Source Roadmap Alliance (josra.org), and there is a roadmap for the plugin with very interesting new features on the way https://trello.com/b/eOsTMooO/memory-map-plugin-for-jenkins-ci

          Hi Bue!

          Of course the automatical way would be the best solution, but guessing a text file's encoding isn't allways an easy task.

          Yes, the (ugly)patch solves my problem: if utf-8 fails, just retry with cp1252 (in my description i wrote ascii, but "cp1252 != ascii"). This works only because i know it's cp1252 (we're developing on Windows for C6000). But i guess there are other combinations that won't be covered by that fix/fallback.

          Thx for the roadmap link!

          Florian Reinhard added a comment - Hi Bue! Of course the automatical way would be the best solution, but guessing a text file's encoding isn't allways an easy task. Yes, the (ugly)patch solves my problem: if utf-8 fails, just retry with cp1252 (in my description i wrote ascii, but "cp1252 != ascii"). This works only because i know it's cp1252 (we're developing on Windows for C6000). But i guess there are other combinations that won't be covered by that fix/fallback. Thx for the roadmap link!

          Bue Petersen added a comment -

          We moved to use github issue, continue in https://github.com/Praqma/memory-map-plugin/issues/32

          Bue Petersen added a comment - We moved to use github issue, continue in https://github.com/Praqma/memory-map-plugin/issues/32

            praqma Praqma Support
            freinhard Florian Reinhard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: