Bug #593

OSX: MH GUI startup broken (crashes)

Added by Jonas Hauquier about 4 years ago. Updated about 4 years ago.

Status:FixedStart date:10/20/2014
Priority:NormalDue date:
Assignee:Jonas Hauquier% Done:

90%

Category:-
Target version:MakeHuman 1.1.0

Description

From Francois by mail:

I generally use 1.0.2, but today I tried the latest nightly of 1.1.0, 
and it just crashes on startup. The entire UI comes up, but the OpenGL 
window is white for about half a second, then crashes… This is followed 
by a dialog saying ‘a graphics problem has been detected’. Based on what 
I’m seeing, my first suspicion would be something to do with how the 
window’s being initialised.


Related issues

Related to MakeHuman - Bug #564: Viewport misbehaving on startup Fixed 10/12/2014
Related to MakeHuman - Bug #608: MH unstable not possible to fully start under KVM Fixed 10/26/2014

Associated revisions

1470:7a655e290dd9
Added by Jonas Hauquier over 4 years ago

Make more effort to keep splash screen raised above main window. Explicitly hide main window until loading is finished. This will require testing on all platforms.

1596:6a8dcc53e918
Added by Jonas Hauquier about 4 years ago

Resolve crash on startup on OSX, Fix issue #593

7ac1da3b
Added by tracker_test_user (Forum User) about 4 years ago

Resolve crash on startup on OSX, Fix issue #593

1597:eee940a56341
Added by Jonas Hauquier about 4 years ago

Undo experiment: do not set splash screen to modal, fixing some warnings

History

#1 Updated by Jonas Hauquier about 4 years ago

  • Project changed from Web site, servers and infrastructure to MakeHuman
  • Target version set to MakeHuman 1.1.0

#2 Updated by Jonas Hauquier about 4 years ago

  • Related to Bug #564: Viewport misbehaving on startup added

#3 Updated by Jonas Hauquier about 4 years ago

  • Description updated (diff)

#4 Updated by Jonas Hauquier about 4 years ago

I suspect the cause is:

modalSession has been exited prematurely - check for a reentrant call to endModalSession

The splash screen has been set to modal. Probably closing the splash screen causes the application to exit.

#5 Updated by Jonas Hauquier about 4 years ago

Might be a problem on Yosemite only. My tests with Mavericks were succesful.

#6 Updated by Rob Baer about 4 years ago

  • Related to Bug #608: MH unstable not possible to fully start under KVM added

#7 Updated by Francois Grobbelaar about 4 years ago

  • Status changed from New to Accepted

I've confirmed that the line causing the issue is in mhmain.py. After the call to self.splash.show, we call hide on the main window, it looks like OS X doesn't like how we hide the main window in this way. The code is around line 1658. Commenting out the call to self.mainwin.hide() makes it start up correctly. As below:
self.splash.show()
#self.mainwin.hide()

It seems to be okay with us calling self.mainwin.show() later on even though the window is already visible, so I think it's safe to leave that line as-is.

I would suggest putting a check for darwin around the mainwin.hide() call above so it can start up successfully. Unfortunately this does have the side-effect that the main window is visible when it gives the warning about nudity. But I think it's okay since, let's face it, if a person has downloaded MH, I think it's fairly certain at that point that they know what they're getting themselves into.

Interestingly enough, I tried commenting out the other darwin hack and found that it actually works without it now, maybe a qt upgrade has resolved this issue, or perhaps this still is an issue for older versions of OS X - I don't know. But I do wonder if the code below is still needed:
if sys.platform.startswith("darwin"):
self.splash.resize(0,0) # work-around for mac splash-screen closing bug

#8 Updated by Francois Grobbelaar about 4 years ago

We still get the following warnings, which suggests we are doing something we shouldn't be doing, but it doesn't seem to be causing problems at this stage:
2014-10-27 14:29:30.743 Python[2355:959861] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2014-10-27 14:29:30.743 Python[2355:959861] modalSession has been exited prematurely - check for a reentrant call to endModalSession:

#9 Updated by Jonas Hauquier about 4 years ago

Francois Grobbelaar wrote:

We still get the following warnings, which suggests we are doing something we shouldn't be doing, but it doesn't seem to be causing problems at this stage:
2014-10-27 14:29:30.743 Python[2355:959861] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
2014-10-27 14:29:30.743 Python[2355:959861] modalSession has been exited prematurely - check for a reentrant call to endModalSession:

Yes I have set the splash screen to modal window in an attempt to ensure it always stays on top. I have seen the warning too on some deployments. I think I'll undo that experiment.

#10 Updated by Jonas Hauquier about 4 years ago

Francois Grobbelaar wrote:

I've confirmed that the line causing the issue is in mhmain.py. After the call to self.splash.show, we call hide on the main window, it looks like OS X doesn't like how we hide the main window in this way. The code is around line 1658. Commenting out the call to self.mainwin.hide() makes it start up correctly. As below:
self.splash.show()
#self.mainwin.hide()

Great! An easy fix ;)

Thanks for seeking it out.

#11 Updated by Jonas Hauquier about 4 years ago

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

Applied in changeset commit:makehuman_hg|6a8dcc53e918.

#12 Updated by Jonas Hauquier about 4 years ago

Should be fixed in r1596 (could you verify it?)

I also removed the (apparently useless) experiment of setting splash screen modal in r1597 so the warnings should be gone.

#13 Updated by Francois Grobbelaar about 4 years ago

  • Status changed from Fix exists, needs testing to Fixed

Looks good.

Also available in: Atom