Page 1 of 1

COMatePLUS - Procedure stack has been corrupted

Posted: Wed Oct 18, 2023 11:03 pm
by User_Russian
When I run any example from COMatePLUS (for example Demo_Excel.pb), the debugger reports an error Procedure stack has been corrupted on line 1383 of the file "COMatePLUS.pbi"

Code: Select all

result = iDisp\Invoke(dispID, ?IID_NULL, #LOCALE_USER_DEFAULT, invokeType, dp, *ret, excep, @uiArgErr)
Tested in PB 6.03 x64 ASM backend. The purifier must be turned on.
I use COMatePLUS 1.2 https://backups.rsbasic.de/COMatePLUS.zip

Is this a compiler bug or an error in COMatePLUS?

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 1:24 am
by Olli
Hello UR,

Could you add the OS on which the error occurs ?

Have you any problems on X86 ASM PB V6.03 ?

Have you met any problems on X64 ASM PB Version < V6.03 ?

Actually, I cannot test COMate+. And if sRod is fine enough, to read and to answer, more there is any details, more the problem will be solvable.

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 10:44 am
by jacdelad
There was a fix floating in the forum. But I cannot remember where. I'll look for it later.

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 11:30 am
by BarryG
The "Demo_Excel.pb" source compiles fine for me with 6.03 x64, ASM backend, Purifier on. I'm using COMatePLUS Version 1.2 released 9th July 2010.

I don't remember if I fixed that version, so I've uploaded it here for you to test (6-day link) -> https://filebin.net/9r8tnyl2k178gqd0

[Edit] Wow, I've just gone over 3000 posts! :D

Image

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 12:22 pm
by Olli
BarryG wrote:I don't remember if I fixed that version [...]
:o
Do you take over ? I apologize. I tested the first COMate version in 2009. I am little bit old fashion...

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 12:25 pm
by BarryG
No, I didn't take it over. But if it had a bug that I found I would've fixed it for myself and messaged the author. I haven't used COMatePLUS in years, so don't remember if I did anything to it. But it works for me and not User_Russian, so it's worth comparing versions.

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 12:39 pm
by Olli
Thanks for your work. I downloaded it. When I could I will test it, and I will give a info here. sRod last message dates in 2020. I hope he is fine.

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 2:58 pm
by fryquez
The EXCEPINFO2 structure is wrong, change it to:

Code: Select all

Structure EXCEPINFO2 Align #PB_Structure_AlignC
  wCode.w
  wReserved.w
  bstrSource.i
  bstrDescription.i
  bstrHelpFile.i
  dwHelpContext.l
  pvReserved.i
  pfnDeferredFillIn.COMate_ProtoDeferredFillIn
  scode.l  
EndStructure

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 5:20 pm
by jacdelad
fryquez was faster.
Also there's another fix for another problem: viewtopic.php?p=575132#p575132

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 5:35 pm
by fryquez
There are also GetWindowLong_() and SetWindowLong_() in the Basic demos.
They need to be replaced with the ?etWindowLongPtr_() versions

Re: COMatePLUS - Procedure stack has been corrupted

Posted: Thu Oct 19, 2023 8:13 pm
by User_Russian
he "Demo_Excel.pb" source compiles fine for me with 6.03 x64, ASM backend, Purifier on. I'm using COMatePLUS Version 1.2 released 9th July 2010.

I don't remember if I fixed that version, so I've uploaded it here for you to test (6-day link)
Unfortunately this did not yield any results. Same stack corruption error.
The EXCEPINFO2 structure is wrong, change it to:
Thank you. This was probably the source of the problem.
After replacement, there is no error.