Window skips OPEN event

What is the type of the window?

modal dialog is the one skipping the OPEN event (macOS… works fine for Windows)
Document is the main window type

Do you have active “background” threads, or timers?

and you open it on a button press, not something like a double click of a listbox ?

no timers, no threads, no dbl-click listbox

Hoping the the exception that the 32bit compile throws would be a clue?

Did I miss that somewhere? Has the post been removed?

I had a hell to track an issue once, because a window had used a custom component, multiple times, and it started to fire a cascade of events out of order, breaking points got insane. Just adding more inspiration for your search. :smiley:

Oh. I see an edit. https://forum.xojo.com/conversation/post/455782

???

The “exception” Julian and myself did not see.

I don’t know. Who knows you reached uncharted waters in the compilers, 32 bit exploded and 64 bit got silently crazy. You may need the engineers looking at it.

Wasn’t there a stack trace posted in here? Or was I dreaming that from another thread I was looking at?

Rename this method and see what issues that causes.

Check your paints for recursion.

Clutching at straws now :wink:

That exception (32 bit) is somewhere in here

// without this, TextArea updates colors without waiting for SelectColor to finish
#If TargetCocoa Then
  Dim dummy As String
  
  Declare Function documentView Lib "Cocoa" selector "documentView" ( obj As Integer ) As Integer
  Declare Sub mysetUsesFontPanel Lib "Cocoa" selector "setUsesFontPanel:" ( obj As Integer, flag As Boolean )
  Dim myTextArea As Integer = documentView(Self.Handle)
  
  mysetUsesFontPanel(myTextArea, False )
  //
  //
  //
  Declare Function NSClassFromString Lib "Cocoa" (aClassName As CFStringRef) As Ptr
  
  Declare Sub setAutomaticQuoteSubstitutionEnabled Lib "Cocoa" selector "setAutomaticQuoteSubstitutionEnabled:" (id As ptr, value As Boolean)
  Declare Sub setAutomaticDashSubstitutionEnabled Lib "Cocoa" selector "setAutomaticDashSubstitutionEnabled:" (id As ptr, value As Boolean)
  Declare Sub setAutomaticTextReplacementEnabled Lib "Cocoa" selector "setAutomaticTextReplacementEnabled:" (id As ptr, value As Boolean)
  
  Dim value As Boolean=False
  Dim pntr As ptr = ptr(myTextArea)
  
  setAutomaticQuoteSubstitutionEnabled(pntr, value)
  setAutomaticDashSubstitutionEnabled(pntr, value)
  setAutomaticTextReplacementEnabled(pntr, value)
  
#EndIf

as a matter of fact is seems THE WHOLE PROBLEM is in there somewhere…
I don’t execute that code… .and everything closes and opens properly in both 32bit AND 64bit!!!

Oh boy. Uncharted human made waters. :smiley:

Well, seems you are isolating the problem. Can you turn such customization off for a test?

I THINK I FOUND IT!!! (hoping)

seems that

 Dim myTextArea As Integer = documentView(Self.Handle)

needed to be

 Dim myTextArea As Integer = documentView(ME.Handle)

the text area was in a container, and SELF was the container not the text area

So who knows what those declares were doing with that wrong Address!

Glad you got to the bottom of it.

and OPEN works properly…

Thanks for everyones support…

Out of interest, where was that code called from?

in the TextArea open where the TextArea was on the main Window (on a pagepanel)

So it got called very early in the app initialization, and I guess mucked up pointers behind the scenes making various window events no long function. just changing that ONE WORD… fixed all the issues at once