[Done] Error with SetGadgetText and non-existing folder in ExplorerListGadget

Post bugreports for the Linux version here
User avatar
Shardik
Addict
Addict
Posts: 1840
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

[Done] Error with SetGadgetText and non-existing folder in ExplorerListGadget

Post by Shardik »

When trying to use SetGadgetText() with a non-existing folder in an ExplorerListGadget, the program terminates with an error and the message
[ERROR] Program aborted. (by external library)
is displayed.

On MacOS and Windows no error message is displayed. This behaviour results in a crash only in the Linux IDE when trying to open a new project while the PureBasic preferences file contains a non-existing folder (for example an USB stick which currently is not connected). This bug was already posted in the PureBasic subforum "Bugs - Linux":
Linux bug report

And a workaround was posted as a GitHub pull request:
GitHub pull request

The following code demonstrates the bug on Linux. It doesn't occur on MacOS and Windows:

Code: Select all

; Result  Tested operating system
; ------  -----------------------
;   OK    MacOS 11.5 'Big Sur' (Empty list, pattern doesn't work on MacOS)
; Crash   Linux Mint 18.3 x64 'Tricia' with Cinnamon     
;   OK    Windows 10 20H2 x64 (Drives are listed)

OpenWindow(0, 100, 100, 400, 200, "ExplorerListGadget")
ExplorerListGadget(0, 10, 10, 380, 180, "")

SetGadgetText(0, "/Folder_does_not_exist/*.pb")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Gary.Maine
User
User
Posts: 32
Joined: Mon Oct 01, 2018 7:10 pm
Location: Winterport, Maine USA

Re: Error with SetGadgetText and non-existing folder in ExplorerListGadget

Post by Gary.Maine »

I see the same. Ubuntu 18.04.2
freak
PureBasic Team
PureBasic Team
Posts: 5837
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Error with SetGadgetText and non-existing folder in ExplorerListGadget

Post by freak »

fixed.
quidquid Latine dictum sit altum videtur
Post Reply