Strange packer plugin issue

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Strange packer plugin issue

Post by *aguirRe »

I'm trying to fix some errors in an existing packer plugin. While updating an archive (called from PackFiles), I call the progress callback (set via SetProcessDataProc) and in the debugger, I notice that suddenly my OpenArchive function is called from within the progress call.

In this state, the archive is not consistent yet and a validation routine I use in the OpenArchive fails. This results in an error message from TC and abort.

What makes it even more strange, is that this happens only after I've performed a simple copy/paste operation (Ctrl-C/V) in the TC window open to the filesystem (the other window shows the inside of my archive) and only with a reasonably small file (e.g. 50k). Not doing the copy/paste before or using a bigger file (e.g. 50M), everything works OK.

Is it normal that OpenArchive can be called from *within* a progress update call done during PackFiles? I can't understand why and also why this happens only after a copy/paste operation.

What am I missing?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, this is not normal. It sounds like TC is losing and re-gaining focus while within your function. When TC receives the focus, it tries to refresh the archive contents via OpenArchive. Any idea of what could be causing this problem? Do you call any external apps, or open any dialogs?
Author of Total Commander
https://www.ghisler.com
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Post by *aguirRe »

Thanks for suggestions.

I also thought of some refresh window situation, but I don't do anything special when this happens. I don't call any external apps or open any dialogs from this plugin (except when clicking on the configure button from TC).

I tried doing the same procedure with the 7zip plugin and it handled it without problems, which may indicate that it's a problem in this plugin (it's the old pack plugin for Quake btw).

Environment is XP Home without SP, Intel P4 1.7GHz, 768MB, 1280x960x32 desktop in classic mode.

I also tried changing to other copy techniques in the TC configuration to see if that made any difference, but it didn't. The interesting thing is that I need to do this copy/paste operation to produce the error. Something with the TC clipboard handling and window refresh requirements?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Where can I download this plugin? I would like to check this problem in a debugger too (from the TC side, not the plugin side).
Author of Total Commander
https://www.ghisler.com
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Post by *aguirRe »

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply