Geesu
Geesu

Reputation: 6008

C# - Application randomly locking up when interacting with the UI

So I'm quite new to C#, but I'm working on a rather large threaded application that has been deciding to lock up.

I'll either be clicking a button to just launch a new form, or trying to resize a table, and it will lock up and I have to quit the program.

Does anyone have any ideas on how I can debug? If I just click Break All it takes me to Application.Run(Forms.AllForms.MainForm); which isn't very helpful.

Bit new to Visual Studio (I'm an Obj-C dev) but are there debugger options that would let me step back to see the call stack that may indicate why this is happening?

I'm also using Krypton Components, not sure if that matters.

Thanks in advance!

Upvotes: 0

Views: 279

Answers (1)

YoryeNathan
YoryeNathan

Reputation: 14522

You probably have some heavy work on the main thread instead of a separate thread someplace.

The easy way would be to put a breakpoint on the button click event and press it, then slowly go through the code, see if there is anything that should be threaded and isn't, or an infinite loop of some sort.

Post some of your code and explain about the program, if you don't mind, so we can help you better.

Upvotes: 2

Related Questions