Windows (Sometimes) Never Show Under Cocoa

I have an odd bug that I can’t consistently reproduce.

On app launch, the windows of my app won’t show up. This is not constant. Happens about 1/10 of the launches.

Window.visible has no effect. has no effect.

Additionally, if you go to another app and then command-tab back to my app, my app won’t come to the front. The menubar doesn’t change to my app’s menus.

In rare cases, I’ve been able to trick the OS into showing one of these invisible windows and it is non responsive. No controls respond to clicks.

The app is otherwise fully functional. If you pause the debugger, the window is fully instantiated and has a visible = true property.

The only thing that I’ve found that can make the window show and return to normal behavior is to programmatically minimize it to the dock and then click on it in the dock to expand it.

This seems related to: feedback://showreport?report_id=29638 but my bug has no workaround. I’m unable to isolate it into a sample app so far.

When the above bug doesn’t happen, a related bug often does. Only the topmost of my windows will show. The remaining will load behind all other apps even if the windows call Window.Show.

Anyone else seen this behavior?

Xojo 2013 r4.1 Cocoa
Mavericks 10.9.1

It’s the same problem as feedback://showreport?report_id=29657

Xojo 2013r4.1

I use, which seems to work

Alas, I wish worked for this one.