Crash in "GridEditorComboBox.WndProc"

Posted by: wknauf on 24 December 2024, 5:53 am EST

  • Posted 24 December 2024, 5:53 am EST

    We got a few bug reports from customers after updating our app to .NET8 (using C1 .672). Here, the app crashes when a C1FlexGrid combobox editor is opened, and in the windows eventlog, this entry is found:

    CoreCLR Version: 8.0.1124.51707
    .NET Version: 8.0.11
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    Stack:
       at Windows.Win32.PInvoke.CallWindowProc(Windows.Win32.Foundation.LRESULT (Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM), Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
       at Windows.Win32.PInvoke.CallWindowProc(Windows.Win32.Foundation.LRESULT (Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM), Windows.Win32.Foundation.HWND, UInt32, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
       at System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
       at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.ComboBox.WndProc(System.Windows.Forms.Message ByRef)
       at C1.Win.FlexGrid.GridEditorComboBox.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, Windows.Win32.MessageId, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
       at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
       at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
       at System.Windows.Forms.Application+ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr, Microsoft.Office.msoloop, Void*)
       at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
       at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
       at ...(our code that shows a form)...
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    

    Due to christmas vacation, the affected customers are currently not available for further testing, so I cannot give you feedback whether it is reproduceable with a simple sample.

    Did you hear about this issue?

    Best regards

    Wolfgang

  • Posted 26 December 2024, 1:03 am EST

    Hello Wolfgang,

    We’re sorry, but we could not find any similar behavior reported to us before. Furthermore, we could not replicate the behavior with the mentioned version.

    Could you please provide us with a stripped-down sample or update the attached sample to replicate the behavior for further investigation? Also, please provide steps to replicate the behavior.

    Sample: Flexgrid_ComboBox.zip

    Regards,

    Uttkarsh.

  • Posted 27 December 2024, 5:53 am EST

    Your sample appears to be similar to our approach. I will test it with the customer, but she is not available before the new year. I will come back with further information.

    Happy new year (in case your cultural zone is the same as mine :wink: )!

    Wolfgang

  • Posted 2 January 2025, 6:24 am EST - Updated 2 January 2025, 6:29 am EST

    I talked with the customer. The error happens only rarely, but if it happens, it is reproduceable for some time. Your sample worked of course when we tested it. I told her to call me as soon as it happens so that we can test whether it also happens with your sample.

    It started after we upgraded our app to .NET8 and C1. 672.

    Attached are some screenshots of the screen settings - hope you can make sense of them though they are german.

    Recent NVidia driver is installed:

    Will keep you up to date if we make some progress.

    Best regards

    Wolfgang

  • Posted 3 January 2025, 1:31 am EST

    Hello Wolfgang,

    Thank you for sharing additional details.

    Please test the application with the latest version (2024v2 Hotfix 1 693) for the issue and share the following information for further investigation:

    1. Machine OS details.
    2. A video/GIF of the issue.
    3. Stack trace with the latest version.

    Regards,

    Uttkarsh.

  • Posted 3 January 2025, 4:29 am EST

    Do you plan to do a regular release installable by the ControlPanel? Or is it only a Nuget release? If the latter: where can I access the release notes? I don’t want to upgrade the component before checking the release notes.

    It would take some time anyway until we can test the new version at the customers site. Currently, we plan a release of our next version in the second half of January.

    Best regards

    Wolfgang

  • Posted 6 January 2025, 12:50 am EST

    Hello Wolfgang,

    Apologies for the inconvenience, but the release notes for the latest updates will be available with the build installation through the C1ControlPanel. [Change logs get installed at ‘C:\Program Files (x86)\MESCIUS\ComponentOne\WinForms’ location on your machine.]

    The build will be available on the C1ControlPanel in a few days.

    If possible, could you please test a simple sample of your grid with a ComboBox using the latest NuGet packages to see if the behavior can be reproduced? We need to be sure that the behavior is the same with the latest available builds to escalate it to the development team for further investigation.

    Thank you for your understanding.

    Regards,

    Uttkarsh.

  • Posted 7 January 2025, 10:17 am EST

    Thanks.

    In the meantim I continue trying to reproduce it and will test it with .693 as soon as it is available. But the crash in our app does not occur reproduceable, the user has to use the program for some time, so a test release of the newest version might not be enough and we have to wait for our next final release.

    The error might also be a side effect of some problem in our app that we are not aware of.

    I will come back during the next few weeks whenever I have updates.

    Best regards

    Wolfgang

  • Posted 13 January 2025, 9:22 am EST

    I could reproduce the error with our “real” app also on my own machine by opening two different forms with ComboList/DataMap flexgrid columns several times.

    But “unfortunately” we were forced to resolve the crashes on the customer sites, so I replaced the two crashing ComboList dropdowns by comboboxes with IEmbeddedEditor implementations. As the code changes for this were bigger, I cannot easily switch back to the old behavior to test whether the error also happens with .693. So we will not be able to test it with the new version unfortunately.

    You can close this issue.

    Best regards

    Wolfgang

  • Posted 14 January 2025, 12:11 am EST

    Hello Wolfgang,

    Thank you for the update. We understand the challenges and appreciate the effort you’ve put into replicating/resolving this. If anything comes up in the future, feel free to reach out.

    We’ll close this issue for now and apologize for any inconvenience.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels