App Hangs on window show - Windows Only

I’m working on my first Xojo xplat application. Currently it has two Windows with a Movable Modal Window as first window at launch. This is a simple login window which uses URLConnection subclass to post a login request against a remote API. This validates the login and if successful returns 200 with a JSON Payload.

I have a ContentReceived Event handler which then checks the payload response and records it’s values then does a:

“MainWindow.show” to show the next window. On the called window there is an Open event which closes the login window. This works fine on MacOS, Linux, Raspberry PI but on Windows 10, it’s hanging and becomes unresponsive immediately upon the window show command.

I’ve tried creating a different window with no events and a single button on it and showing that, same result. If I replace the show with a msgbox it’s fine. Something about the window show is the issue.

Again, I’m calling this from a URLConnection subclass ContentReceived event.

If I change the login button action event to skip the call to the login, and just show the window, it’s working fine.

So something specific to the call from the URLConnection event on Windows 10 (only version I have handy at the moment) is creating the issue.

Any ideas? I’m going to try swapping out the URLConnection with MBS CURLS to see if this goes away as my next step but if anyone has any ideas on what, if anything, I’m doing wrong here, let me know.

Xojo 18R4
Windows 10 Enterprise LTSC / 1809
Build 17763.195

I’ve tried remote debugging first then moving towards installing Xojo on this windows and trying locally, it’s reproducible whichever way.

Thanks!

Have you put a breakpoint a line or two before the Window.Show, and step one line at a time through to see what Windows is doing? That’ll let you know if it’s really Window.Show causing the problem. If so, try pushing the call out of the received event. There were funky issues with Xojo.Net.HTTPSocket on Windows as well to the sound of a similar tune.

@Tim Parnell ,

I did set break points and step through with success up to the point of the call to the window show command. Everything is fine up until that point.

Even if I do nothing in this EventHandler besides calling the window show command it still results in the same behavior so it’s not the preceding EventHandler code (which just grabs the json returned for tokens to be used on subsequent calls).

I just tried creating a method on App which in turn calls the open window and called this from the event with no benefit.

Going to move away from URLConnection for a moment to see if this goes away. I already have the MBS plugins engaged on the project for use with some AWS calls so it’s already available to use anyway. They are used along with the returned credentials for direct AWS API calls with temp creds.

Let’s see what happens.

Using MBS CURLS works fine. I’ll use the feedback app to send this in for further investigation. Might be a bug based on what I’m seeing thus far.

FYI:

Filed as report ID 54542