Failed to find "main" - but I have no main()

336 views
Skip to first unread message

Blair Mahaffy

unread,
Mar 15, 2023, 10:28:29 AM3/15/23
to Dr. Memory Users
Hi folks,

First time user and I'm having a heck of a time getting Dr. Memory to run against my applications.
VS2008, c++, 32 bit, running on Win11.
I verified that the code is all complied with correct debug options.
Running at the command line, this is what I get:

~~Dr.M~~ Dr. Memory version 2.5.0
~~Dr.M~~ Running "bpwin2000.exe"
~~Dr.M~~ Using system call file d:\logs\symcache\syscalls_wow64.txt
~~Dr.M~~ ERROR: Failed to find "main" for limiting memory dump
~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000005

Thing is, the entry point on all my  applications is InitInstance(). There is no main().

Thanks for any advice! :)

Derek Bruening

unread,
Mar 16, 2023, 1:09:00 AM3/16/23
to drmemor...@googlegroups.com
The "main" printed "ERROR" is innocuous: part of an experimental feature on dumping the memory layout.  It can be ignored.  Looks like your app crashed; does it not crash by itself?

--

---
You received this message because you are subscribed to the Google Groups "Dr. Memory Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drmemory-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drmemory-users/790e9808-db15-4afc-afba-e39bc7b4b879n%40googlegroups.com.

Blair Mahaffy

unread,
Mar 16, 2023, 10:21:22 AM3/16/23
to Dr. Memory Users
HI Derek, thanks for replying.

No, the app itself doesn't crash. I run it in the VS2008 debugger quite regularly and it behaves itself. And it is run by a long list of users. I'm looking for a possible memory leak that the debugger wasn't revealing which is why I'm looking at Dr. Memory.

I have a few apps, all built in the same environment, some tremendously complex (like this one), some quite small. All display this same behaviour with Dr. Memory. I don't think the environment is anything special;  vs2008, 32 bit, c++. All built with debug code enabled. Multi-byte and NOT Unicode.

Cheers.

Derek Bruening

unread,
Mar 17, 2023, 10:21:25 AM3/17/23
to drmemor...@googlegroups.com

Blair Mahaffy

unread,
Mar 20, 2023, 6:09:08 PM3/20/23
to Dr. Memory Users
Hi Derek, thanks for your assistance here.

Working through the Narrowing Down page, I can try all of those command line prompts and none of them change the problem.

Running strictly under DynamoRIO, the application loads properly but I see no logging anywhere? Not sure what to expect.

I've tried this with a really simple application with none of our DLLs (the one I need to target has a load of dlls that it depends on) and I get the same result. I do see the dialog pop up briefly, no text displays on it. Then it goes away and that's it.

I attached the Dr. Memory logs if anything jumps out at you. Much appreciated.

Cheers
DrMemoryLogs.zip
Reply all
Reply to author
Forward
0 new messages