Quantcast

Python.exe has stopped working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Alexis Dubois
Hello !

I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows "red cross", by quit(), close(), destroy(), deletelater(), ...

"python.exe has stopped working"
->Check online for a solution
->Close the program

I need to specify that the app is working nice, just have this message when quit.
Do you have an idea to help me understand this issue?

Thanks in advance
Best regards
Alexis

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Laura Creighton-2
In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes:

>Hello !
>
>I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows "red cross", by quit(), close(), destroy(), deletelater(), ...
>
>"python.exe has stopped working"
>->Check online for a solution
>->Close the program
>
>I need to specify that the app is working nice, just have this message when quit.
>Do you have an idea to help me understand this issue?
>
>Thanks in advance
>Best regards
>Alexis
>--
>https://mail.python.org/mailman/listinfo/python-list

You can override closeEvent

def closeEvent(self, event):
    QtGui.qApp.quit()
        event.ignore()

This just shuts it up, you may have more complicated things you want to do.

Laura




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Alexis Dubois
In reply to this post by Alexis Dubois
On Tuesday, June 2, 2015 at 4:13:27 PM UTC+2, Laura Creighton wrote:

> In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes:
> >Hello !
> >
> >I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows "red cross", by quit(), close(), destroy(), deletelater(), ...
> >
> >"python.exe has stopped working"
> >->Check online for a solution
> >->Close the program
> >
> >I need to specify that the app is working nice, just have this message when quit.
> >Do you have an idea to help me understand this issue?
> >
> >Thanks in advance
> >Best regards
> >Alexis
> >--
> >https://mail.python.org/mailman/listinfo/python-list
>
> You can override closeEvent
>
> def closeEvent(self, event):
>     QtGui.qApp.quit()
>         event.ignore()
>
> This just shuts it up, you may have more complicated things you want to do.
>
> Laura

Thanks Laura,

Unfortunately, my closeEvent is already override as this:

def closeEvent(self, event):        
        reply = QtGui.QMessageBox.question(self, 'Message',
            "Are you sure to quit HWL?", QtGui.QMessageBox.Yes |
            QtGui.QMessageBox.No, QtGui.QMessageBox.No)

        if reply == QtGui.QMessageBox.Yes:
            app.quit()
        else:
            event.ignore()

Replacing app.quit() by QtGui.qApp.quit() doesn't change anything.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Alexis Dubois
In reply to this post by Alexis Dubois
Anyone else for an idea on that?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Christian Gollwitzer
Am 05.06.15 um 11:03 schrieb Alexis Dubois:
> Anyone else for an idea on that?
>
Well, it is a crash on exit. Looks like a memory error inside of PyQT.
If you've got the time, you could run it inside of a debugger, or
better, a memory checker like AppVerifier to find the culprit. These
things are usually quite hard to diagnose, and unless someone has seen
it here already, the fun starts now ;) Another possible reason might be
mixing up DLLs from PyQT and another QT installation. You can find out
by listing all loaded DLLs when the program is running, e.g. from a
debugger or this tool:
https://technet.microsoft.com/sysinternals/bb896653.aspx

        Christian

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Stephen Hansen-6
In reply to this post by Alexis Dubois
On Fri, Jun 5, 2015, at 02:03 AM, Alexis Dubois wrote:
> Anyone else for an idea on that?

Sorry, I have no idea.

Have you tried asking on the PyQT mailing list where there is likely
more of a concentration of PyQT expertise?
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

--
Stephen Hansen
  m e @ i x o k a i . i o

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python.exe has stopped working

Laura Creighton-2
In reply to this post by Christian Gollwitzer
In a message of Fri, 05 Jun 2015 11:15:31 +0200, Christian Gollwitzer writes:

>Am 05.06.15 um 11:03 schrieb Alexis Dubois:
>> Anyone else for an idea on that?
>>
>Well, it is a crash on exit. Looks like a memory error inside of PyQT.
>If you've got the time, you could run it inside of a debugger, or
>better, a memory checker like AppVerifier to find the culprit. These
>things are usually quite hard to diagnose, and unless someone has seen
>it here already, the fun starts now ;) Another possible reason might be
>mixing up DLLs from PyQT and another QT installation. You can find out
>by listing all loaded DLLs when the program is running, e.g. from a
>debugger or this tool:
>https://technet.microsoft.com/sysinternals/bb896653.aspx
>
> Christian
>--
>https://mail.python.org/mailman/listinfo/python-list

I don't have a windows machine, so I cannot do any more looking for this,
but this may be relevant.
http://stackoverflow.com/questions/20102419/pyqt-5-error-on-exit

Laura

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Solved] Python.exe has stopped working

Alexis Dubois
In reply to this post by Christian Gollwitzer
Le samedi 6 juin 2015 13:40:13 UTC+2, Laura Creighton a ?crit?:

> In a message of Fri, 05 Jun 2015 11:15:31 +0200, Christian Gollwitzer writes:
> >Am 05.06.15 um 11:03 schrieb Alexis Dubois:
> >> Anyone else for an idea on that?
> >>
> >Well, it is a crash on exit. Looks like a memory error inside of PyQT.
> >If you've got the time, you could run it inside of a debugger, or
> >better, a memory checker like AppVerifier to find the culprit. These
> >things are usually quite hard to diagnose, and unless someone has seen
> >it here already, the fun starts now ;) Another possible reason might be
> >mixing up DLLs from PyQT and another QT installation. You can find out
> >by listing all loaded DLLs when the program is running, e.g. from a
> >debugger or this tool:
> >https://technet.microsoft.com/sysinternals/bb896653.aspx
> >
> > Christian
> >--
> >https://mail.python.org/mailman/listinfo/python-list
>
> I don't have a windows machine, so I cannot do any more looking for this,
> but this may be relevant.
> http://stackoverflow.com/questions/20102419/pyqt-5-error-on-exit
>
> Laura

Hello Everybody,
Thank you for your support and sorry for the late answer, I'm back from holidays.
I tried each solution but unfortunately, nothing works.
Finally, I solved my issue by adding "sip.setdestroyonexit(False)" just before "sys.exit(app.exec_())"
I don't really know what it does but it works well and I don't see any beside effect.
It seems that my issue was linked with a QtGui4.dll crash.

Loading...