Open PathRequester from thread crash
Open PathRequester from thread crash
Using PathRequester from thread, fisrt time it works, second time program crashes. Purebasic 5.31 x86 and x64, MacOSX 10.9.5. If i call PathRequester from main thread it works fine.
Re: Open PathRequester from thread crash
You can't do it from either Linux or OS X, including other window manipulation or requester calls.kemsky_by wrote:Using PathRequester from thread, fisrt time it works, second time program crashes. Purebasic 5.31 x86 and x64, MacOSX 10.9.5. If i call PathRequester from main thread it works fine.
Use Bind/Post event for such errands instead.
Re: Open PathRequester from thread crash
You must send a PostEvent() to the MainWindow loop and open it from there.kemsky_by wrote:Using PathRequester from thread, fisrt time it works, second time program crashes. Purebasic 5.31 x86 and x64, MacOSX 10.9.5. If i call PathRequester from main thread it works fine.
Don't do any GUI operations directly inside a thread.
macOS Catalina 10.15.7
Re: Open PathRequester from thread crash
That's what i did as a quick fix, but it blocks event loop and i have to create my own PathRequester that does not block... which is not fine.Wolfram wrote:You must send a PostEvent() to the MainWindow loop and open it from there.
Don't do any GUI operations directly inside a thread.
Re: Open PathRequester from thread crash
can you give me an example of you code?kemsky_by wrote:That's what i did as a quick fix, but it blocks event loop and i have to create my own PathRequester that does not block... which is not fine.Wolfram wrote:You must send a PostEvent() to the MainWindow loop and open it from there.
Don't do any GUI operations directly inside a thread.
macOS Catalina 10.15.7
Re: Open PathRequester from thread crash
PathRequester is blocking call on windows, so if it is opened within event loop - it will stop processing events until user selects smth. Now i'm trying to use callbacks (BindEvent) to avoid blocking, but i got crash if window is closed from callback(and immediate crash if i try to open PathREquester from callback) on MacOSX 10.9.5 and i think it is the same story. I'm using modules.
---
tried latest build from official website - callbacks are totally unusable. Threadsafe, unicode, line numbering, x64 and x86, modules.
---
tried latest build from official website - callbacks are totally unusable. Threadsafe, unicode, line numbering, x64 and x86, modules.
Re: Open PathRequester from thread crash
As far as I understand a PathRequester is supposed to be a modal dialog that blocks things.
If you don't want that, maybe you can use an ExplorerComboGadget instead.
If you don't want that, maybe you can use an ExplorerComboGadget instead.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Open PathRequester from thread crash
So the problem is that callbacks crash program on MacOSX both x64 and x86.