Hello, let me start by saying that I have no idea where I should be posting this since none of these topics specifically said "post help requests here" so I'm just posting this wherever I can in order to get some help from someone.
I have attached my code that I've been working on, this is an interface I've been developing (keep in mind this is my first program I've ever made so it's probably not professional grade by any means as I'm still an undergraduate learning about this stuff). The problem that I've been running into, and can't seem to solve, is that as I'm running a scan the program seems to freeze in the middle of the .NET invoke node (which could be due to the cornerstone.dll that it's linked to). It seems to just get stuck inside the invoke node when I do long scans. I've tried a lot of different things to fix this to no avail however at one point I thought that it could be the computer (as the PC that's running the whole thing is pretty old). So when I switched to my laptop I noticed that the scan would run for 100-200 nm longer before crashing. If someone who knows what they're doing could just look at the code and see if anything stands out that would be great.