NetScan gets stuck during network scans

10 posts · Closed

WindowsStar
25 Aug 2017

Good morning,

Many times I scan a network and NetScan gets stuck with something like "Threads 62 Devices 62 /62" and never continues. I assume it is stuck trying to gather the information I have requested but cannot for some reason. I have let the software run all day and it will stay stuck. If I stop the scan and then force the threads to end, the software will stay stuck on 62 threads and eventually I have to use Task Manager to end the software or, worse, reboot the computer.

Is there a way to add an option to tell you where a thread is stuck? In other words, an option to put NetScan into, say, a diagnostics mode so when you are scanning a network with a lot of options you could find out where NetScan is stuck?

Thanks,
WS

Andrew SoftPerfect
26 Aug 2017

There's no out of the box diagnostics for that, but I believe it's caused by a bug in the Windows API FindFirstFileExW (or underlying network driver), which for some reason never returns. Try:

  • Unchecking Check for write access under Options - Shares; and
  • Unchecking all items under Remote File.

Then rescan the problematic addresses to see if the issue persists and please let me know.

WindowsStar
29 Aug 2017

Andrew, been slammed with work. I thought I would have some time to work on this. I will get back to you. Thanks so much. -WS

WindowsStar
31 Aug 2017

I made the changes. Didn't seem to help. I have a massive amount of stuff I am scanning for and something I changed a while back made it get stuck and I cannot find it. -WS

Andrew SoftPerfect
1 Sep 2017

That's pretty strange then, and I'd love to identify the cause of it.

Please submit a ticket here and I will send you a personalised build with debug information to find out what's going on there.

borekon Guest
12 Sep 2017

The same happens to me since many versions. It was working well but suddenly that problem happens, no matter which version.

Andrew SoftPerfect
12 Sep 2017

It could the same issue as OP's. In that case it happens deep in the WNetAddConnection2() system API call, which is used to authenticate custom user name and password in several types of scan. It's a fairly common issue, for example discussed here.

Unfortunately there seems to be no solution for this problem. The recommended CancelSynchronousIo() call doesn't seem to cancel WNetAddConnection2(), which is also confirmed by this discussion.

bizmarkie
17 Sep 2017

Why can't Microsoft fix this? They must know about it.

Gaurav Guest
10 May 2018

I have a similar issue: in the status bar it shows "threads 50", scanning has been going on for a long time and appears to be stuck at 673 devices. However I have around 1200-1300 machines in my company. Could you please help me out here. Thanks!

Ann SoftPerfect
10 May 2018

As suggested before, you can try:

  • Unchecking Check for write access on the Shares tab in Options.
  • Unchecking all items in Remote File.

Alternatively, you can set Max. thread run-time on the General tab in Options to something around 60 sec, and the application will attempt to terminate those stuck threads.

This topic is closed. It has had no new posts for over a year, so the software versions it talks about may be out of date. Start a new topic in Network Scanner if you have a similar question.