Unknow Bug under OpenGL windov mode

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Unknow Bug under OpenGL windov mode

Post by arras »

Executing this code cause my computer to freeze completly (even Ctrl+Alt+Del is not working).

If I switch to full screen or DirectX mode it's runing just fine. It crashes only under OpenGL windoved mode.

Don't know what might be wrong but it was terifiing me for over couple of weeks untill I found out that it is not code which is wrong.

My stats:
Win XP
ATI Radeon 7000
OpenGL 1.2
compiled under DevC++

Load array of TestSceneNodes:

Code: Select all

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;

int main()
{
	IrrlichtDevice *device =
		createDevice(EDT_OPENGL, dimension2d<s32>(640, 480), 16, false);

	device->setWindowCaption(L"Test");

	video::IVideoDriver* driver = device->getVideoDriver();
	scene::ISceneManager* smgr = device->getSceneManager();

	smgr->addCameraSceneNode(0, vector3df(0,0,30), vector3df(0,0,0));

	ISceneNode *myNode[20];
	for(int i=0; i<20; i++)
	{
	   myNode[i] = smgr->addTestSceneNode(1);
	   myNode[i]->setPosition( vector3df(i*4, 0, 0) );
    }

	while(device->run())
	{
		driver->beginScene(true, true, video::SColor(0,100,100,100));
		smgr->drawAll();
		driver->endScene();
	}
	device->drop();
	return 0;
}
looks like if there are just few nodes in array (1-2) it is running. But if there are more of them it crashes.
mm765
Posts: 172
Joined: Fri May 28, 2004 10:12 am

Post by mm765 »

try
ISceneNode myNode[20]; without the asterisk..should help
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

@arras:
It works fine for me. I even tried with 200 and 2000 nodes. The only difference is my video card.

@mm765:
It won't help, because what you propose will give diffrent effect.
Tomasz Nowakowski
Openoko - www.openoko.pl
mm765
Posts: 172
Joined: Fri May 28, 2004 10:12 am

Post by mm765 »

you are right, warui.
tested it under linux, works with 2000 testscenenodes without any problem.

gf4ti4200
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

warui>> thanks mate ...I will try to change videodriver and see what will happen.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

If your computer freezes, this is in 99% of all cases the problem of your driver. Not your fault. Update to the latest driver and this could fix your problem.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Thx niko I'll try that :)
Ablaze
Posts: 4
Joined: Sat Jan 22, 2005 9:18 pm

Post by Ablaze »

I've also been having this problem when using openGL in windowed mode on the tech demos. It will freeze about 40 sec after running the demo.

I have XP with all the latest updates and my computer has literally never frozen like this before. It reminds me of Win95, very disturbing.

I have a Radion 9600XT and a multi-monitor desktop. Perhaps the multi-monitor thing is a contributing factor?

edit: hmm.. now that I go back and look at it in directX, openGL was not rendering the scene correctly. Also, it has the same freexing and rendering problems in fullscreen.

OpenGL (you can't see in the pic but there's no shadow):

Image

DirectX8:
Image
Post Reply