-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Displaying ContextMenu
/NativeMenu
with many items cause crash
#3563
Comments
Yes that's an OS error that we've encountered and then not handled properly... can't do much to add further menu items, but we can adjust it so it doesn't crash; the Your example uses the thanks |
@ajwfrost but I can see the same crash using Here is sample:
|
Yes - sorry, I wasn't clear enough there... the crash is happening because of some implementation error when the OS fails to add the menu item. In terms of the existing error handling, what I meant was that if there is an error condition that the glue logic detects, it returns null i.e. this is what /should/ happen in the scenario where the OS has hit a limit. In other words: when we provide the fixed version, it should then return null.. currently though it's crashing :-( |
Fixed with latest AIR 51.1.2.3. @ajwfrost |
Problem Description
Displaying
ContextMenu
/NativeMenu
with many items (1069 or more) cause crash for Windows.For example, if you try to list fonts names installed in OS (if them a lot).
Yes, it's not good practice to use context menus with a lot of elements. But at least it shouldn't cause application crash.
Tested with multiple AIR versions, even with latest AIR 51.1.2.2 with different Windows devices, different OS versions, different AIR applications with different architectures (32/64-bit).
Same issue in all cases.
With less items count (1068 or less) all works fine.
There is no such issue with macOS and Linux.
Related issues:
#193
#192
#191
Steps to Reproduce
Launch code below with any Windows device and click anywhere on stage. Application will try to show context menu with 1069 elements.
Application example with sources attached.
windows_contextmenu_many_items_crash.zip
Actual Result:
Application crash:
Expected Result:
Context menu will be shown. Or AS3 exception should be thrown if it not possible (OS limitation).
Known Workarounds
Do not display context menus with 1169 or more elements. Write your own implementation for that.
The text was updated successfully, but these errors were encountered: