TC 11.03RC1 - Lister and video files

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC 11.03RC1 - Lister and video files

Post by *Hacker »

Fla$her,
I don't think the latest fix has reduced the load.
The claim was that the fix reduced the problem (of being annoyed by sound), not that the fix reduced the load.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: TC 11.03RC1 - Lister and video files

Post by *Fla$her »

OK. I read it wrong.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.03RC1 - Lister and video files

Post by *ghisler(Author) »

The problem with OLE interfaces is that they have a usage counter. When starting to use the interface from somewhere you increase the counter, and when you stop you decrease it. When the counter reaches zero (no one uses the interface any more), the interface gets unloaded.

Now when something else uses the same interface Lister uses but doesn't decrease the counter, the OLE interface stays loaded even when Lister decreases the counter. Lister could continue to decrease the counter until the interface gets unloaded, but then the other user would crash when trying to access (or unload) the now unloaded interface.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.03RC1 - Lister and video files

Post by *ghisler(Author) »

I have tested this now on an old PC with Windows XP, and I was indeed able to reproduce the problem. It did not occur in the XP emulator.

I did a lot of testing on that old machine, and found out that both stopping the replay and unloading the graph have to be called from the main thread, not from the player thread, although all the other calls are made from the player thread. This only seems to affect Windows XP. The downside is that when stop or unload hang on the main thread, then the entire Total Commander will hang.

So I added the following solution:
1. On Windows XP, call Stop and then unload the graph on the main thread
2. No changes on newer Windows versions
3. If the above change leads to hangs, you can revert to the old method by adding:
wincmd.ini
[Lister]
StopInMainThread=0

I did encounter hangs in Total Commander, but this was because I was still calling "Stop" in the background thread when the track ended.
If this causes Total Commander to hang, I will make StopInMainThread=0 the default.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: TC 11.03RC1 - Lister and video files

Post by *Fla$her »

2ghisler(Author)
I'm glad that you have tackled the problem thoroughly. 👍🏼 The first thing I thought of when you talked about XP tests was a virtual machine on which it's not always possible to detect a problem. We've seen this before with other bugs.

In RC5 threads began to unload (except for new ones from RPCRT4.dll), no pause is required, no freezes detected! 😃
If it's not possible to unload the calm thread with RPCRT4.dll, then in any case, I consider the problem solved for myself, i.e. the topic can be moved here.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.03RC1 - Lister and video files

Post by *ghisler(Author) »

Nice to hear that! I'm not seing any threads from RPCRT4.dll, and after closing the first video, the number of threads does not increase each time I close another video. Do you get one more thread after each video is closed?
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: TC 11.03RC1 - Lister and video files

Post by *Fla$her »

I withdraw the question. I checked without plugins — everything is fine. You can safely move the topic. :)
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC 11.03RC1 - Lister and video files

Post by *ghisler(Author) »

Great, thanks!

Moderator message

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply