Plain Box Splash Window not working in macOS High Sierra

Most of my apps use a splash window, similar to what the Xojo IDE shows at startup, that displays the App’s icon, the name of the app, the version, etc, and a progress bar while the app is starting. The window is a Plain Box, and it is activated in the App.Open event. Up until I upgraded my Mac to macOS High Sierra, all my apps showed this splash window without a problem, but none of them show the splash window anymore since I upgraded to High Sierra (the apps start fine, but without showing the splash window). The same builds still work fine on another Mac that hasn’t been upgraded yet and is still running macOS Sierra. Any clue as to what the problem could be? Has anybody else seen something similar after upgrading to High Sierra?

Which event does ‘showing the splash’ occur within?

If events are firing in an unexpected order, if the splash screen hasnt been created by the time it is shown, and if you have a silent exception handler, then your app starts up without the screen, as an example of how it could be happening.

Also If this event never fires…

Since your machine is High Sierra, what happens in debug mode?
Are you saying that ‘even though the window.show event is called, the window never appears’?
Does it have sizing code…?
Is it appearing on ‘the wrong desktop’?

Make an example and post it.

For my progress window the progress wheel is choppy so I’m guessing that the fruit company messed around - again - with drawing. Or it’s something with timers.

It’s very easy to reproduce:

  • Create a new Desktop project
  • Add a new window to the project. It will automatically be called ‘Window2’
  • Set the type of Window2 to ‘Plain Box’
  • Add the following code to the App.Open event handler:

dim w as new Window2 w.Show SleepCurrentThread(2000) w.Close

  • Run the project on macOS High Sierra as well as older versions of macOS
  • On any OS older than macOS High Sierra, the app will show Window2 for about 2 seconds before closing it and then showing Window1. On High Sierra, nothing happens for about 2 seconds and then Window 1 opens.

I can confirm the bug. The problem seems to be the w.close in the Open event. I’d try a timer in the Plain Box window so that the window can close itself.

I run in the same street, but turn on the right at some point (No SleepCurrentThread(2000)) and the window Close code is in the Plain Box window.

BUT I do not installed High Sierra (yet, next week, Sept 1st ?).

BTW: the splash screen (here) is also informative, and so I wait for a mouse down or a mouse click and display the “Command main Window”.
The only purpose of this splash screen is to display informations (Company Logo and data from an SQLite db about # of entries, last db modification date, and so…)

I suspect that Apple’s gotten more stringent about what things trigger refreshes again. Window.Show is likely getting queued, the main thread sleeps for 2 seconds and then it executes Show and then the Hide almost instantaneously. Is mentioned, use a 2 second single mode timer in your splash screen to close it.

Put a single timer on Windows2 that closes it automatically after 2 seconds and get rid of SleepCurrentThread and w.close.

Important lesson here - this will affect your on Windows and Linux as well.

All this sleepcurrentthread and other tight loops to wait are a legacy of old basic stuff and procedural programming thinking. They should be replaced by timers everywhere.

I for one would be glad to see the end of useless splash screens.
Unless you’re actually loading a bunch of plugins like Xojo or Photoshop does, splash screens are just a waste time.

In my case, I “mostly” agree with Tim. For my apps that just load, no splash, but for my projects that load a lot of data at startup - the splash screen acts as the user pacification system.

I basically look at the process and if it takes the app longer than 2 seconds to load from the time the user starts the app, it gets a splash screen. Otherwise, support gets calls reporting that something’s wrong with the app.

That is if you run tens times a day that application, but what if you fire the application when starting work and shut it down before leaving in the late afternoon ?

If you’re intentionally wasting even 2 seconds of my time for no reason you’re [redacted]
If an app actually needs the time to initialize it’s acceptable (Photoshop, Xojo, stuff like that).

But if your splash screen is OPEN > WAIT(2) > CLOSE you’re wasting time. There is no excuse.

Sometimes the boss/client/marketing department requires it. Seriously, there are reasons to have one. Your opinion doesn’t matter sometimes.

“Your” in this case meaning the developer …

Yes, of course, if client that pays for it wants one, client that pays for it gets one.

Agreed. I only used the 2 second sleep as a placeholder for the other stuff the app is doing in the app.open event. And since I update the contents of the splash screen with status information on what the app is doing while it’s starting (such as checking online for updates, etc), I really want the splash screen to be visible while it’s doing all that (i.e. show splash at beginning of app.open, do stuff, close splash when done). Thus, the solution to use a timer to show the splash screen for a predermined amount of time wouldn’t work here.

Perhaps use a short timer (Xojo.Core.Timer.CallLater even) to separate the Window display from the start of your intense code. This may give the system time to update the UI and draw the window before starting in on the process.

In an app of mine where I need a splash screen, I put the code to close it at the end of the last method called:
-open splash screen and refresh it
-fire first method. At the end:
-fire second, third ecc methods
-fire last method >> at the end of this method : “splashscreen.close”.

Not tested in High Sierra!