Page 1 of 2

Hangs when plugging USB-drives

Posted: 18 Sep 2016 19:08
by tim
Hello!
Ever since I used XY first time I have been encountering this problem. Every time device with storage plugged in via USB, XY hangs in about a minute performing some CPU work, blocking whole interface. Any hints what can be a reason?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 09:47
by admin
Is that a device that turns up with a drive letter, or is it a "Portable Device" that turns up with the device name?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 13:38
by tim
admin wrote:Is that a device that turns up with a drive letter, or is it a "Portable Device" that turns up with the device name?
I think both. Ordinary USB stick, smartphone with a card (different smartphones use different schemes: they appear either as Portable Device or as a drive with letter; both schemes cause hangs). So, as I said, general idea is that every device with storage connecting via USB can cause this.

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 13:51
by admin
That's really strange. I don't see this here at all. Portable Devices usually take some time to appear, but that's true for Explorer as well, so it's just Windows doing its thing.

Could it be related to the AV mentioned in your signature?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:09
by tim
admin wrote:Could it be related to the AV mentioned in your signature?
Maybe, but XY is in exclusions there. Explorer shows connected drives and allows to work with them while XY is hanging. It starts right after device is plugged. XY takes up to 40% of CPU while doing it. Interface freezes. After some time (up to 1 min) XY is ok.

Here is what Process Explorer shows:
Image

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:19
by admin
XYplorer calls some synchronous Windows functions in the main thread, so it has to wait for Windows to return. There is no other way to do this at the moment. The question remains: Why only you? I don't see these delays here. :?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:20
by tim
Image

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:25
by tim
admin wrote:XYplorer calls some synchronous Windows functions in the main thread, so it has to wait for Windows to return. There is no other way to do this at the moment. The question remains: Why only you? I don't see these delays here. :?
Oh :D Many reasons. Maybe one Windows update did it, maybe it's because I haven't some needed update... But it's only assumption.
There is no other way to do this at the moment.
Do what?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:31
by admin
tim wrote:
There is no other way to do this at the moment.
Do what?
I mean this: XYplorer calls some synchronous Windows functions in the main thread. No background threading possible.

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:36
by tim
admin wrote:I mean this: XYplorer calls some synchronous Windows functions in the main thread. No background threading possible.
What kind of functions XY calls at that moment?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 14:44
by admin
Oh, that was just a general theory. I wanted to say: It's not XYplorer who is working on anything for one minute. It has to be some Windows function that does not return, and XYplorer just sits there and waits. But to pinpoint the particular line that's responsible I would have to write some special debug code and run a test series.

Do you get the same delays also with a fresh instance? (see https://www.xyplorer.com/faq-topic.php?id=fresh)

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 15:49
by tim
admin wrote:Do you get the same delays also with a fresh instance? (see https://www.xyplorer.com/faq-topic.php?id=fresh)
Oh. Suddenly no, I don't get. Works fine on fresh. :? Something wrong with my configuration? Where to dig?

Re: Hangs when plugging USB-drives

Posted: 19 Sep 2016 19:02
by admin
Hmm, there is no setting "1 minute delay when plugging USB-drives". Seriously, no idea since I have no idea what's causing this. However, if the delay is really gone now, that's a) good news, and b) puts part of the blame back to XY.

Play with your settings, let me know.

:!: Uh, wait, i have an idea! Untick this:
Configuration | Startup & Exit | Reconnect mapped network drives on startup

(Checkbox only exists since v17.10.0007!)

Re: Hangs when plugging USB-drives

Posted: 20 Sep 2016 13:06
by tim
admin wrote: Play with your settings, let me know.
So far I tried untick these:
— Refresh, Icons, History | Auto-refresh | Include removable drives
— Thumbnails | Cache thumbnails on disk | Include removable media
No effect. I don't know which should be next, so many settings (including tweaks). Maybe some tweaks can affect? You as a developer know more than I do. Which settings can affect at the moment when USB-drive is plugging?
admin wrote: :!: Uh, wait, i have an idea! Untick this:
Configuration | Startup & Exit | Reconnect mapped network drives on startup

(Checkbox only exists since v17.10.0007!)
I have v16.50.0200. I'll try this one.

Re: Hangs when plugging USB-drives

Posted: 20 Sep 2016 13:19
by tim
Untick this:
Configuration | Startup & Exit | Reconnect mapped network drives on startup
No effect on v17.20.0000.