April 19, 2024, 05:24:47 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Crash problem...

Started by ExMember001, October 27, 2006, 12:00:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

October 27, 2006, 12:00:06 AM Last Edit: November 07, 2006, 12:45:40 AM by krypt
Hi,
I have a strange crash problem with my program..
when i compile and run it crash at start.. but if i run debug the program start and i dont seem to be able to make it crash.
i've commented my newly add code but didnt do anything.
Now i'm wondering if someone can help me find the problem ;)
The code is somekind big .. so if you got time please help me  ;D

To compile you have to create a project and add all the .src file to that project and save the project

for your info this is a recipies program in french  :)
you will also find my new update dialog class that im working on ..

John Syl.

October 27, 2006, 04:12:22 AM #1 Last Edit: October 27, 2006, 05:26:58 AM by John Syl. (puddytat)
Hi Krypt, not sure what the problem is but it appears to be connected with the :


//CrÃÆ'Ã,©ÃÆ'Ã,© la Window Principal du programme
Win.Create(0,0,800,600,AWS_CENTERED|AWS_VISIBLE|AWS_SYSMENU|AWS_SIZE|AWS_MINIMIZEBOX|AWS_MAXIMIZEBOX|AWS_AUTODRAW ,0,Titre,0);


Tried further tests, there appears to be a problem in the Popotte.CreateMenu() method, removing the call to this, the program still crashes, but the main window outline is displayed first.   So the problems must lay in the creation of the window somewhere.

hope this helps

regards
John
Intel 3.6 p4 ht, XP home,2 gb mem, 400 gb hd 20gb raid 0, Nvidia 6600le.
AMD k6-2 500, 40gb.

Started on PDP11 Assembler, BASIC, GWBASIC, 6502, Z80, 80x86, Java, Pascal, C, C++, 
IBasic (std & pro), Aurora, EBasic.  (Master of none, but it's been fun!)

sapero

I have found two bugs:
CImage returns pointer to IPicture (or something else) but not image handle.
Replace CImage with CIcon :Livredlg::Getlivres()
{
if count <> 0
{
CIcon img;  // <- here
UNSIGNED INT hiItem[2];
img.LoadFromFile(getstartpath()+"Images\\Popotte.ico");
hiItem[0] = img.Detach();
img.LoadFromFile(getstartpath()+"Images\\Livre.ICO");
hiItem[1] = img.Detach();


bug 2: PopotteMain::InsertImage - AllocHeap(len(Path)*2 +1) // why not +2 ?
Feel free to remove this heap, and use s2w()
OleLoadPicturePath(s2w(Path), 0,

While loading the exe in visual studio and in olly debugger, all was clean, no exceptions!

ExMember001

thanx guys for helping  ;D
ill take a look at what you've found!

ExMember001

finally found it..
an #autodefine "off" call in an external project source file ... in this case update.src can cause your program to crash ;)