Bug #759

Progress bar does not recover after exception

Added by Rob Baer almost 4 years ago. Updated about 2 years ago.

Status:In ProgressStart date:03/15/2015
Priority:NormalDue date:
Assignee:Joel Palmius% Done:

90%

Category:Code correctness
Target version:MakeHuman 1.1.2

Description

Windows 8.1 r1742

This distantly related to closed issue #702, and more recent issues 685, and 723. I file separately to cleanly separate code consequences from asset management issues.

Steps to reproduce:
1. Start MH 1.0.2 and Geometry > Clothes > long_tshirt
2. save the human as .mhm
3. Start MH1742 and load the human just saved
4. Notice that the progres bar gets stuck part way across although the process completes with appropriate uuid warnings to the logs

All general functionality of the program seems generally available so I interpret this to be a failure of the progress bar to reset after the exception that happens.

Hitting general reset causes the progress bar to move from 15% to 19% in this reproducible example. (Percents will differ with other old asset .mhm file but the progress bar will hang)

Loading a different asset after the progress bar freeze causes the progress bar to max at 19%. If you reload the long_tshirt.mhm, 15% will become the max for all subsequent loads of any .mhm file. Still program functionality seems fine - i.e., it's a progress bar issue.

screenshot_1_1426439520.png (137 KB) Rob Baer, 03/15/2015 06:15 PM

screenshot_1_1426559319.png (124 KB) Rob Baer, 03/17/2015 03:31 AM

makehuman-debug.txt Magnifier (2.03 KB) Rob Baer, 03/17/2015 03:37 AM

makehuman.log (34.6 KB) Rob Baer, 03/17/2015 03:37 AM

python_err.txt Magnifier (16.7 KB) Rob Baer, 03/17/2015 03:37 AM

screenshot_1_1426641842.png (160 KB) Rob Baer, 03/18/2015 02:27 AM

makehuman-debug.txt Magnifier (2.03 KB) Rob Baer, 03/18/2015 02:27 AM

makehuman.log (52.4 KB) Rob Baer, 03/18/2015 02:27 AM

python_err.txt Magnifier (25.8 KB) Rob Baer, 03/18/2015 02:27 AM

708
712
717

Associated revisions

1745:d9fb3db30a50
Added by Jonas Hauquier almost 4 years ago

Reset progress bar on failed event. Fixes #759

8d6c2b01
Added by tracker_test_user (Forum User) almost 4 years ago

Reset progress bar on failed event. Fixes #759

History

#1 Updated by Jonas Hauquier almost 4 years ago

Indeed, that's a long standing problem.

#2 Updated by Rob Baer almost 4 years ago

  • Assignee set to Thanasis Papoutsidakis

Assigning to Thanasis as I believe he did a lot of this, and with the hope he has a spare moment!

#3 Updated by Jonas Hauquier almost 4 years ago

This is more general to the event handling code in Qt.
I doubt Thanasis currently has time.

#4 Updated by Thanasis Papoutsidakis almost 4 years ago

I'm aware of it, and if I remember correctly it is not an easy fix. I indeed have no spare time currently though.

Oh, by the way, hi guys. :)

#5 Updated by Jonas Hauquier almost 4 years ago

Hi Thanasis :)

I think it might be solvably by putting a try/finally around every qt event handler, and resetting the progress bar in the finally block.
I'd need to look at the code to know for sure. We have a generalized way of handling events, so I hope that it can be changed in one place.

EDIT: I believe in:
File "./core/events3d.py", line 212, in callEvent

#6 Updated by Jonas Hauquier almost 4 years ago

  • Status changed from New to Fix exists, needs testing
  • % Done changed from 0 to 90

Applied in changeset commit:makehuman_hg|d9fb3db30a50.

#7 Updated by Thanasis Papoutsidakis almost 4 years ago

Simpler than I thought, thanks.

#8 Updated by Rob Baer almost 4 years ago

Unfortunately, the load still causes progress bar freeze with r1746 so fix does not seem complete:

Logs attached.

#9 Updated by Jonas Hauquier almost 4 years ago

Errors probably need to be caught on any event handler depth, the exceptions do not propagate.

#10 Updated by Jonas Hauquier almost 4 years ago

Applied in changeset commit:makehuman_hg|c1798fe98981.

#11 Updated by Jonas Hauquier almost 4 years ago

Try r1747

#12 Updated by Rob Baer almost 4 years ago

Rob Baer wrote:

Hitting general reset causes the progress bar to move from 15% to 19% in this reproducible example. (Percents will differ with other old asset .mhm file but the progress bar will hang)

At r1747 the inital bar arrest at 15% seems fixed, but the halt at 19% follows when loading the very next .mhm file. Updated logs attached.

#13 Updated by Aranuvir # over 2 years ago

  • Target version set to MakeHuman 1.1.1

#14 Updated by Joel Palmius about 2 years ago

  • Assignee changed from Thanasis Papoutsidakis to Joel Palmius

All in all, we should try to implement a global management of exceptions. Currently, many crashes are not visible to the users, which is confusing.

Python 2.7 supports sys.excepthook for managing all unhandled exceptions. In this routine we could a) show a more visible notification to the user and b) reset the progress bar.

#15 Updated by Joel Palmius about 2 years ago

  • Status changed from Fix exists, needs testing to In Progress
  • Target version changed from MakeHuman 1.1.1 to MakeHuman 1.1.2

The apparent fix is too intrusive to do anything about right now.

#16 Updated by Rob Baer about 2 years ago

I think Thanasis Papoutsidakis did most of the original work on the progress bar. He got busy enough with other things to disengage from MH, but I seem to remember he left some TODO notes on the progress bar related to that project somewhere. I just can't recall where.

If exception handling is to be centralized, this might even be pushed to 1.2 as a target.

If we can't find same perhaps its worth contacting him.

Also available in: Atom