This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Crash on sending WM_USER+51 with wParam=1003
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Sun Oct 16, 2011 8:10 am    Post subject: Reply with quote

What happens when you choose this menu item
- by mouse?
- by keyboard?

Make sure the cursor is standing on a file before opening the menu.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Tue Oct 25, 2011 12:08 am    Post subject: Reply with quote

Same result for both mouse click and Enter keypress. Directory hotlist blinks and closes, context menu doesn't popup at all.

I call TcMenuPopup.exe via buttonbar button with MNU file as parameter.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Tue Oct 25, 2011 9:59 am    Post subject: Reply with quote

Wait, you reported problem with command Nr. 2500, but now you call an external program?
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Tue Oct 25, 2011 10:27 am    Post subject: Reply with quote

Christian, I'm always (within this topic) call 2500 from menu that external tool TcMenuPopup.exe displays. Smile
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Thu Oct 27, 2011 7:15 am    Post subject: Reply with quote

Ah, I see, I thought that you clicked on the menu item with Nr. 2500 within Total Commander! Maybe the tool should use PostMessage instead of SendMessage?

Does it work via AutoHotkey?
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Thu Oct 27, 2011 7:37 am    Post subject: Reply with quote

Doesn't work with PostMessage too.

Can you reproduce it with this tool and this menu file?

I have no AHK and not familiar with it. Smile
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Thu Oct 27, 2011 9:02 am    Post subject: Reply with quote

Yes, when I call your tool from the button bar.
No, when I call it from the TC command line.
Strange indeed...
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Thu Oct 27, 2011 11:32 am    Post subject: Reply with quote

Yes, it is strange. Within TC it works from any place (buttonbar, command line, start menu) but why it doesn't work from external menu... I don't know what differences between internal command execution and execution from window procedure but it seems that it does matter.
Maybe you can debug something? Message processing procedure, opening context menu... also why directory hotlist menu closes immediately after opening...
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Fri Oct 28, 2011 4:20 am    Post subject: Reply with quote

I just checked my code, and found the reason: TC ignores message 2500 if it isn't the active window:
Code:
    cm_ContextMenu: if getactivewindow=handle then
        InvokeContextMenu(handle);


This is done because otherwise (if TC is in the background or minimized) this would cause troubles or even a crash.

Try calling SetActiveWindow first.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Fri Oct 28, 2011 5:53 am    Post subject: Reply with quote

Hm-m, it may be the reason why short delay before sending command had worked...

Unfortunately SetActiveWindow can only be used within that window's thread.

It seems that easiest workaround is to call Sleep before sending a command... But what if it is not enough?

I've used following:
Code:
SetForegroundWindow(hTcWnd);
for (int try_count=1000; try_count>0 && GetForegroundWindow()!=hTcWnd; --try_count) Sleep(2);
exec_tc_command(hTcWnd, param);

It works well. Smile

Code:
MIME-Version: 1.0
Content-Type: application/octet-stream; name="TcMenuPopupNew.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="TcMenuPopupNew.7z"

N3q8ryccAAPOWRFfBQoAAAAAAABpAAAAAAAAAEbcRjwAJpaOcAAX9+wFu+r0/5QBL0TuTr0JScWp
wXIs+2C8FAvofZL9OQyrmdRJ6fFEUwUox4AepJrWfamkx9MSo1AMPur1FMg8of0jfCyT3T8/4QjX
pnYBL7RWA+NS9H6KfDPbUtFVa+g60rip9yvx/Jg3SHnt7UA/td5s22NmN/tHdAHZYtqHXUa6w70k
kejWwtzAMTsl4xYH/JrS6n4y3L0Qdmgt5oJAoB8A30GXRWKrHkIux5ua/TfXnLqeWgb1UBNGkBJp
UII339yv2mBzG8fbwur0G3Eyr9luEH7bJbw5k2wJVGn9LJTwLyMDZt7463jA+P6568Rtnpflr0ks
woZbTMx9vlaaHSrsVfevRzb0V7zb0cqE7lBK63MbU8PlQ1KI/WFzNUhR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FS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34726
Location: Switzerland

PostPosted: Sun Oct 30, 2011 9:00 am    Post subject: Reply with quote

2MVV
It may be sufficient to close your menu and then just wait until TC is again the foreground window - Windows itself will give it the focus eventually.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Mon Oct 31, 2011 1:02 am    Post subject: Reply with quote

Maybe, but my way is more reliable (who knows that Windows Very Happy), and it is not hard to add single function call. Smile
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
TyBontage
Junior Member
Junior Member


Joined: 14 Feb 2012
Posts: 2
Location: United States

PostPosted: Fri Feb 17, 2012 10:15 pm    Post subject: Crash on sending WM_USER51 with wParam 1003 Reply with quote

Can you email us and well send directions on how to send your presentation to us so we can test this?

Thanks.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.56(a)/7.57 bug reports (English) All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group