Exceptions with "enableMenuItems" in stack trace

We get various exceptions in our applications that are probably indirectly triggered by our own code.
In the various stack traces, “enableMenuItems” appears again and again.
Does this mean that this is really the cause?
Because no method or event of our own appears here, it is difficult to say where the error occurs.
How would you track this down?

Message
KeyNotFoundException

ErrorNumber: 0
Stack Trace

Newest

  Module "-"
  ?, in RuntimeRaiseException
  ?, in RuntimeShowModalWithinWindow
  ?
  ?
  ?, in RuntimeMenuItemLookupArray
  ?, in RuntimeMenuItemLookupArray
  ?, in serialClearBreak
  ?, in serialClearBreak
  ?, in serialClearBreak
  ?, in serialClearBreak
  ?, in DispatchMessageW
  ?, in DispatchMessageW
  ?, in enableMenuItems
  ?
  ?, in enableMenuItems
  ?, in RuntimeRun
  ?
  ?
  ?
  ?
  ?, in BaseThreadInitThunk
  ?, in RtlUserThreadStart
Message
RuntimeException

ErrorNumber: 0
Stack Trace

Newest

  Module "-"
  ?, in RuntimeRaiseException
  ?
  ?
  ?
  ?
  ?, in CanvasDoubleBufferGetter
  ?, in EmbedWithinInternal
  ?, in serialClearBreak
  ?, in CallWindowProcW
  ?, in DispatchMessageW
  ?, in enableMenuItems
  ?
  ?, in enableMenuItems
  ?, in RuntimeRun
  ?
  ?
  ?
  ?
  ?, in BaseThreadInitThunk
  ?, in RtlUserThreadStart
Message
NilObjectException

ErrorNumber: 0
Stack Trace

Newest

  Module "-"
  ?, in RuntimeRaiseException
  ?, in RuntimeShowModalWithinWindow
  ?
  ?
  ?
  ?
  ?
  ?
  ?, in notePlayerInstrumentSetter
  ?, in EmbedWithinInternal
  ?, in serialClearBreak
  ?, in DispatchMessageW
  ?, in DispatchMessageW
  ?, in enableMenuItems
  ?
  ?, in enableMenuItems
  ?, in RuntimeRun
  ?
  ?
  ?
  ?
  ?, in BaseThreadInitThunk
  ?, in RtlUserThreadStart

Please build your app for 32-bit on windows and reproduce the problem.

The 64-bit stack trace is broken as far as I remember, so the names there are kind of random. Or build with pdb option.

2 Likes

Really? Is there a case for this? This should really be fixed.

We have only one known case out of thousands of users where we still need to provide 32 bit. So this is not an option for us.
If I activate PDB do we have any disadvantages? Are files written here that I can transmit if necessary?

1 Like

EnableMenuItems fires whenever a user clicks an item on the menubar. All this means is that the code that raised the exception was triggered by the user selecting a menu.

Usually, the place where the exception occurred is the second item in the stack.

This reads like you misunderstood the issue. Update: No that’s my bad, it’s just confusing before coffee.

The issue is that 64 bit builds stack trace is completely useless. 32 bit is what works.

#71308 - Missing data in error.Stack if app is build for Windows in 64bit

Literally only one out of thousands of users of our software products still uses a 32 bit version.
That’s why there aren’t any 32-bit versions of our products distributed.
That’s why we don’t have correct information in the strack trace if I understood this correctly?

1 Like

For this specific bug / issue, yes.

FWIW I see this bug in one of the projects I work on as well, but there’s no need for 64 bit on that project so we simply switch to 32 bit.

I just upvoted that case.

1 Like