-
Notifications
You must be signed in to change notification settings - Fork 63
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
[Bug]: Getting an application crash when pressing the Delete key. #1373
Comments
Hi @Tape-Worm This might be a errant |
.NET 6.0 with krypton version 5.550.2103, works as expected. No error. .NET 6.0 with krypton version 80.23.11.321, works as expected. No error. .NET 8.0 with krypton version 5.550.2103, crashes. Seems this is only occurring on .NET 8. |
Hi @Tape-Worm Are there any instructions on how to compile Gorgon, as every time I try to compile, I run into 'library' missing errors? |
Did you update the submodules? |
Does it require the DirectX SDK to be installed? |
Nope. It shouldn't. I don't have it installed. You may need to do this? The article looks to be a little out of date, the Optional Features is now located under "System". |
I thought that is was odd that I couldn't find it |
So, I just pulled it down to a neutral location on my harddrive, and it compiles just fine. I did run into a problem at first because I had put it under a directory with spaces in the name. Once I moved it out of there, it compiled fine. The spaces in path problem is now fixed in develop. That was a major pain, thanks for pushing me to find it. :) |
Oh, I should also warn you that you may see an error about RoboCopy, just Build again if that pops up. I dunno why it doesn't work sometimes. |
I have no idea what "AppHost" is. Although, it seems to be something to do with the C++/CLI compiler: The Microsoft.Wpf.Interop.DirectX_winsdk is a C++/CLI assembly (you can thank Microsoft for this stupid decision). Do you have the C++ components installed? It needs the v143 platform toolset. The GlassCube.WPF assembly won't compile without that Microsoft.Wpf.Interop.DirectX_winsdk assembly, so that's why it was failing. Honestly, you don't need it for this use case, just remove It should compile after that. I just tried on my work computer, which has never had Gorgon on it before, and it worked fine. So I'm guessing there's something missing with your installation of VS. |
I've now got C++/CLI stuff installing. If that fails, then I'll try it in one of my VMs. |
Just FYI, I also had it crash while I was holding down the CTRL key to zoom in on something. Same stack trace. |
@Tape-Worm I haven't forgotten about this, been fixing/implementing new stuff recently. |
No worries my friend. I'm currently doing a major upgrade to .NET 8, and it'll take quite some time before I hit the UI related stuff. |
Hi @Tape-Worm, I've been looking into another datagrid issue #1280. When testing with TK 80.24.3.64 I didn't get the error, Could you give that TK version a try please ? |
No response received from @Tape-Worm. ty. |
Sorry, I've been plagued with health issues and my partner and I have been dealing with her cancer diagnosis and subsequent treatment (she's all clear now). So, I haven't been paying much attention to programming for the last few months. I just updated to the latest version on nuget, 85.24.6.176, and I'm still getting the exception. I am not using anything other than the Krypton Form (for the main window only), and the ribbon. Any data grids I have are the basic .NET data grids that come with windows forms.
|
Hi @Tape-Worm, Sorry to hear that and wishing you all the best. Thanks for responding I will look in to as soon as there's time (of which we don't have enough...) |
Hi @giduac I've reopened this, which version tag should I assign? I think it's something to do with the ribbon. @Tape-Worm Sorry to hear that, wishing you and your partner all the best! |
@Wagnerp , V85 & V90 tags |
Hi @Tape-Worm, Some questions for you:
|
@Tape-Worm Great!! |
I should also note that the context strip menu was attached to a button on my ribbon: You'll probably need to do something like this to cause it to crash in a small test app. |
@Tape-Worm |
You'll also need to set the button type to DropDown (which I guess kinda goes without saying considering we're hitting a context menu). I just tried a small test app, which I've attached here. You'll need to point it at your Krypton DLLs as I have it pointing to mine on my local drive. |
@Tape-Worm In the mean while we'll be looking into it further since it's also a bit weird that the Ribbon processes the key stroke that's intended for the grid. I'll keep you posted. |
It has nothing to do with the grid. If you pull the grid out of that sample, and use the Krypton Ribbon Lite on nuget, you will get exactly the same issue. The grid has nothing to do with this. The ribbon is processing all key strokes and checking to see if they are used on the attached context menu strip. That's all that function is doing. I've attached another sample without a grid, and you'll see that it crashes just the same. Again, this has nothing to do with grids. |
@Tape-Worm KryptonContextMenu gets a different treatment in the RibbonGroupButton code if (ButtonType is GroupButtonType.DropDown or GroupButtonType.Split)
{
if (KryptonContextMenu != null)
{
if (KryptonContextMenu.ProcessShortcut(keyData))
{
return true;
}
}
if (ContextMenuStrip != null)
{
if (CommonHelper.CheckContextMenuForShortcut(ContextMenuStrip, ref msg, keyData))
{
return true;
}
}
} Anyways will put your fix in asap |
I have a custom tree with a standard text box that I use for renaming nodes. When that textbox is on screen, you'd think it'd have first crack at the input. Nope, it doesn't. The ribbon previews that as well. To verify this, I took that sample app, and added a textbox. Just a standard basic textbox that comes with windows forms. When the app loads, I give focus to the textbox and hit 'A' and boom, crash again (using the current nuget version of the krypton ribbon). For some reason the designers of this component have decided to intercept all keystrokes via the ribbon. I agree it's really strange. But not only that, it's potentially problematic because if I were to hit a key associated with a menu item, it will (I tested this as well) execute that menu items functionality. That breaks the rules of how focus works in an application. I think this method needs to check to ensure that the ribbon has focus or something like that before it tries processing anything. Or better yet, stop capturing everything. Re: The KryptonContextMenu.I don't want to use any more Krypton controls than I'm currently using. Given the issues that I have right now, I'm on the fence as to whether I want to keep using this library or not. Adding more references just makes my life a lot harder. Also, I provide extensibility functionality in the application, and I want my users to have minimal interaction with a control set that they may be unfamiliar with or not want to use. |
Hi @Tape-Worm,
We are currently reducing open issues for the rest of V90. V100 will mostly encompass improving it further to raise the quality. If you have ideas for improvement then we are always interested to hear... |
The main issue that's a major problem for me is the designer not working with the Ribbon (which I brought up a couple years back). At this point, I do not wish to put in support for .NET 4.8 just so I can create/edit a control (I also then have to litter my code with #if NET80_OR_GREATER conditionals, which I despise having to do). But that's not relevant to this issue, I think we can safely close this now? Thank you for your help. |
You're welcome and thanks for your input @Tape-Worm. Had a quick look yesterday and found 1 windows keyboard hook in the Toolkit and the Ribbon has it's own WndProc. Possible sources for these key captures. To be continued,,,, Your PRs are merged. |
Thanks! I don't need it right away, so I can wait until you guys do another stable release. |
Describe the bug
In my application, I have a grid containing a list of files. I also have a Krypton ribbon present. When I press my delete key, I expect the application to ask me if I want to delete the file.
Instead, what happens is an unhandled exception is thrown. This is weird, because my code should have trapped the exception. It did not.
Here is the stack trace that is given on the crash:
As you can see, it ends up in a Krypton Toolkit Helper class.
Additional context
@Wagnerp , since you forked my repo, you can reproduce this in the Gorgon Editor application. Just create a new file and then select it in the file pane and press your delete key. If you get the develop branch, you'll get the .NET 8 version.
The text was updated successfully, but these errors were encountered: