Crash on sending WM_USER+51 with wParam=1003

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Crash on sending WM_USER+51 with wParam=1003

Post by *MVV »

Code: Select all

---------------------------
Total Commander 7.56a
---------------------------
Access violation at address 00415F88. Read of address 00000008.
Access violation at address 00415F88. Read of address 00000008
Windows 7 SP1 6.1 (Build 7601)

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000005
Stack trace:
00415F88
6BB900  443011  444F62  422CC0  444523  422CC0
444491  422CC0  5479B3  444F62  >422CC0  444523
422CC0  4282DE  428424  6C53C9  
Raw:
56E7A4  6C2368  6BB900  43FFFE  68593E  5F99E5
5F9A09  444491  422CC0  4452DB  42552D  443011
445231  42499C  4445E5  444F62  444F85  422CC0
444523  422CC0  41CB47  41CB78  41CA85  41CA8E
444491  41CD6D  4452DB  42552D  443011  445231
42499C  4445E5  444F62  444F85  422CC0  444523
4452BE  443011  445231  4445E5  444F62  444F85
422CC0  5557AC  444491  422CC0  4452DB  42552D
55BA1C  443011  445231  42499C  4445E5  444F62
444F85  422CC0  444523  422CC0  444491  422CC0

Press Ctrl+C to copy this report!
This happens when I try to execute corresponding menu item from little tool that shows MNU file as popup menu and sends WM_USER+51 message for cm-commands. Strange that if I start tool using command line and pass MNU path as parameter all work fine (using internal associations all work fine too). Exception appears only when I try to execute same command via toolbar button - menu appears, I can execute another commands but mentioned one (1003) causes AV.

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

Post by *ghisler(Author) »

It probably happens because TC is still handling the launch event while you already send the command. Maybe you can use PostMessage?
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

OK, I've tried it.

PostMessage gives same AV.

Sleep(10) placed before sending a message solves problem (such a crazy workaround... but it works for me and doesn't work for another TC user).

However it is strange that TC receives a message before ShellExecute (or CreateProcess) is finished - its message loop is busy at that time (if you're executing toolbar commands in main process - if not, there a sync trouble). Also, don't forget that there are some seconds between clicking a buttonbar button and sending a command (user needs some time to choose menu item), and other commands work fine. But it seems that cm_ContextMenu doesn't work w/o this strange delay too (w/o crash but w/o success too).

Anyway I think you need to look where exactly error happens - maybe there is a simple check allowing to prevent it (note that error doesn't happen when program is executed via internal association or directly from command line - only from buttonbar button and start menu item). :)

There is a tool that I test:

Code: Select all

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

N3q8ryccAANHapoxqQkAAAAAAABpAAAAAAAAAM3PLckAJpaOcAAX9+wFu+r0/5QBL0TuTr0JScWp
wXIs+2C8FAvofZL9OQyrmdRJ6fFEUwUox4AepJrWfamkx9MSo1AMPur1FMg8of0jfCyT3T8/4QjX
pnYGP9uG9jshDUZCRmD5PFKNZ5MJYfnbGrmJu+YmNpte81pzKyCBePJUMJrtp+5alnc3uAj/3i+T
UBkVQHkpIwKyP75VIhC5vVCdYJz+HwCzDEOh/hBiyYeh2F6ue32isEPepcYNxwJPcLwLiboCSdnw
aM3hCigdvwnVirEo+SgjlNQFN71+DbrG5tbdhbV7ZFWkTMGLuxzgJZ+0G357k9XJG0r6Tf+pt3H/
+A4WS60S0MrVTY2UglN75jCci3MYWg8W2Rf8YGcUDSTQv5qizBLbzGDwqCVwFjdKgyQ3r3pAJazf
JwHoK8RxqJirJ19u5HaPLbWhtuje11cHki9BB5eq4iECoJ+ECcxJKAsePkZUKqJ58wvw9OWjkUnH
UsjWwvvFrtjdxwphdHNWM004KH7LSkBKKEclroudO0mv6sCto4wlO53/95cYgrNKo9oEMpt2qdML
2oBr+P2Ex38wABeSKFObIqlyBtrpHA8DDVaSeO5aE+yhQolcYEQakAVnyYM+M6M67Mf+KR00ODkB
G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OaHLBp
h3RR6SYwTeM175myM2QhGKiZYb4vP90uLIUA8ROkK9mQOMy6yKAqdV1dKuOVvFxHLfFkWVZG0Jm8
IMQw18V6mo5OWaoi3AMoFYLPCxraODfEZPm/MGS0ph+kFSlZb9cB+L1gov5EELtYO2IvYqSk4uRO
j1CNzfS5Wt3VDhAi8jiAFwEHS8KFkurqq3NFNFIsdUJ7J+q/MbG77GvXWQmhU5YdK5Duu5dJJCDb
CorTKCuuWmaE9L208qeH14dVsXi/u5HEHolyP+kedYZVLb47fPB04qoKwBjxC0kbXEZytbWoQ2Ot
FJjvmej3lZIO+HEexzXQ7Wl04ewRkZm45US60Z+hdc28Edp4FEmK4phMxySEJi3PsAe5tilzOq4n
mjf3lB7GOycHjF8Z8bdCzqumHirvpEnD7pmDKdBb7RxZ56jJOT0etR1f4Rz4M4uFl1VreqkhDork
MiJKNZ9qxRNiBsHej+phD1yVYdf65IYkjYStQRXtqjK1oWp/+pKUEKWjM9QxwdsC6/4puHwAAQQG
AAEJiakABwsBAAIjAwEBBV0AAAEABAMDAQMBAAySAJIAAAgKAe6n2dcAAAUBESEAVABjAE0AZQBu
AHUAUABvAHAAdQBwAC4AZQB4AGUAAAAUCgEAGm3N2mYZzAEVBgEAIAgAAAAA

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

Post by *ghisler(Author) »

Thanks, I will check it!
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that cm_Properties (1003) works fine with TC8b4 (32/64) w/o any sleeps. However cm_ContextMenu (2500) still doesn't work.

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

Post by *ghisler(Author) »

I only checked 1003 because that was in the report. I will check 2500 too. What happens when you send it?
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It doesn't cause AV, it just does nothing, as I wrote above.

You may test it with your default menu file: try commands 'Commands\Directory Hotlist' and 'Show\Custom Columns Mode'. They don't work too (menu opens and immediately closes, if you have sound for popup menu, you'll hear it).
Also insert this menu after 'Net menu, its command 'Context Menu' doesn't work too:

Code: Select all

POPUP "&System"
  MENUITEM "&Run As...", 2800
  MENUITEM "&Context Menu\tApplication, Shift+F10", 2500
END_POPUP

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

Post by *ghisler(Author) »

Strange, 2500 works just fine here, cm_contextMenu even works from the command line...
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I know that all theese commands work from command line:) but they work incorrectly via such external menu (sometimes works, sometimes doesn't)... Just interesting why it is so.

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

Post by *ghisler(Author) »

Do they work for you from the starter menu (user-defined menu)?
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Yes, they work from both hotlist and start menus.

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

Post by *ghisler(Author) »

I have added a menu item 2500 to the main menu now, but it works just fine both in 32-bit and 64-bit. :(
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian, please test it with this menu file. It already contains some commands that open menus (3009, 2500, 526, 270) that don't work for me.

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

Post by *ghisler(Author) »

Tried only 2500 for now with your menu - no problem with 32-bit and 64-bit Windows 7 x64 with AeroGlass. Can you give me your Windows version and theme settings? From the crash report, you seem to use Windows 7 too...
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I test it under:
+ Win7 Pro Sp1 x64, Classic theme
+ WinXP Pro SP3 x32, Classic theme
It doesn't work in both systems. Just now tested 2500 in TC8b5x32 with specified MNU file - doesn't work.

Post Reply