Leak in AEEShell.c? | developer.brewmp.com Leak in AEEShell.c? | developer.brewmp.com

Developer

Leak in AEEShell.c?

Forums:

I see a ton of such leaks, but no leak of the kind BPOINT 2, which means I am releasing ALL BREW interface objects. If this is so, why should AEEShell.c leak memory? Also, do such leaks cause TBT to fail?

From another thread:
anotherthread wrote:
Fundamentally, there are 4 types of BPOINTs:
1. Type 1: Means memory leak (heap allocated memory is not freed)
2. Type 2: Not releasing BREW interfaces
3. Type 3: Double Delete (calling FREE/FREEIF two times on the same heap-allocated memory)
4. Type 4: Forgot.

Here's a portion of the dump I get:
*AEEHeap.c:1140 - 80 - buzzetto #11846 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x025F34BC buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #12443 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026018AC buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #50661 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02602E38 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #123465 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02603874 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #13043 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02603B38 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #13645 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026044F0 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #125677 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026048C8 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #16209 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02604C2C buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #126645 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02605000 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #14254 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026063C4 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #106629 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02606AF8 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #18057 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02606BF4 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #16823 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026071E8 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #15616 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02607374 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #17439 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026075C8 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #95640 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x026078D8 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #85680 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02607944 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #98306 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0260A890 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #28215 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0260B87C buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #26632 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0260D8A0 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #104258 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0260D914 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #107764 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0260F358 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #105440 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02613544 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #153840 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02613E70 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #198204 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02618234 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #189488 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x02619104 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #194493 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0261A118 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #188390 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)
*OEMOS.c:671 - BPOINT Type 1, Node 0x0261DEB4 buzzetto
*AEEHeap.c:1140 - 80 - buzzetto #52578 \sdk-release-builds\brewery\libdev\src\Aee\AEEShell.c:2552 (L)

dhawalogale wrote:I see a ton of such leaks, but no leak of the kind BPOINT 2, which means I am releasing ALL BREW interface objects. If this is so, why should AEEShell.c leak memory? Also, do such leaks cause TBT to fail?
They are almost certainly real leaks, and should cause a TBT failure. You are probably NOT releasing a BREW interface object. The reason you don't get a BPOINT2 is because you did not CreateInstance it.
If you fail to release an IFILE you will get a similar error, though I think it is on OEMOS.c:581. INETMGR_OpenSocket and then failing to call ISOCKET_Release will cause similar problems.

dhawalogale wrote:I see a ton of such leaks, but no leak of the kind BPOINT 2, which means I am releasing ALL BREW interface objects. If this is so, why should AEEShell.c leak memory? Also, do such leaks cause TBT to fail?
They are almost certainly real leaks, and should cause a TBT failure. You are probably NOT releasing a BREW interface object. The reason you don't get a BPOINT2 is because you did not CreateInstance it.
If you fail to release an IFILE you will get a similar error, though I think it is on OEMOS.c:581. INETMGR_OpenSocket and then failing to call ISOCKET_Release will cause similar problems.

Not sure what BREW version you're using. Took a quick look at the 3.1.4 code and it looks like this would correspond to AEE_NewClass(), which backs up what Ben is saying. AEE_NewClass() is used when creating classes where you aren't calling CreateInstance() explicitly (e.g., IFile, IAddrRec, IDBRecord). Take a look at your code.

Not sure what BREW version you're using. Took a quick look at the 3.1.4 code and it looks like this would correspond to AEE_NewClass(), which backs up what Ben is saying. AEE_NewClass() is used when creating classes where you aren't calling CreateInstance() explicitly (e.g., IFile, IAddrRec, IDBRecord). Take a look at your code.

Thanks for the pertinent replies. I am wondering if there is a way to know the "type" of object leaked - for example, IWeb, ISocket, IAddrBook, etc. or I should go on a wild goose chase to locate source of these leaks?

Thanks for the pertinent replies. I am wondering if there is a way to know the "type" of object leaked - for example, IWeb, ISocket, IAddrBook, etc. or I should go on a wild goose chase to locate source of these leaks?