Hard crash using Xojo 2021r1

Is anyone else seeing a hard crash when closing a Floating Window in 2021r1. <https://xojo.com/issue/64308>

Doesn’t seem to happen on 2020r2.1.

What about changing the window to “implicit instance” = on, and just calling winReplace.show() ?

Does it solve the problem?

Will give it a try tomorrow. Thanks

That’s just a workaround try. Maybe you really found some bug needing a further inspection.

Implicit instance does seem to solve the problem. It’s certainly a bug though, which is why I reported it. Thanks for the tip :slight_smile:

Some events out of order can crash a dismissed object like:

window1.Visible = False // window1 was released, it should crash

But an auto-instantiated one will leak an object (windows1 will be recreated and invisible) but not crash.

You don’t need to call .Show when creating a new window that isn’t an implicit instance. Comment Win2.Show in PushButton1.Action and it works exactly as expected here. For whatever reason, that appears to be where the crash is.

EDIT: Disregard. It went through two runs hitting the button 10 times. I tried again just now and hit the crash on the second attempt. Odd.

It not necessarily must be a user bug, this kind of thing could happen in touched parts of the framework, specially when heavily using timers. A user bug because of the use of timers, sometimes manifest in some machines and not in others (faster ones), or due to some change in the framework that caused some small timing difference too from a release to another showing such potential problem. There are many possibilities…

OK, try removing the SearchField. It looks like that might be the problem.

If this gets confirmed, add this info to the case to help Xojo isolate the bug.

I already have added it to the case. I’m posting here merely for discussion.

I was talking to Ian, but thanks for adding such info for him.

Case is now marked as reproduced.

1 Like

Yes, it doesn’t alway happen. You can need multiple runs to cause the problem. I’ll replace the search field with a textbox and see if that solves the problem. At least it will get me moving again.

Search field is indeed the source of the problem. At least it goes away if you swap it out.

1 Like