I created a source file to generate a static lib file.
I'm using the lib in an application.
In the application I get a crash after following a certain sequence of steps a certain number of times.
Debug and the .map file are telling me the crash is at a ListCreate command.
My application doesn't use the ListCreate command but my lib uses it numerous times.
Question:
Instead of using $use "mylib.lib" in my application can I just add the mylib.eba to the application project and expect it to work properly?
Is there any 'adjustment' that would have to be made?
Larry
Went ahead and tried it and it worked fine.
It worked so good that my crash problem went away which gives me and even bigger problem.
I lied, I still have the problem.
Larry
Larry,
There's really no difference between including it in the project or using the $use statement. The only difference is the order in which the linker processes it. Which can make a differences if you have two global subroutines with the same name, which of course would be a problem in itself.
Paul.
Is there any futher information that can be gleaned from this as to the nature of area I need to look at?
QuoteStarting debug session...
Loading DLL: ntdll.dll
Loading DLL: C:\WINDOWS\system32\kernel32.dll
Loading DLL: C:\WINDOWS\system32\GDI32.DLL
Loading DLL: C:\WINDOWS\system32\USER32.dll
Loading DLL: C:\WINDOWS\system32\COMDLG32.DLL
Loading DLL: C:\WINDOWS\system32\ADVAPI32.dll
Loading DLL: C:\WINDOWS\system32\RPCRT4.dll
Loading DLL: C:\WINDOWS\system32\Secur32.dll
Loading DLL: C:\WINDOWS\system32\COMCTL32.dll
Loading DLL: C:\WINDOWS\system32\SHELL32.dll
Loading DLL: C:\WINDOWS\system32\msvcrt.dll
Loading DLL: C:\WINDOWS\system32\SHLWAPI.dll
Loading DLL: C:\WINDOWS\system32\OLE32.DLL
Loading DLL: C:\WINDOWS\system32\MSIMG32.DLL
Loading DLL: C:\WINDOWS\system32\HHCTRL.OCX
Loading DLL: C:\WINDOWS\system32\OLEAUT32.dll
Loading DLL: C:\WINDOWS\system32\OLEPRO32.DLL
Loading DLL: C:\WINDOWS\system32\CRTDLL.DLL
Loading DLL: C:\WINDOWS\system32\SHAPELM.DLL
Loading DLL: C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b641W
Loading DLL: C:\WINDOWS\system32\riched32.dll
Loading DLL: C:\WINDOWS\system32\RICHED20.dll
HEAP[CCD.exe]:
Heap block at 00302000 modified at 00302108 past requested size of 100
Error message alternates between this one and one above.
Program stops at the same exact place every time.
QuoteStarting debug session...
Loading DLL: ntdll.dll
Loading DLL: C:\WINDOWS\system32\kernel32.dll
Loading DLL: C:\WINDOWS\system32\GDI32.DLL
Loading DLL: C:\WINDOWS\system32\USER32.dll
Loading DLL: C:\WINDOWS\system32\COMDLG32.DLL
Loading DLL: C:\WINDOWS\system32\ADVAPI32.dll
Loading DLL: C:\WINDOWS\system32\RPCRT4.dll
Loading DLL: C:\WINDOWS\system32\Secur32.dll
Loading DLL: C:\WINDOWS\system32\COMCTL32.dll
Loading DLL: C:\WINDOWS\system32\SHELL32.dll
Loading DLL: C:\WINDOWS\system32\msvcrt.dll
Loading DLL: C:\WINDOWS\system32\SHLWAPI.dll
Loading DLL: C:\WINDOWS\system32\OLE32.DLL
Loading DLL: C:\WINDOWS\system32\MSIMG32.DLL
Loading DLL: C:\WINDOWS\system32\HHCTRL.OCX
Loading DLL: C:\WINDOWS\system32\OLEAUT32.dll
Loading DLL: C:\WINDOWS\system32\OLEPRO32.DLL
Loading DLL: C:\WINDOWS\system32\CRTDLL.DLL
Loading DLL: C:\WINDOWS\system32\SHAPELM.DLL
Loading DLL: C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b641W
Loading DLL: C:\WINDOWS\system32\riched32.dll
Loading DLL: C:\WINDOWS\system32\RICHED20.dll
First chance exception: Address 0x004D45DE Access Violation.
Final chance exception: Address 0x004D45DE Access Violation.
Your corrupting memory somewhere.
Heap block at 00302000 modified at 00302108 past requested size of 100
Tells the whole story. Somewhere in your program you've allocated 100 bytes of memory, and wrote 8 bytes passed it.
Paul.
See this thread for resolution of problems: http://www.ionicwind.com/forums/index.php/topic,3213.msg26246.html#msg26246
Larry