DLL debugging

Just starting out? Need help? Post your questions and find answers here.
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

DLL debugging

Post by ALAN-MHz »

dear all, i've a stupid question that i cannot know to solve, i code with purebasic a very complex dll, with a log of debug write to file to diagnostic, the problem is that the main executable, not coded in purebasic, simple close when using the dll, in my log file i don't find anything useful, i try to compile dll with error handler (i really don't know if i can use in a dll!), but errorhandler does not show anything! how i can debug the point that cause main software close ? i simple try to comment out a function in dll and all works good, so i've found the function that cause the problem, but i'm unable to find the point that cause the crash, also main executable does not show anything of crash, how really i can find the point in code that cause this ? thanks!
User avatar
skywalk
Addict
Addict
Posts: 4003
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: DLL debugging

Post by skywalk »

Shrink your dll to only the offending procedure.
Make a PB app to call your dll.
Verify it works correctly.
Then try with your full dll.
If no crash, then the 3rd party app may be accessing structures or memory or strings differently?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
ALAN-MHz
User
User
Posts: 68
Joined: Fri Jul 29, 2005 11:47 am

Re: DLL debugging

Post by ALAN-MHz »

i'm so stupid, i do not comment a terminateprocess that i use for debug! but anywhere i really want to know how to debug a dll or simple if i can use onerror on dll, thanks!
Post Reply