Preemptive Threads and Listboxes Don't Play Nice

Yes. That’s true you can do that. Good idea…

Here’s an example for URLConnection…

URLConnectionDelegate.xojo_binary_project.zip (5.3 KB)

And don’t forget that when you’re creating these things in code, that you can right-click on the class name to automatically add methods from events and delegates with the correct signatures…

Edit: Fixed a syntax error in the project

4 Likes

:exploding_head:

Never knew that!

Ditto. :exploding_head: too!

That’s freaking cool! WOW!

From your crash logs, it looks as if the problem happens when an object is destroyed, as if the destructor for an object (which was created outside the thread) is being destructed within the thread.

Could be a framework bug, but I’m wondering: Could you have a bug where the thread is holding onto a reference to something in the listbox that it should release?

Nope. I don’t think so. I will double check. It is a good thought.