airdcpp / airdcpp-windows

http://www.airdcpp.net
GNU General Public License v3.0
82 stars 19 forks source link

Closing window stuck forever!! #63

Closed k79e closed 1 year ago

k79e commented 3 years ago

After update to 4.1 this happens.

Sopor commented 3 years ago

I think you need to explain more what window you are referring to and what you are doing.

Operating system and version, 32 or 64 bits etc.

k79e commented 3 years ago

Win7 x64

RoLex commented 1 year ago

@k79e Please explain what you are trying to do, as @Sopor suggested, else this issue will be closed because it's impossible to understand what you are trying to do.

k79e commented 1 year ago

I think it's closing forever.

maksis commented 1 year ago

See https://github.com/airdcpp/airdcpp-windows/wiki/Client-hangs-(deadlock)

k79e commented 1 year ago

123.txt

This happens when I copyed the setting to new version. Anyway to export the settings safely?

maksis commented 1 year ago

The log might help with fixing the freeze. Does it happen every time you exit the client? Would you mind posting a log for another freeze so that I could confirm that it looks the same?

k79e commented 1 year ago

How can I find the log?

maksis commented 1 year ago

How can I find the log?

Just like the log that you posted earlier but from another freeze

k79e commented 1 year ago

I don't know why but when i started airdc++ it use a single core's cpu fully. And it isn't hashing. It don't have much connections but it stucks forever. And it always using a core's cpu fully. Is it because my config file is corrupted!???

111.txt

k79e commented 1 year ago

Hi i see there are exceptions when I let program run again in debugger.

0:042> g (aa0.155c): C++ EH exception - code e06d7363 (first chance) (aa0.9f4): C++ EH exception - code e06d7363 (first chance) (aa0.9f4): C++ EH exception - code e06d7363 (first chance) (aa0.1958): C++ EH exception - code e06d7363 (first chance) (aa0.13ac): C++ EH exception - code e06d7363 (first chance) (aa0.1ae4): C++ EH exception - code e06d7363 (first chance) (aa0.10cc): C++ EH exception - code e06d7363 (first chance) (aa0.b60): C++ EH exception - code e06d7363 (first chance) (aa0.195c): C++ EH exception - code e06d7363 (first chance) (aa0.1054): Unknown exception - code 000006ba (first chance) (aa0.1600): Unknown exception - code 000006ba (first chance) (aa0.1054): Unknown exception - code 000006ba (first chance) (aa0.1600): Unknown exception - code 000006ba (first chance) (aa0.1054): Unknown exception - code 000006ba (first chance) (aa0.1600): Unknown exception - code 000006ba (first chance) (aa0.1600): C++ EH exception - code e06d7363 (first chance) (aa0.1600): C++ EH exception - code e06d7363 (first chance) (aa0.1600): C++ EH exception - code e06d7363 (first chance) (aa0.1548): Unknown exception - code 000006ba (first chance) (aa0.1548): Unknown exception - code 000006ba (first chance) (aa0.1548): Unknown exception - code 000006ba (first chance) (aa0.1548): C++ EH exception - code e06d7363 (first chance) (aa0.1054): C++ EH exception - code e06d7363 (first chance) (aa0.c54): Unknown exception - code 000006ba (first chance) (aa0.c54): Unknown exception - code 000006ba (first chance) (aa0.c54): Unknown exception - code 000006ba (first chance) (aa0.c54): C++ EH exception - code e06d7363 (first chance) (aa0.e60): Unknown exception - code 000006ba (first chance) (aa0.e60): Unknown exception - code 000006ba (first chance) (aa0.e60): Unknown exception - code 000006ba (first chance) (aa0.7f4): Unknown exception - code 000006ba (first chance) (aa0.7f4): Unknown exception - code 000006ba (first chance) (aa0.e60): C++ EH exception - code e06d7363 (first chance) (aa0.1af0): Unknown exception - code 000006ba (first chance) (aa0.1af0): Unknown exception - code 000006ba (first chance) (aa0.1af0): Unknown exception - code 000006ba (first chance) (aa0.1af0): C++ EH exception - code e06d7363 (first chance) (aa0.1af0): C++ EH exception - code e06d7363 (first chance) (aa0.1af0): C++ EH exception - code e06d7363 (first chance)

maksis commented 1 year ago

@k79e Could you post your current system message log format value? Settings -> Logs -> Log system messages -> Format.

Are you seeing any messages in the system log? And are there any system log messages about ignored chat messages?

k79e commented 1 year ago

System log have content but don't have thing related with chat

maksis commented 1 year ago

Based on the logs, my best guess would be that you receive a private message after startup that matches your chat filters. The client then tries to log the ignored message in the system log but for some reason goes into an infinite loop while formatting the message variables.

Do you notice if one of your hubs is frozen (you don't receive any hub/private messages and you can't send anything either)?

k79e commented 1 year ago

How can I know if a hub is forzen? It's sure that something used all cpu. So it might blocked the other operation. It might not caused by hub's message, I created a new profile with old hub and it don't stucks.

k79e commented 1 year ago

I find it might related with long file name

maksis commented 1 year ago

I find it might related with long file name

Where?

k79e commented 1 year ago

When add a folder which contain the very long file name. It stucks at refreshing forever and used all cpu.

If a longname file is added to a already existed shared folder then it might stucks forever without show the refreshing.

maksis commented 1 year ago

Could you post another log that is taken while the client is running with CPU at 100% (not frozen) so that I could check?

k79e commented 1 year ago

n1.txt

maksis commented 1 year ago

Are you sure that the app was running with CPU stuck at 100% when the log was taken? I can't spot anything unusual from the log.

k79e commented 1 year ago

It used a whole cpu of a single core.

maksis commented 1 year ago

When looking more carefully, I may spot the problem from the log. There's just no complete stack available for the stuck thread, just a single line:

38 Id: 1b3c.1ab4 Suspend: 1 Teb: 000007fffff5e000 Unfrozen Child-SP RetAddr Call Site 000000000b00d7c0 00000000`00000000 AirDC!memset_repstos(void)+0x9 [D:\a_work\1\s\src\vctools\crt\vcruntime\src\string\amd64\memset.asm @ 35]

Based on that, I'd say that it's the same issue related to a filtered chat message.

How can I know if a hub is forzen?

You could try closing each of the connected hubs individually. I believe that the application will freeze when you attempt to close the hub that is stuck.

k79e commented 1 year ago

Maybe I was wrong. I added a folder that folder is a shortcut link. Then it stucks.

k79e commented 1 year ago

Well it's funny. Ill try your mentioned thing later. Now I added the real folder that shortcut pointed to. At first it don't stuck. But now it used a core's cpu constenstly.

maksis commented 1 year ago

Based on the logs, this isn't a share-related issue

k79e commented 1 year ago

Well it really stucks when I exit a hub!!! It called 'favorite group'

k79e commented 1 year ago

a051.txt

New log here.

maksis commented 1 year ago

If you open the hub properties from favorites, what's the NMDC encoding value set for the hub?

maksis commented 1 year ago

And what's your operating system language/locale?

k79e commented 1 year ago

I can't find where to look the hub's property. My system is usine zh_cn locale.

I find it and it's the "System default"

maksis commented 1 year ago

My system is usine zh_cn locale.

Oh, that might explain something. The hub sends a weird private message with Cyrillic characters after login that probably causes the issue.

Could you try different NMDC encodings for the hub to see if they work properly? You can change the encoding from the Favorite hubs (select the correct hub and open properties).

k79e commented 1 year ago

Changed to utf8 and in that group it said something with utf8 verify failed. Then I changed it to win-1251 and it don't stucks anymore!!!

k79e commented 1 year ago

How can this happen!?? I joined to some other russia hubs. And they are fine. Just this 'favorite group' and its bugging me!!!!

maksis commented 1 year ago

I'm not sure, I need to see if I can reproduce the issue (not today), but most likely it's caused by the filtered message.

What's your operating system version?

k79e commented 1 year ago

I'm using win7x64

maksis commented 1 year ago

This isn't an encoding issue after all. The hub in question is being used to DDoS a Russian web site in a way that they send about 150 connection request per second (!) to the client asking the client to connect to the address of that specific site. AirDC++ (and most likely every other DC clients as well) can't throttle or even report such abuse. That's way too many connection requests for the client to make so it's no wonder that it may also crash the app as it hogs all system resources.

k79e commented 1 year ago

What about the long filename. This seems another bug. I find it it stucks(use a core's cpu fully constantly, don't remember whether will it freeze or not) then at next start , the small window of refresh of files or something similar stucks forever!!!

maksis commented 1 year ago

What about the long filename. This seems another bug.

You should open a new issue with a log from WinDbg attached while the client is stuck at refreshing and I can have a look. Just wait long enough before taking the log so that the client is really stuck at the problematic files.

Note that since you are using Windows 7 that is no longer supported, the issue may not be fixed if it doesn't affect newer operating systems.