Jump to content

UpdateAppTime causing hangs


Chiblue
 Share

Recommended Posts

I have been experiencing a problem with my project, when I am running my app it keeps hanging for a fraction of a second, but enough to be a pain... my FPS is in excess of 500 so I know it is not that...

 

So I added a logging class and wrote out to the log after each function call in my main loop...

 

WriteLogData("Start");
UpdateAppTime();
WriteLogData("End UpdateAppTime");
game.scene.Update();
WriteLogData("End Update");
game.MouseLook(game.scene.cam);

 

I stopped the game immediately I hit a hang up.. this is the log..

 

6886407.000000 : End DisplayHudControls
6886407.000000 : End
6886407.000000 : Start
6886815.500000 : End UpdateAppTime

 

The time stamp is app time.. I normally see < 15 for every UpdateAppTime Call, except when I get the hangs and I then see over 400 or more...

 

Can someone explain what this does and why it would hang?

 

FYI...

I am running Vista 64 ultimate.. on a quad core intel processor, 8gb memory and SLI GTX 8800 OC vidoes cards..

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Isnt UpdateAppTime() called in UpdateFramework()?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I am using gamelib... but I never said I was not doing something wrong....lol

 

 

I never meant to imply you were lol .. but I thought you don't have to call UpdateAppTime() as it was called from UpdateFramewerk() which I think is called behind the "scenes" in GameLib maybe calling it too often might be the cause of the hangs :lol:

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

ok .. see if it helps ...

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I took it out... same problem...

 

9171152.000000 : Start

9171713.000000 : End Update

 

Woow this was almost 600... I guess it is called somewhere else...

 

Strange thing is now the game.scene.Update() is causing the delay... which maybe were is was also being called from...

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Have you tried restarting your computer to see if the problem goes away? I notice a lot of weird timing issues start happening w/ LE after a while, a reboot seems to fix them. Not sure if it's related though.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

I'd have thought game.scene.Update() was Gamelibs call to FramewerkUpdate() ? best person to say would be Lumooja.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Have you tried restarting your computer to see if the problem goes away? I notice a lot of weird timing issues start happening w/ LE after a while, a reboot seems to fix them. Not sure if it's related though.

 

I have restarted my machine about 20 times in the last 2 days, I lost a drive in the raid set and had to rebuild it... :lol:

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

It is actually the raycast, my logs were decieving because time is only updated once...

 

12254122.000000 : PlayFPSAnimation - EntityPick

12254630.000000 : PlayFPSAnimation - EntityPick Done

 

This is the call..

 

int hit = EntityPick(&pickent,gun,weap->maximumrange,0,0,(BP)PickFilter);

 

This is the call back...

int _stdcall PickFilter( TEntity pickentity)
{
int EntType = GetEntityType(pickentity);
switch(EntType)
{
case 0:  // terrain
	return 1;
case 1:  // terrain
	return 1;	// <10 no force,  but effects..
case 2:  // terrain
	return 1;	// <10 no force,  but effects..
case 11: // Player
	return 0;
case 12:  // Freindly
	return 1;	// 10> force and effects.
case 14:  // props
	return 1;	// 10> force and effects.
case 21:  // Enemy
	return 1;
default:
	return 1;
}

}

 

I also remove the callback and it still hangs.. it is the EntityPick function that hangs.... The distance is 4000... I have also tried the CameraPick with the same results...

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...