June 28, 2024, 05:58:51 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Projects and .lib source file

Started by LarryMc, March 10, 2009, 04:23:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

March 10, 2009, 04:34:14 PM #1 Last Edit: March 10, 2009, 04:39:27 PM by Larry McCaughn
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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

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.
Ionic Wind Support Team

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

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.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Ionic Wind Support Team

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.
Ionic Wind Support Team

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library