Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2329

NPE at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:115)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.0, 7.0.2, Freshly, 7.0.6.1
    • Fix Version/s: 7.0.7, 8.0.1
    • Component/s: None
    • Labels:
      None

      Description

      This looks like a race condition from uploading a file while the server is
      on heavy load.
      From what I understand, there were 3 different
      requests sent to the server while uploading the file.

      a) Send content to server
      b) Send status information -> determine upload progress
      c) Send onUpload event when upload has finished

      An ItemFactory will be initiated upon a). In
      AuUploader attributes "Attributes.UPLOAD_PERCENT" and
      "Attributes.UPLOAD_SIZE" are set at line 515 - 518. If the requests for status
      information are processed before these attributes are set (which
      happens from time to time on our server) an exception is triggered at
      line 115 because "size" is null. What is more, there is another potential
      problem with exception handling in line 177 as there is a check on whether
      "percent != null". If the CPU switches from thread (request) in step
      a) in line 516 to thread (request) in step b) only "percent" is !=
      null and "size == null". That means an exception occurred outside the
      try-catch-block.

      This usually results in a failed upload.

      Regards salbader

        Attachments

          Activity

            People

            Assignee:
            jumperchen jumperchen
            Reporter:
            salbader salbader
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h