COMatePLUS - Procedure stack has been corrupted

Just starting out? Need help? Post your questions and find answers here.
User_Russian
Addict
Addict
Posts: 1588
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

COMatePLUS - Procedure stack has been corrupted

Post 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?
Olli
Addict
Addict
Posts: 1266
Joined: Wed May 27, 2020 12:26 pm

Re: COMatePLUS - Procedure stack has been corrupted

Post 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.
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: COMatePLUS - Procedure stack has been corrupted

Post by jacdelad »

There was a fix floating in the forum. But I cannot remember where. I'll look for it later.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: COMatePLUS - Procedure stack has been corrupted

Post 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
Olli
Addict
Addict
Posts: 1266
Joined: Wed May 27, 2020 12:26 pm

Re: COMatePLUS - Procedure stack has been corrupted

Post 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...
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: COMatePLUS - Procedure stack has been corrupted

Post 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.
Olli
Addict
Addict
Posts: 1266
Joined: Wed May 27, 2020 12:26 pm

Re: COMatePLUS - Procedure stack has been corrupted

Post 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.
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: COMatePLUS - Procedure stack has been corrupted

Post 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
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: COMatePLUS - Procedure stack has been corrupted

Post by jacdelad »

fryquez was faster.
Also there's another fix for another problem: viewtopic.php?p=575132#p575132
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: COMatePLUS - Procedure stack has been corrupted

Post by fryquez »

There are also GetWindowLong_() and SetWindowLong_() in the Basic demos.
They need to be replaced with the ?etWindowLongPtr_() versions
User_Russian
Addict
Addict
Posts: 1588
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: COMatePLUS - Procedure stack has been corrupted

Post 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.
Post Reply