Comments (12)
@elachlan I will submit a PR.
I've been unable to provide a test but I fixed the problem with my own locallly built System.Windows.Forms.dll with the submitted fork: stumper66@ae5cd93
from winforms.
It is a similar with GH issue: #7262 with same CallStack, but we cannot reproduce for our created application. Hopefully a repro application provided.
from winforms.
Full callstack:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Control.GetSafeHandle(IWin32Window window)
at System.Windows.Forms.ToolTip.TryGetBubbleSize(IKeyboardToolTip tool, Size& bubbleSize)
at System.Windows.Forms.ToolTip.ShowKeyboardToolTip(String text, IKeyboardToolTip tool, Int32 duration)
at System.Windows.Forms.KeyboardToolTipStateMachine.ShowToolTip(IKeyboardToolTip tool, ToolTip toolTip)
at System.Windows.Forms.KeyboardToolTipStateMachine.Transition(IKeyboardToolTip tool, ToolTip tooltip, SmEvent event)
at System.Windows.Forms.KeyboardToolTipStateMachine.Transit(SmEvent event, IKeyboardToolTip source)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
at Windows.Win32.PInvoke.DispatchMessage(MSG* lpMsg)
at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at ManageVMs_Core.Program.Main() in C:\Users\buffalo\Documents\Visual Studio 2022\Projects\ManageVMs_Core\ManageVMs_Core\Program.cs:line 29
This exception was originally thrown at this call stack:
[External Code]
ManageVMs_Core.Program.Main() in Program.cs
from winforms.
Here is my fix for it: stumper66@ae5cd93
from winforms.
@stumper66 did you want to submit a PR and provide a test?
@Olina-Zhang Is your team able to reproduce this issue in the test project?
from winforms.
@elachlan Here is the PR: #11092
from winforms.
I think it might be prudent to investigate what kind of tooltip its trying to show and what triggers it?
from winforms.
I do not have any tool tips defined.
I had added debugging inside the function, here is one of the values I logged as I was pressing on the keys.
03/19/2024 17:14:50.838 inside TryGetBubbleSize, tool: DataGridViewTextBoxCell { ColumnIndex=0, RowIndex=-1 }
Note that I have the TreeView updating a DataGridView based on its values so looks like it's coming from there.
from winforms.
@stumper66 could you debug the WinformsControlsTest project and try to reproduce it there? Maybe set a breakpoint and look at the call stack to see what causes the tooltip to be triggered?
from winforms.
There is possibly a trigger for the toolip that shouldn't be there but if you look at my PR it's making a change that should've been there to begin with. It's getting passed a nullable value then assuming it is not null.
By checking if it's not null first it fails the ghost tooltip gracefully.
Since the tooltip is not triggered by any user code it is very hard to pin down. I've been dealing with this bug for years hoping each new .net version would fix it.
from winforms.
Can we change this PR to .NET 9 main, and we will need to be the ones to cherry-pick it ourselves to take it in servicing. @Tanya-Solyanik to drive this through shiproom and follow the fix.
from winforms.
I've created a new PR targetting main branch.
#11134
from winforms.
Related Issues (20)
- TaskDialogPage F1 help bubbles up to owner control HOT 5
- The visual basic code source does not match any code style HOT 2
- Add Analyzers/CodeFixes to guide implementing Custom Control Properties according to WinForms best practices
- Add Analyzers/CodeFixes to guide the handling of Modal Dialogs to avoid memory leaks
- Add Analyzers/CodeFixes to guide a data entry Form's validation process HOT 1
- The ContextMenu of NotifyIcon Positioning Issue on Multi-Monitor Setup with Differing Scaling Factors HOT 4
- [Tracking] BindingContext getter isn't trim compatible
- Microsoft.Windows.Compatibility 8.0.4 references unreleased nuget packages HOT 2
- Re-occurrence of WinForms designer failing to load (was #8996) HOT 5
- [GB18030]Dotnet publish failed with CLI if project output directory with GB18030 provided level3 strings HOT 2
- TreeView has the incorrect TreeNode Editor dialog in PropertyGrid HOT 7
- Assembly resolving logic in Out-Of-Process WinForms Designer does not work for *.Resources.dll Assemblies HOT 8
- Help us improve - Quick Survey HOT 5
- "No room is available to display rows" exceptioin thrown HOT 1
- Right outer ToolStrip Label in StatusStrip isn't displayed when the left outer Label is a spring Label HOT 1
- Font autoscaling doesn't function in .NET Core as it does in .NET Framework 4.8. HOT 12
- Debug.Fail(...) crashes the Out-Of-Process WinForms Designer HOT 7
- DataGridView shown on components area, not visual design surface HOT 7
- Unstable unit test: System.Windows.Forms.Tests.ImageCollectionTests.ImageCollection_Item_Get32bppColorDepth_Success
- Unstable unit tests that need to be disabled and fixed HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winforms.