tk_mem.e bug

new topic     » topic index » view thread      » older message » newer message

Hi all,

I've been trying to track down the problem with EuCOM and the memory errors.
I've tried lot's of stuff, including using Eu's allocate/free routines,
although those would cause a crash sooner than the Win32 routines used in
tk_mem.e.  When I commented out the call to HeapFree, everything worked.  I
further tracked down a line in release_mem that I don't understand, but once
commented out, allows everything to run.

Right before phase 3, release_mem checks sets[1] and frees it if it's not
zero.  There's no comment that I can see, and I can't see why that would be
there.  Maybe there's a reason, but I think this is the reason that
release_all_mem would sometimes fail in the past.  Looks like the heap got
corrupted.

So, for those who emailed me with bugs when you ran EuCOM, please comment
out the following code in tk_mem.e and let me know if it works:

--if sets[1] != 0 then
--    myFree(sets[1])
--end if

I suspect that NT does a lot more checking of the heap than Win9X
(surprise!).

Derek, unless you have a reason for this being there, I'd recommend the same
for the next release of Win32Lib. :)

Matt Lewis

PS Regarding EuCOM, it looks like IDispatch::Invoke is called.  I've figured
out a fix (wrote some ASM to accept the procedure call and transfer the args
from the stack to memory), and I'll get it up later today.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu