# Ann: SWI-Prolog 9.3.28

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161>\
**Category:** Releases\
**Created:** [August 7, 2025, 12:34pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161 "2025-08-07T12:34:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 7, 2025, 12:34pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/1 "2025-08-07T12:34:45Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 9.3.28 is ready for download. Mostly this fixes a lot of  
the reported gui issues. In particular (might have forgotten some)

Thanks for all the reports and sorry for those I missed …

- Make `swipl-win` window get focus on open.
- Avoid flickering when moving between pulldown menus of the window  
menu. This patch reduces flicker by building the window contents  
before showing it and avoids focus flicker when moving between  
pulldown menus by opening the next pulldown before closing the old.
- Paste Unicode text in Windows version. That does not support  
UTF-16, so it only handles characters up to uffff. Also fixes  
history up/down with Unicode text. Paste into `swipl` running  
in a Windows console still fails for non-ASCII text.
- Properly track and restore window positions when using multiple  
displays. All window positions are now managed relative to the  
display on which the window is displayed.
- Process keypad command keys when not in numlock mode. Somehow  
SDL does not tell me the functions of these keys, so this uses  
hard coded 7-\>home, 8-\>up, 0-\>page\_up, etc.
- Windows to handle multiple console windows (see popup menu of  
the console).
- Hopefully support Alt-Gr text input.
- Various drawing details fixed for graphicals and widgets.
- Fix the somewhat more relaxed threading support of xpce. This  
caused a variety of crashes. As is, multiple Prolog threads  
can use xpce, but only one can be “inside” xpce. The xpce  
lock is released when a thread performs a call to Prolog.

I’ll be travelling and dealing with other projects for quite a while,  
so further development will be slow.

```
Enjoy --- Jan

```

# SWI-Prolog Changelog since version 9.3.27

- FIXED: swipl-win: print backtrace on uncaught exceptions in Epilog.

- FIXED: Simplification in 057d69387e240ebf90af8f9c9d5783c5203887fa  
was wrong.

- FIXED: #1384 message printing is disabled after an uncaught exception  
inside a transation Assert and erase listen inconsistently to  
`P_TRANSACT`, causing a clause for user:thread\_message\_hook/3  
to remain.

- THEME: Support dark theme in selections in text objects.

## Package xpce

- FIXED: Establish platform dependent resource defaults. This notably  
makes Apple keybindings default on MacOS.

- ENHANCED: class terminal\_image to use methods for copying This allows  
for redefining `terminal_image->copy`.

- FIXED: UTF8ToString() created a `name` for ASCII strings.

- FIXED: Locking for Windows.

- CLEANUP: Simplify and share locking code between Windows and POSIX

- FIXED: Make all xpce stack related variables thread specific.

- FIXED: Support multiple threads in xpce variable handling This patch  
makes @arg1, etc. supporting multiple Prolog threads making progress.

- FIXED: Possible variable block corruption in expression evaluation.

- ADDED: Implement selection for class `text`.

- FIXED: Feedback for class `path` selection when using dark theme.

- FIXED: re-colour bitmaps to fore and background. Accessed @nil  
as colour.

- FIXED: Releasing and reacquire the xpce global lock. Caused incorrect  
lock counts if the lock was held by another thread when called.

- FIXED: Deadlock after new/2 fails due to module error.

- BUG: Temporarily disabled library(pce\_unclip). Getting this to work  
requires changes due to modern restrictions of event grabbing.

- CLEANUP: Track frame position relative to its display.

- ADDED: Process keypad command keys when not in numlock mode.

- ENHANCED: Draw window initial content before showing the window.

- ENHANCED: When hovering a menu bar, first open the next popup before  
closing the old. This avoids flickering the main window due to  
regaining/loosing focus.

- FIXED: Honour `frame->input_focus` if there is a subwindow that has  
defined a keyboard\_focus.

- FIXED: Windows handling multiple epilog windows.

- MODIFIED: Handle Alt-right (Alt-Gr) as possible text input.

- FIXED: Possible crash in click detection.

---

<div class="post-metadata">

**Author:** ![mike.elston](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mike.elston/32/3691_2.png) [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Post date:** [August 8, 2025, 12:10am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/2 "2025-08-08T00:10:24Z")

</div>

Hi

Welcome to SWI-Prolog (threaded, 64 bits, version 9.3.28-1-gcf0c24b55)

Just noticed that when I manually shrink the size of the threads monitor window to a silly small size, these messages appear on the console:

?- ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-11’  
ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-19’  
ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-20’  
ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-19’  
ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-17’  
ERROR: prolog\_thread\_monitor -\>recall: Argument 1 (?): `1..' expected, found `-1’

 ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/b/b6474fe7460dc544e695c64eb9fc26bad0fbbf7d.png)

---

<div class="post-metadata">

**Author:** ![mike.elston](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mike.elston/32/3691_2.png) [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Post date:** [August 8, 2025, 5:23am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/3 "2025-08-08T05:23:03Z")

</div>

Hi again

In earlier versions of SWI emacs you could mouse-click at a point in a buffer and while holding the mouse button down, drag the mouse pointer past the bottom of the buffer. This would cause the buffer to scroll up thereby allowing the select region to be extended. In the current version this does not happen.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 8, 2025, 1:59pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/4 "2025-08-08T13:59:11Z")

</div>

> [@mike.elston](#):
>
> This would cause the buffer to scroll up thereby allowing the select region to be extended. In the current version this does not happen.

I guess that is one loss of the rather different way of event processing under SDL. Needs fixing, but might take quite a while. In the meanwhile, start a selection and use the Emacs ^F^B^N^P cursor movement. That extends the selection. So, to scroll down and select, start a selection and use ^N. It is also more pleasant 🙂

I guess a lot of the even processing eventually needs a little policing to get in sync with current conventions. What is there is mostly based on early 90s X11 conventions 🙂

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 25, 2025, 8:02am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/5 "2025-08-25T08:02:05Z")

</div>

Pushed several patches that improve selection and cursor movements by supporting Ctrl-left/right to move by word and Shift- to extend the selection. This used to work, but was broken due to rewrites in assigning keyboard input to actions. Shift-left-click now also extends the selection. This is typically more comfortable than that drag-scroll. Drag scrolling works to some extend on some platforms, but is still not what it should be.

---

<div class="post-metadata">

**Author:** ![Boris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/boris/32/7486_2.png) [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Post date:** [August 25, 2025, 11:50am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/6 "2025-08-25T11:50:09Z")

</div>

Hi, I am at a600e6f3681b413b69a91a04d802ece2d585f22d. When I run the tests I see:

```prolog
78/86 Test #4: swipl:core .......................***Failed 2.50 sec
Running scripts from core 
% [1/52] acyclic_terms:var_is_acyclic ................................................................. passed (0.018 sec)
% and so on, until
% [15/20] term_hash2:simple_3 ....................................................................... **FAILED (0.007 sec)
ERROR: [Thread main] /swipl-devel/tests/core/test_hash.pl:129:
ERROR: [Thread main] test term_hash2:simple_3: assertion
ERROR: [Thread main] /swipl-devel/tests/core/test_hash.pl:129:
ERROR: [Thread main] test term_hash2:simple_3: assertion at /swipl-devel/build/home/boot/init.pl:685 failed
	Assertion: memberchk(3784382378,[347171279,10072710])

% [16/20] term_hash2:simple_4 ......................................................................... passed (0.000 sec)

```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 25, 2025, 1:23pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/7 "2025-08-25T13:23:56Z")

</div>

Weird. Runs fine for me on MacOS (Arm64) and Linux (x86\_64). Both using GMP. As these are bignums, could it be you are not using GMP?

---

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [August 25, 2025, 1:27pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/8 "2025-08-25T13:27:13Z")

</div>

Thanks, this problem was a showstopper for me.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 25, 2025, 2:20pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/9 "2025-08-25T14:20:38Z")

</div>

Reporting often helps 🙂 It would be great if people review GUI details such as key bindings and mouse handling, take a close look at which menu options are unclear/unneeded/missing and comment on the overall usability. I’m a lousy UI developer ☹

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 25, 2025, 3:43pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/10 "2025-08-25T15:43:05Z")

</div>

> [@Boris](#):
>
> ```prolog
> Assertion: memberchk(3784382378,[347171279,10072710])
> 
> ```

Testing with LibBF for big integers indeed confirms this produces your hash. Fixing that is rather expensive. The issue is now documented and the test is extended to accept the LibBF hash.

---

<div class="post-metadata">

**Author:** ![mike.elston](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mike.elston/32/3691_2.png) [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Post date:** [August 25, 2025, 11:33pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/11 "2025-08-25T23:33:59Z")

</div>

Hi Jan

I have just re-built all to give 9.3.28-28-g6c552159d-DIRTY but Ctrl-ledt arrow, Ctrl-right arrow do nothing and result in “Undefined“ appearing in the bottom left corner of the Emacs window. Also Shift-left mouse click not extending selection

-Mike

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 26, 2025, 7:01am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/12 "2025-08-26T07:01:31Z")

</div>

> [@mike.elston](#):
>
> I have just re-built all to give 9.3.28-28-g6c552159d-DIRTY but Ctrl-ledt arrow,

Considering the `-DIRTY`, did you update the submodules? Whenever you pull swipl, always run

```
git submodule update --init

```

and make sure it actually does its job (i.e., the update is not blocked by some locally modified file or anything else). Simplest way to verify is by running `git diff` or `git status`. If any submodule is blocked, go into the submodule and run this, **after verifying the changes do not contain anything you want to preserve**. If there are local modifications you want to preserve, use `git stash` instead an re-apply the changes after the update.

```
git reset --hard

```

---

<div class="post-metadata">

**Author:** ![mike.elston](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mike.elston/32/3691_2.png) [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Post date:** [August 26, 2025, 11:22am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/13 "2025-08-26T11:22:12Z")

</div>

> [@jan](#):
>
> `git submodule update --init`

Aha. Yes, much better now thanks Jan. But FYI drag-scroll still no go for me.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 26, 2025, 12:38pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/14 "2025-08-26T12:38:38Z")

</div>

> [@mike.elston](#):
>
> But FYI drag-scroll still no go for me

I know. Eventually this will probably be fixed. As it typically works poorly IMO, it is not high priority. Note that Shift-click works, so if you want to select an large region, start a selection, scroll down and use Shift-click to set the end.

---

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [August 26, 2025, 8:42pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/15 "2025-08-26T20:42:16Z")

</div>

> [@jan](#):
>
> `git submodule update --init`

I do this, to ensure the latest updates to submodules, even if the changes haven’t been committed to the main module (the `–recurse` probably isn’t needed).

```prolog
git submodule foreach 'git pull --recurse&'

```

or (slower):

```prolog
git submodule foreach git pull --recurse

```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [September 3, 2025, 12:54pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-3-28/9161/16 "2025-09-03T12:54:40Z")

</div>

7 posts were split to a new topic: [XPCE keyboard input issues](https://swi-prolog.discourse.group/t/xpce-keyboard-input-issues/9246)
