SWI freezes when trying free XPCE objects (?)

Hi !

I’m using: SWI-Prolog version 10.0.2 windows

I want the code to: open a dialog, show it and remove it.

But what I’m getting is: it freezes SWI (I have to kill it).

It works ok on SWI 9 (exact same code)

My code looks like this:

?- use_module(library(pce)).
?- new(@demo, dialog('test')), send(@demo,open).
?- free(@demo). % freeze SWI PROLOG

G (new member, Hi :slight_smile: )

Thanks. Also crashes (rather than freezing) on MacOS :frowning: . A work-around is to use

?- in_pce_thread(free(@demo)).

The threading model is much more restrictive in version 10 due to the use of the SDL graphics library. The above should normally not be a problem as freeing is normally called from the GUI thread as a result of event processing anyway. It should not crash this badly though :frowning:

Many (many) thanks Jan !