When trying to make python-meh exception handling work, I've hit a traceback [1]. It happens every time, but since it is in separate thread, without python-meh everything else goes on. I've used the updates.img to use up to date code.
Another problem is, that if unhandled exception appears in a separate thread, python-meh displays the mainExceptionWindow, but then immediately whole Gtk crashes with many error messages on tty1. I guess the problem is that python-meh runs another Gtk main loop from a different thread. Any ideas how to resolve that? Appart from that, I added some patches that make python-meh work (posted on our patches list).
Hi,
It might be possible to try equivalent of Gtk2 locking stuff:
gdk.threads_init() // this we probably do
gtk.threads_enter() // this might be used to get a lock on Gtk internals gtk.threads_leave() // around the meh code in the separate thread
I can't promise it will work though :)
Martin
----- Original Message -----
When trying to make python-meh exception handling work, I've hit a traceback [1]. It happens every time, but since it is in separate thread, without python-meh everything else goes on. I've used the updates.img to use up to date code.
Another problem is, that if unhandled exception appears in a separate thread, python-meh displays the mainExceptionWindow, but then immediately whole Gtk crashes with many error messages on tty1. I guess the problem is that python-meh runs another Gtk main loop from a different thread. Any ideas how to resolve that? Appart from that, I added some patches that make python-meh work (posted on our patches list).
-- Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
On Tue, 2012-07-31 at 16:47 +0200, Vratislav Podzimek wrote:
When trying to make python-meh exception handling work, I've hit a traceback [1]. It happens every time, but since it is in separate thread, without python-meh everything else goes on. I've used the updates.img to use up to date code.
It looks like your updates are messed up. That options keyword argument was added in commit 36d82ee415e (from 18 July).
David
On Tue, 2012-07-31 at 10:33 -0500, David Lehman wrote:
On Tue, 2012-07-31 at 16:47 +0200, Vratislav Podzimek wrote:
When trying to make python-meh exception handling work, I've hit a traceback [1]. It happens every time, but since it is in separate thread, without python-meh everything else goes on. I've used the updates.img to use up to date code.
It looks like your updates are messed up. That options keyword argument was added in commit 36d82ee415e (from 18 July).
May be, the whole image seems to be messed up. Sorry for the noise then. :)
When trying to make python-meh exception handling work, I've hit a traceback [1]. It happens every time, but since it is in separate thread, without python-meh everything else goes on. I've used the updates.img to use up to date code.
I subclassed the python Thread class to make sure that an exception in one thread brings down the whole process. By default, an exception in one thread will just make everything look like it's fine still. So if you're seeing weird behavior with exceptions in threads not bringing down all of anaconda, make sure everything is using AnacondaThread.
Another problem is, that if unhandled exception appears in a separate thread, python-meh displays the mainExceptionWindow, but then immediately whole Gtk crashes with many error messages on tty1. I guess the problem is that python-meh runs another Gtk main loop from a different thread. Any ideas how to resolve that? Appart from that, I added some patches that make python-meh work (posted on our patches list).
Like Martin said, you could try wrapping it in threads_enter and threads_leave. See gdk_threaded in pyanaconda/ui/gui/utils.py for a contextmanager that does just that.
If that doesn't work, we might need to add some additional communications channel between threads so the subthread can alert the thread running the UI and it can do the graphical handling.
- Chris
anaconda-devel@lists.stg.fedoraproject.org