Re: Crash in Itcl when using Iwidgets in multiple threads

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Crash in Itcl when using Iwidgets in multiple threads
De : undroidwish (at) *nospam* googlemail.com (undroidwish)
Groupes : comp.lang.tcl
Date : 25. Aug 2024, 09:37:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vaeqgp$1qqhj$1@dont-email.me>
References : 1
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0
On 8/23/24 14:29, Petro Kazmirchuk wrote:

...
That's why I'm convinced the problem is in Itcl rather than Itk, and the stack trace points to Itcl as well. Probably, there is a mutex missing somewhere.
Your hint was valuable to track down the problem. Meanwhile sebres
found a much better solution using the Tcl_Obj infrastructure, see the
respective ticket and commit in the itcl repo.

I didn't try to reproduce it on Linux.
 I understand that both Iwidgets and Itcl are legacy that is barely maintained, that's why I'm not raising a bug in Fossil that very few people would notice. What I'm asking instead from a much wider audience here is for a workaround. Is it possible to change my code somehow to avoid the crash? Of course, preserving the basic multi-threaded architecture.
Now for the multi-threading GUI thing: IMO with the itcl fix you should
be fine on Win32. Linux (= X11) is a completely different story and in
its current state indeed not suitable for this approach. MacOS is a full
stop in this regard by design.
For X11 I've used your code snippet to tweak a setup which works for me,
see this check-in https://www.androwish.org/home/info/9b0450622edec074
The final trick was to re-use X display connections. Otherwise the
XOpenDisplay()/XCloseDisplay() in a multi-threaded program quickly
uncovers inconsistencies in Xlib/Xrender/Xft. Some more additional
locking in Tk's Xft font module (libxft isn't thread safe) was
necessary, too.
And BTW undroidwish with its X11 emulation layer ran your snippet
OOTB with the itcl fix.
BR,
Christian

Date Sujet#  Auteur
23 Aug 24 * Crash in Itcl when using Iwidgets in multiple threads6Petro Kazmirchuk
23 Aug 24 +* Re: Crash in Itcl when using Iwidgets in multiple threads2Harald Oehlmann
23 Aug 24 i`- Re: Crash in Itcl when using Iwidgets in multiple threads1Petro Kazmirchuk
23 Aug 24 +- Re: Crash in Itcl when using Iwidgets in multiple threads1Schelte
25 Aug 24 +- Re: Crash in Itcl when using Iwidgets in multiple threads1undroidwish
25 Aug 24 `- Re: Crash in Itcl when using Iwidgets in multiple threads1undroidwish

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal