Uploaded image for project: 'Minecraft Launcher'
  1. Minecraft Launcher
  2. MCL-4

Launcher "fatal error 4 (null)" error - fix included

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 0.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, Windows (this is not platform-specific)
    • Confirmation Status:
      Unconfirmed

      Description

      See also MC-431, which was wrongly closed as "not a bug".

      There is indeed a bug in the launcher, as a quick decompile of the launcher JAR shows. See this code around line 454 of GameUpdater, in the downloadJars() method:

      str1 = localURLConnection.getHeaderField("ETag");
      str1 = str1.substring(1, str1.length() - 1);
      

      The code blindly assumes that the HTTP response header always contains an ETag field, which is not necessarily true. This tag is often stripped by HTTP proxies.

      Very easily fixed by adding a "if (str1 != null)" test to line 454 (note that str1 is later compared with null in the method so it's safe to continue with it set to null).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                desht Des Herriott
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: