HiDPI prevents app from running on Windows

I was playing around with HiDPI today, and discovered that enabling HiDPI prevents a simple test app from launching/running on Windows.

The app consists of one window with a label in it, and a menubar with File, Edit, and one other menu with two items below it. One of those menu items has an icon assigned to it.

When the app runs on Windows remotely from my Mac, or after built and copied to the Windows machine, it fails to launch when HiDPI is enabled. When HiDPI is off, it runs fine.

It always runs on the Mac without any problems.

Just a heads-up for anyone who may be trying to use HiDPI on Windows - I filed a Feedback report, #43743.

That’s strange, I can’t reproduce this. have you installed the new Windows dependencies?

The target Windows machine is running Windows 10 and is up to date, I can’t imagine it would need anything more?

Also, this happens when running it remotely from within the IDE on OS X, doesn’t that send the necessary libraries to the target machine?

Windows 10 already has the necessary support. Is this with remote debugging only? Does it work if you build for Windows and copy the build yourself?

It fails the same, whether run remotely or built on the Mac and then the entire app (with libs) copied to the Win10 machine.

After some further investigation, I added a note to the Feedback report that the problem is with menu item icons. If they’re removed, the app runs fine. However, when the app runs on Windows with HiDPI on and with menu item icons, it fails. It’s OK also with the menu item icons as long as HiDPI is off.

It’s only when the menu items have icons and HiDPI is on that the app refuses to launch (or maybe it’s failing while launching, it’s hard to tell - it never turns up in the Task Manager).

Ah, that doesn’t surprise me at all. We found another issue with menu icons during the r1 cycle.

Well, now you have a nice simple example app you can test against.

Happy bug swatting!

Old case, but I got bitten by a this or similar bug when converting an old project to be HiDPI aware. When setting HiDPI and launching on Windows, the app first went into the debugger at “Event Loop” (i.e. showing no code) and then immediately crashed when clicking resume.
The culprit was one icon in the menubar that was an old GIF. After reading this thread I switched all menuitem icons of and enabled them one by one until I found the problematic one. Replaced that and all is now well.
Xojo 2016r4.1 on Windows 10.