Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Unhandled exception at 0x01422e3e in Dark GDK - 3D Game3.exe: 0xC0000005: Access violation reading location 0x00000000.

Author
Message
kranthi
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 14th Nov 2008 18:26
Hi, i try to load .fx file to an object.
no compile errors, it's giving runtime error.

Unhandled exception at 0x01422e3e in Dark GDK - 3D Game3.exe: 0xC0000005: Access violation reading location 0x00000000.

Here the Code:
dbLoadObject("Sea.dbo",10);
dbPositionObject(10,0,0,0);

dbLoadEffect("Shader.fx",1,0);

dbLoadImage("high.dds",1);
dbTextureObject(10,0,1);

dbLoadImage("middle.dds",20,2);
dbTextureObject(10,1,20);

dbLoadImage("low.dds",3,2);
dbTextureObject(10,2,3);

dbSetObjectEffect ( 10,1 );


dbSetEffectConstantFloat(1,"oct1Scale",0.0005f);
dbSetEffectConstantFloat(1,"oct2Scale",0.002f);
dbSetEffectConstantFloat(1,"oct3Scale",0.005f);
dbSetEffectConstantFloat(1,"oct2Time",1.5f);
dbSetEffectConstantFloat(1,"oct3Time",0.8f);
dbSetEffectConstantFloat(1,"oct1Power",5.0f);
dbSetEffectConstantFloat(1,"oct2Power",0.75f);
dbSetEffectConstantFloat(1,"oct3Power",0.125f);
dbSetEffectConstantFloat(1,"oct1Scroll",0.01f);
dbSetEffectConstantFloat(1,"oct2Scroll",0.02f);
dbSetEffectConstantFloat(1,"oct3Scroll",0.06f);
dbSetEffectConstantFloat(1,"sampleWidth",2.0f);
dbSetEffectConstantFloat(1,"sampleHeight",4.0f);


It's showing error at "dbSetEffectConstantFloat(1,"oct1Scale",0.0005f);"

i don't know what's error. and i tried run the project in different pc. it still giving the same error. please help about this.

Thanks
Swordsman
16
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 14th Nov 2008 20:45
To me, that exception says that you have created an object and not deleted it, is that all of your code? It seems like a memory management issue.
Swordsman
16
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 15th Nov 2008 03:47
That didn't come out right.

What I meant to say was that you are pointing to an object that doesn't exist. The memory address 0x0000000 means the pointer doesn't know where to point to, it means NULL. Check everything exists that should exists (files, etc) and check their locations.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 15th Nov 2008 11:04
'Shader.fx' contains an error and/or has not been loaded properly.
You can check syntax errors in .fx files with applications like Darkshader.
The error happens usually in the previous line after the crash. That would be in this case:
dbSetObjectEffect ( 10,1 );

Login to post a reply

Server time is: 2024-11-25 07:31:27
Your offset time is: 2024-11-25 07:31:27