GithubHelp home page GithubHelp logo

Comments (12)

stumper66 avatar stumper66 commented on June 15, 2024 1

@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.

Olina-Zhang avatar Olina-Zhang commented on June 15, 2024 1

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.

stumper66 avatar stumper66 commented on June 15, 2024

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.

stumper66 avatar stumper66 commented on June 15, 2024

Here is my fix for it: stumper66@ae5cd93

from winforms.

elachlan avatar elachlan commented on June 15, 2024

@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.

stumper66 avatar stumper66 commented on June 15, 2024

@elachlan Here is the PR: #11092

from winforms.

elachlan avatar elachlan commented on June 15, 2024

I think it might be prudent to investigate what kind of tooltip its trying to show and what triggers it?

from winforms.

stumper66 avatar stumper66 commented on June 15, 2024

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.

elachlan avatar elachlan commented on June 15, 2024

@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.

stumper66 avatar stumper66 commented on June 15, 2024

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.

merriemcgaw avatar merriemcgaw commented on June 15, 2024

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.

stumper66 avatar stumper66 commented on June 15, 2024

I've created a new PR targetting main branch.
#11134

from winforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.