Engine doesn't work on some pc's

Started by
7 comments, last by PinguinDude 19 years, 8 months ago
Hi. I am not sure if I am posting this in the right forum. If not please move it to the place where it should be. Anyway let's continue. I have made a main menu for my game and it seems to lockup on some pc's. Here is the program. http://www.codingdreams.org/staffmember/PinguinDude/Release.zip Now I didn't get any information about the errors but BastardOs said SEGFAULT which doesn't help me :| If any of you got some information for me or can help me plz tell me.
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
Advertisement
Please provide the lines of source code which appear to cause the crash, along with more information about the type of crash and the state of various variables involved. Preferably run the program in a debugger to get more insight (or add debug code to determine point of crash, if it is run on someone else's computer).
Vox
linkified

sorry didn't try it, dont want to crash my computer :)

segment faults and page faults are bad, especially if you get something like page not found


i dont think many people are going to try it, best bet is to start logging your code and finding out the general location where it crashes then posting that code and asking for help.
Well on win98 it gave a page not found thing error and on windowsxp just the standart xp error with the send to microsoft buttons. The problem is it doesn't crash on my pc so I can't really find where the problem is. :|
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
Didnt crash on my computer:
Windows XP Pro SP1
Dual P3 1Ghz
1Gb Ram
aTI 9600 XT 128
Well thats good. But I still don't know why it crashed on their computers :|
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
Crashed on mine when I clicked new game... You need to post the source and required files so that we can help you out, otherwise all we can do is say that it crashed. Since it only crashes on certain machines, it seems that you are assuming support for some hardware capability without checking for it. For example, I know youre not using it but in DirectX if you assemble a pixel shader and it fails because the hardware doesnt support that version, the pointer to that shader will be invalid and your program will crash when you try to use it, so you should always check the device caps for that kind of stuff. Again, there's no way to know unless you post the code.
-------------------------http://www.roachpuppy.com
Hi!
This is the error message that windows gives me. It's written in Portuguese but what it says, basically, is that the instruction tried to write to memory at address 0. Aren't you trying to write to a NULL pointer?


Gretz,
Yeah well I noticed some places where it seems to crash. And if the problem is with the NULL well... I will try to post some code hehe ok ;) What I found out is that it crashed on me once when I had Icons on some of my GUI's buttons.

/*======================================*/// CreateNewGameMenu					///*======================================*/int InitializeNewGameMenu(){    NewGameWindow.CreateGDLWindow(160, 190, 320, 110, "New Game");//    FightMode.CreateGDLButton(246, 10, 64, 64, "", "Icons/FightMode.bpg", NewGameWindow);//    Story.CreateGDLButton(10, 10, 64, 64, "", "Icons/Story.bpg", NewGameWindow);    FightMode.CreateGDLButton(246, 10, 64, 64, "", NULL, NewGameWindow);    Story.CreateGDLButton(10, 10, 64, 64, "", NULL, NewGameWindow);    NewGameCancel.CreateGDLButton(133, 10, 54, 64, "Cancel", NULL, NewGameWindow);        NewGameWindow.HideWindow();    NewGameCancel.HideButton();    Story.HideButton();    FightMode.HideButton();        return 0;}


So I changed it and it worked. ( But not on everybody's pc) and yes I do put a NULL in some places but in the create button function I check if it's NULL and if it is it just quits the function :o so it shouldn't crash at all.

int CGDLButton::CreateGDLButton(int X, int Y, int Width, int Height, char *Caption, char *IconFile, CGDLWindow Child){	if (X == 0)	{		X = 1;	}	if (Y <= 2)	{		Y = 2;	}	ButtonX = Child.WindowX + X;	ButtonY = Child.WindowY + Y;	ButtonWidth = Width;	ButtonHeight = Height;	ButtonCaption = Caption;	Visible = TRUE;			if (IconFile != NULL)	{	    if (Icon.LoadBPG(IconFile) != 0)	    {             MessageBox(NULL, "Could not load file", IconFile, MB_OK);                       return 1;           }                    	glGenTextures(1, &IconTexture[0]);    	glPixelStorei(GL_UNPACK_ALIGNMENT, 8);        	glBindTexture(GL_TEXTURE_2D, IconTexture[0]);    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);    	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);    	glTexImage2D(GL_TEXTURE_2D, 0, 4, Icon.BPGHeader.Width, Icon.BPGHeader.Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, Icon.BPGData.Data);       	    glFlush();    }    	return 0;}
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)

This topic is closed to new replies.

Advertisement