Ticket #254 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

sentBytes and totalBytes not matching when uploading a zip file

Reported by: kmaclean Owned by: kmaclean
Priority: minor Milestone: SpeechSubmission 0.1.8
Component: SpeechSubmission Version: Website 0.2
Keywords: Cc:

Description (last modified by kmaclean) (diff)

get this message in java console when uploading a file:

setProgress(): Not reached end yet. sentBytes=218112, totalBytes=49152
setProgress(): Not reached end yet. sentBytes=219136, totalBytes=49152
setProgress(): Not reached end yet. sentBytes=220160, totalBytes=49152
HTTP/1.1 100 Continue


setProgress(): Not reached end yet. sentBytes=221162, totalBytes=49152

see ticket #251

The only effect seems to be that the user is sent to endpage.php prematurally, and maybe that the upload bar shows completed before it actually is.

Change History

comment:1 Changed 12 years ago by kmaclean

  • Priority changed from major to minor
  • Version changed from 0.1-alpha to Website 0.2
  • Component changed from Acoustic Model to SpeechSubmission
  • Milestone set to SpeechSubmission 0.2

comment:2 Changed 12 years ago by kmaclean

  • Description modified (diff)

Here is the setProgress method (from CapturePlayBack?):

    // Methods called by the "postlet" UploadManager and UploadThread
    public synchronized void setProgress(int a) {
        sentBytes += a;
        progBar.setValue(sentBytes);
        if (sentBytes == totalBytes){
            //DEL progCompletion.setText(pLabels.getLabel(2));
            if (endPageURL != null){
                progBar.setString("Upload completed... Thank you for your submission!");
                progBar.setIndeterminate(false);
                System.err.println("Finished! Sending you on to "+endPageURL);
                ((JApplet)(getParent().getParent().getParent().getParent())).getAppletContext().showDocument(endPageURL);
            } else {
                // Just ignore this error, as it is most likely from the endpage
                // not being set.
                // Attempt at calling Javascript after upload is complete.
//FORDEBUG
                System.err.println("setProgress(): endPageURL is null, so trying to use the javascript hook to end.");
                JSObject win = (JSObject) JSObject.getWindow((JApplet)getParent());
                win.eval("postletFinished();");
            }
            // Reset the applet
            progBar.setValue(0);
          //  if(subject != null) { // Will be non-null if passed in as a param - even if blank
          //    subjectBox.setEnabled(true);
          //  }
        } else {
//FORDEBUG
           System.err.println("setProgress(): Not reached end yet. sentBytes="+sentBytes+", totalBytes="+totalBytes);
        }
     }

comment:3 Changed 12 years ago by kmaclean

This is likely caused by the fact that CapturePlayback? is only using the last audio file recorded (or played?) to calculate totalBytes.

comment:4 Changed 12 years ago by kmaclean

  • Description modified (diff)

comment:5 Changed 12 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in ticket #251

comment:6 Changed 12 years ago by kmaclean

  • Milestone changed from SpeechSubmission 0.1.7 to SpeechSubmission 0.1.5
Note: See TracTickets for help on using tickets.