Skip to content
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

ContextMenu crash when the second-level menu have icon #405

Open
gufengaoyue opened this issue May 27, 2024 · 0 comments
Open

ContextMenu crash when the second-level menu have icon #405

gufengaoyue opened this issue May 27, 2024 · 0 comments

Comments

@gufengaoyue
Copy link

I have created a ContextMenu class library in VB.NET using SharpShell.
It includes 9 first-level menus and 24 second-level menus, each with a corresponding icon.
However, after 72 right-click attempts, the right-click menu crashes, turning into a pure white or black state.
At this point, only restarting explorer can restore it to normal.

After reducing the number of second-level menus, the number of clicks increases, but it still crashes after reaching a certain number.
Even after reducing to 4 second-level menu icons, it still crashes after over 200 clicks.

If there are no second-level menus or if the second-level menus do not have icons, there is no crash (or the number of clicks can be very high).
The icons of the first-level menus seem to have no effect.

SharpShell/Samples/ContextMenu/DynamicSubMenu
I replicated this issue in the project by adding multiple second-level menus, and the same crash occurs.
The more icons in the second-level (or third-level, etc.) menus, the fewer clicks are possible and the faster it crashes.

This is the problem I'm facing. Is there something I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant