help!
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wwN9B8v-kKHU7PAWMZJhor5PRZkmkg8QLFWcPuKd5cvRQ@mail.gmail.com> |
Hi Jan
Sorry to bother you, but I was trying to understand why I can't catch
exceptions when calling on background thread, and stumbled upon a weird
behaviour of the standard - not Qt - console.
Briefly, ?- help. hangs.
carlo@ubuntu-carlo-64:~$ swipl
% .plrc compiled 0.07 sec, 1,574 clauses
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.1.5-DIRTY)
Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- help.
^C^C
[forced] Action (h for help) ? goals
[23] pce_principal:send(@2182115/pui_toc, root(toc_folder('Manual',
manual, resource(manual), resource(book))))
[20] pce_principal:new(_G6283, pui_toc)
[19] Send-method on @pui_help_window/pui_manual:
pui_manual->table_of_contents
[17] pce_principal:send(@pui_help_window/pui_manual, table_of_contents)
[14] pce_principal:send(new(@pui_help_window/pui_manual, pui_manual), open)
[forced] Action (h for help) ?
Note the double ^C...
In Qt console, win_menu:help, called on background, hangs, and the main
thread got confused, hangs itself... It's a bit unfortunate, as this is
probably one of the first menu a casual user will try...
Since I hope the problems are (at least loosely) related, I wonder if some
setting from C side could inhibit exceptions from working. Seems related to
threading, since try {} catch {} works as expected in a simple setting
(let's say, from main).
BTW, the reason ?- help. doesn't work get explained after two abort...
[forced] Action (h for help) ? abort
ERROR: pce(object) `@pui_help_window' does not exist
Exception: (6) online_help:help ? abort
% Execution Aborted
?- help.
SWI-Prolog [thread 1]: received fatal signal 11 (segv)
Stack trace labeled "crash":
[0] crashHandler+0x36
[1] dispatch_signal+0x44d
[2] __restore_rt+(nil)
[3] pthread_cond_signal+0xa
Annullato
TIA Carlo
-------------- next part --------------
HTML attachment scrubbed and removed