Memory Leaks when calling report writer with OLE causing crash

Hi All,

My program crashes randomly when using OLE calls to External report writer and I expect I have a memory leak. How do I check for memory leaks? of do you have a tool I can use please?

Thanks in advance

Why do you suspect a memory leak? Memory leaks do not generally cause a crash.

Randomly have crashes and no GPF errors with it the crashes. Just exit the main .exe. (Sometimes/ramdonly we get a OLE out of memory error) - and that is way we think it is a leak.

Not always at the same point.

We run Debugging for weeks on end on the users and (TSPlus sessions) but we do net get the point where it crashes.

Could it be possible that your app is loading large amounts of data and exceeding the default 2GB limit? I’ve had that happen with imaging apps. Using LARGE_ADDRESS in the .EXP helped with that.

You can create an .EXP file for your .EXE, put that in it:

NAME ‘YOURAPP’ GUI
LARGE_ADDRESS

When the program just shuts down with no message try the Windows Event Viewer for Application and look for log entries with your main.exe. The crashes usually have a red icon. The description text will give you some idea what went wrong and an Exception code.

To analyze EXE memory usage and check for leaks try VMMap

1 Like

Thanks Carl will give it a go

Thank you will check