Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: MatthewPapa on October 09, 2005, 12:06:49 pm

Title: Problem
Post by: MatthewPapa on October 09, 2005, 12:06:49 pm
well ever since ive gotten my new hardware ive had trouble running fs2 but i think the problem is really simple. Here is what I am on right now

AMD X2 4400+
BFG 7800GT With Forceware 77.79
1024 RAM
DFI Board
Directx 9.0c

The problem is that when I open up fs2 it runs like a slideshow. The pointer can only move like every 5 seconds for one second. It happens in both OGL and DirectX, with and without media VPs. Ive tried all of the recent builds with no success but I think ive found the problem. I just dont know what do to do fix it. here is the spew.


Code: [Select]
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
Setting language to English
soundcard = DirectSound
** MAX_CHANNELS set to 26.  DS reported 26.
GR_CPU: Family 15, MMX=Yes
Using PURE D3D DeviceAlpha texture format = ARGB, 4:4:4:4
Non-alpha texture format = ARGB, 1:5:5:5
D3D_32bit 1, bits_per_pixel 32Direct3D Initialized OK!
Size of bitmap info = 760 KB
Size of bitmap extra info = 52 bytes
ANI cursorweb with size 24x24 (25.0% wasted)
Loading 2_PreLoadLogo.pcx for the first time.
MEMLEAK DEBUG: lock pcx
TIMER ROLLED!
Using high memory settings...
Wokka!  Error opening file (interface.tbl)!
Unable to parse interface.tbl!ANI 2_radar1 with size 170x170 (33.6% wasted)
ML Freespace Multi Log - Opened Sun, Oct 09, 2005  at 12:03PM
----
----
----


Windoze reported 16 joysticks, we found 1
Current soundtrack set to -1 in event_music_reset_choices
cf_get_file_list_preallocated looking for type=7, filter="*-mus.tbm"
Wokka!  Error opening file (armor.tbl)!
Unable to parse armor.tbl!cf_get_file_list_preallocated looking for type=7, filter="*-amr.tbm"
cf_get_file_list_preallocated looking for type=7, filter="*-wxp.tbm"
couldn't find particle pcx for Akheton SDG
found ani Akheton_Particle for Akheton SDG, with 11 frames and 25 fps
couldn't find particle pcx for Morning Star
found ani Morningstar_Particle for Morning Star, with 21 frames and 10 fps
couldn't find particle pcx for MorningStar D
found ani Morningstar_Particle for MorningStar D, with 21 frames and 10 fps
couldn't find particle pcx for Maxim
found ani Maxim_Particle for Maxim, with 21 frames and 10 fps
couldn't find particle pcx for Maxim D
found ani Maxim_Particle for Maxim D, with 21 frames and 10 fps
couldn't find particle pcx for UD-8 Kayser
ANI Kayser_Particle with size 80x80 (37.5% wasted)
found ani Kayser_Particle for UD-8 Kayser, with 7 frames and 30 fps
couldn't find particle pcx for UD-D Kayser
found ani Kayser_Particle for UD-D Kayser, with 7 frames and 30 fps
couldn't find pcx for Circe
found ani Circe_Bitmap for Circe, with 20 frames and 15 fps
couldn't find particle pcx for Lamprey
ANI Lamprey_Particle with size 86x86 (32.8% wasted)
found ani Lamprey_Particle for Lamprey, with 9 frames and 20 fps
couldn't find particle pcx for Shivan Heavy Laser
found ani Shivan_Laser_Stream for Shivan Heavy Laser, with 11 frames and 35 fps
couldn't find particle pcx for Shivan Mega Laser
found ani Shivan_Laser_Stream for Shivan Mega Laser, with 11 frames and 35 fps
cf_get_file_list_preallocated looking for type=7, filter="*-wep.tbm"
Wokka!  Error opening file (difficulty.tbl)!
Unable to parse 'difficulty.tbl'!  Code = 5.
Loaded modular ship table file ships.tbl
cf_get_file_list_preallocated looking for type=7, filter="*-shp.tbm"
Wokka!  Error opening file (hud_gauges.tbl)!
Unable to parse hud_gauges.tbl!  Code = 5.
cf_get_file_list_preallocated looking for type=7, filter="*-hdg.tbm"
ML 10/09 12:03:09~   psnet_init() detected lan connection
ML 10/09 12:03:09~   psnet_get_ip() reports IP : 0.0.0.0

ML 10/09 12:03:09~   Receive buffer set to 4096

ML 10/09 12:03:09~   Send buffer set to 4096

ML 10/09 12:03:09~   Error on IPX startup 10047

ML 10/09 12:03:09~   Network
ML 10/09 12:03:09~   Found no RAS connections
cf_get_file_list_preallocated looking for type=25, filter="*.pcx"
cf_get_file_list_preallocated looking for type=32, filter="*.pcx"
loading animated cursor "cursor"
ANI cursor with size 24x24 (25.0% wasted)
Ships.tbl is : VALID
Weapons.tbl is : VALID
cfile_init() took 59
Got event GS_EVENT_TEAM_SELECT (49) in state NOT A VALID STATE (0)
Loading 2_ChoosePilot-m.pcx for the first time.
MEMLEAK DEBUG: lock pcx
cf_get_file_list_preallocated looking for type=28, filter="*.pl2"
cf_get_file_list_preallocated looking for type=28, filter="*.plr"
Loading 2_ChoosePilot.pcx for the first time.
MEMLEAK DEBUG: lock pcx
TIMER ROLLED!
Loading 2_CPB_060002.pcx for the first time.
MEMLEAK DEBUG: lock pcx
Loading cursor.ani for the first time.
ANI cursor.ani with size 24x24 (25.0% wasted)
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
Frame  0 too long!!: frametime = 0.279 (0.279)
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!
TIMER ROLLED!


It seems every time the 'timer rolls' the cursor freezes for like 5 seconds. anyone have any idea whats going on because its just killing me not being able to play fs2 on this new comp of mine. Thanks.
Title: Problem
Post by: MatthewPapa on October 09, 2005, 05:46:56 pm
bump

any ideas guys?

I really need to fix this!
Title: Problem
Post by: WMCoolmon on October 09, 2005, 06:52:06 pm
Sounds like it's taking an extremely long time for frames to render?
Title: Problem
Post by: Galemp on October 09, 2005, 07:03:36 pm
toss it into Mantis. I think you'll get a response there.
Title: Problem
Post by: Sticks on October 09, 2005, 10:22:21 pm
What build is this?

Edit: Never mind, I see that you tried all the recent stuff. Have you tried something a bit older to see when the problem started happening?
Title: Problem
Post by: MatthewPapa on October 09, 2005, 10:54:04 pm
damn.......
i just clean installed XP and fs2 on a brand new hdd, updated to all the latest drivers and still no go. The same problem happens on scp fs2 as well as vanilla fs2. Maybe these new graphics cards have something inhibiting them from working right with freespace 2. Has anyone else with a 7800GT or X2 been experiencing these problems? If so it should be addressed soon.
Title: Problem
Post by: CaptJosh on October 10, 2005, 01:14:36 am
Have you tried OpenGL instead of D3D on FS2Open?
Title: Problem
Post by: Sticks on October 10, 2005, 10:29:27 am
Are you having graphics issues with other games? This sounds like a hardware issue to me.
Title: Problem
Post by: MatthewPapa on October 10, 2005, 10:36:36 am
no problems with any other games

doom3
guild wars
WoW
Civilization 3
X2 The threat

Games that dont work
Freespace 1
Freespace 2

So obviously there is a common denominator in this problem I am having. Freespace hates my top of the line hardware. I doubt i will be the only one having this problem in the future. And yes this happens in both ogl and d3d.
Title: Problem
Post by: aldo_14 on October 10, 2005, 10:40:09 am
Unfortunately, I'd imagine it might be a mite difficult to find a load of people with the same spec for testing..........
Title: Problem
Post by: MatthewPapa on October 10, 2005, 10:58:40 am
I found it in the code.

C:\cvs\fs2_open\code\io\timer.cpp(195):      mprintf(( "TIMER ROLLED!\n" ));

Code: [Select]

QueryPerformanceCounter(&time_tmp);
if ( time_tmp.QuadPart < Timer_last_value ) {
// The clock has rolled!
Timer_base = time_tmp.QuadPart;
[b]mprintf(( "TIMER ROLLED!\n" ));[/b]
// Hack: I'm not accounting for the time before roll occured,
// since I'm not sure at what value this timer is going to roll at.
// Time_now = time_tmp.QuadPart;
}
Time_now = time_tmp.QuadPart - Timer_base;
Timer_last_value = time_tmp.QuadPart;

out->QuadPart = Time_now;

LEAVE_CRITICAL_SECTION( Timer_lock );
}
#endif // _WIN32


Now i wonder what causes it....
Title: Problem
Post by: taylor on October 10, 2005, 11:02:32 am
I highly doubt this is related to video problems.  It's definitely an issue with the timer but I can't say why.  Possibly some other hardware issue but likely just something between Windows and the system...

Oh, you have a dual core CPU?  That would most likely be your issue.  It's having a fit with QueryPerformanceCounter so I guess we'll have to add that to the todo list, though I'm not sure what to do about it.  Off to MSDN I guess.

For now I think it will work if you run the game(s) in compatibility mode.  If that doesn't help any report back and I'll put this at the top of my list of things to fix.
Title: Problem
Post by: MatthewPapa on October 10, 2005, 12:59:10 pm
holy crap i cant believe i diddnt think of that......
thanks taylor compatibility mode fixed it
im gonna go add this to the Wikki for future reference because this will be a problem in the future most likely IMO

*wonders if he is the first one who has ever run fs2 on a dual core processor*
Title: Problem
Post by: MatthewPapa on October 10, 2005, 03:59:11 pm
lots of bugs in compatibility mode but at least it works

Freespace 2 obviously has some very serious issues with X2 processors

whats the next step?

EDIT: Still does it after a certain period of time, this is bad
Title: Problem
Post by: taylor on October 10, 2005, 04:29:09 pm
Quote
Originally posted by MatthewPapa
Freespace 2 obviously has some very serious issues with X2 processors

whats the next step?

I'm busy debugging something else right now but I'll research this tonight and see if I can get some type of fix going.  I'll have no way to test it properly though so I'll just PM you a build link to try.  If it works then I'll commit it but I'm hesitant to do so until it's been tested (given that I have no idea what the fix would be).

The big things to test will be joystick input and streaming audio (voices, music) since those things will run in different threads and so different cores.  If that stuff works ok then it should just be the timer that's the problem since it's already known to have multi-proc issues.  The rest of the game should be sticking to that one main thread and so it shouldn't have anything bad going on for the most part.
Title: Problem
Post by: CP5670 on October 10, 2005, 04:32:11 pm
I have heard that there is some way to disable one core for a given process in the task manager, something related to "processor affinity." Don't know any details of this, though.
Title: Problem
Post by: MatthewPapa on October 10, 2005, 04:33:27 pm
ok thanks for the help

*diddnt know freespace2 was somewhat multithreaded*

kazan said he thinks the problem "is a block of windows specific code. base win32 api at that - not even DX." if that will help you any.

once again, if u need any testing let me know. i got a copy of MSVC 2005, let me know id there is anything there i can do as well.
Title: Problem
Post by: MatthewPapa on October 10, 2005, 04:51:37 pm
Quote
Originally posted by CP5670
I have heard that there is some way to disable one core for a given process in the task manager, something related to "processor affinity." Don't know any details of this, though.


you couldnt have been more right! that fixed it...at least for now. i will keep everyone posted.
Title: Problem
Post by: MatthewPapa on October 10, 2005, 04:57:12 pm
(http://www.game-warden.com/files/files/matthewpapa_cpu1.jpg)
(http://www.game-warden.com/files/files/matthewpapa_cpu2.jpg)
Title: Problem
Post by: taylor on October 10, 2005, 04:57:15 pm
Quote
Originally posted by MatthewPapa
kazan said he thinks the problem "is a block of windows specific code. base win32 api at that - not even DX." if that will help you any.

I already know exactly where and what the problem is, it's documented by Microsoft (checked on that before).  It is a base win32 api that's the problem but there are several alternatives.  The only question is how to properly fix it without hurting single-proc machines in any way.  There is some overhead with locking and I want to avoid that if at all possible for the multi-proc people.  I'd rather just fix the code than to rely on processor affinity since that will work but it's probably not the best solution (there are complaints about it from what I understand).
Title: Problem
Post by: taylor on October 11, 2005, 09:28:42 am
Try this: http://icculus.org/~taylor/fso/willrobinson/fs2_open_MP-dbg.rar

Hopefully better timer code in use now.  It should work the same regardless of how many processors are in use.  If it works let me know and I'll commit the changes.
Title: Problem
Post by: AnubisNL on October 11, 2005, 02:31:35 pm
Hi, I have a problem with the NTF hercules. I can only see the cockpit and the rest is invisible, and I can see the glowing of the engines but it's a real small target, because I can't hit anything but the cockpit. It's virtually impossible to destroy one and it's getting frustrating cause the transports I have to protect keep getting destroyed because I can't shoot the damn planes.
Can someone help or does anyone have the same problem.
Title: Problem
Post by: Wanderer on October 11, 2005, 02:39:25 pm
If you are using media VPs have you enabled the tga textures from the launcher? (enable jpg.tga textures)

And

:welcome:
Title: Problem
Post by: AnubisNL on October 11, 2005, 03:26:27 pm
Ey thanks a lot. That solved the problem. Do I have to do that with other things too, because I have all the VP files like texture, music, core, , effects, adveffects, models.
Anyway thanks a lot m8;)
Title: Problem
Post by: karajorma on October 11, 2005, 04:11:12 pm
Nope. JPG TGA is the only thing you HAVE to turn on to make any of the media VPs work. The others are optional but you won't be using them to best effect unless you turn on shine and glow for instance.
Title: Problem
Post by: MatthewPapa on October 11, 2005, 09:56:47 pm
Quote
Originally posted by taylor
Try this: http://icculus.org/~taylor/fso/willrobinson/fs2_open_MP-dbg.rar

Hopefully better timer code in use now.  It should work the same regardless of how many processors are in use.  If it works let me know and I'll commit the changes.


Seems to be working fine so far; the dual core processor fix definately worked! Thanks a million taylor! I will continue debugging to confirm that everything is working allright.
Title: Problem
Post by: taylor on October 12, 2005, 01:10:20 am
Quote
Originally posted by MatthewPapa
Seems to be working fine so far; the dual core processor fix definately worked! Thanks a million taylor! I will continue debugging to confirm that everything is working allright.

Ok, I went ahead and commited it so it should show up in redmenace's next builds too.  The new code should be a little faster than what was used previously as well.  If you notice any strange issues with framerates or input sluggishness please let me know.
Title: Re: Problem
Post by: Mr_Blastman on June 27, 2006, 10:16:15 am
I just recently upgraded to a similar setup as the other x2 user.

I have a X2 4400+, 2 gigs of DDR2 6400 ram and a 7900GTX.

I decided to give FS 2 a try and play it with no slowdowns (finally!) last night, and witness it on my newly built collimated display box that utilizes a fresnel lens (I have a virtual 30+ inch display with pseudo 3d depth perception! - capital ships are INCREDIBLE) and I found the following:

I'm using Shivans 3.6.8 torrent install and I was getting long pauses in flight, some speed ups and slowdowns over and over.

I set the affinity to one core and it helped somewhat but there was still pausing and eventually it just paused infinitely.  It appears the problem still exists - or Shivans install does not have this update?
Title: Re: Problem
Post by: karajorma on June 27, 2006, 11:06:37 am
Shivan's torrent should have the fix (unless he's included the 3.6.7 exe somewhere in there). Try removing mv_adveffects or renaming the extention to vpDisabled so that FS2 ignores it and try again.

EDIT : Actually, before you do that go to the recent builds forum and try 3.6.9 RC3. Your PC should have the muscle to run mv_adveffects so try that first.
Title: Re: Problem
Post by: CP5670 on June 27, 2006, 11:25:16 pm
I don't think any recent builds have the dual core problems anymore. I haven't had any issues. Have you installed the AMD driver and MS dual core hotfix?
Title: Re: Problem
Post by: thundernoggin on July 19, 2006, 10:11:42 pm
AMD Dual-Core Optimizer - The AMD Dual-Core Optimizer can help improve some PC gaming video performance by compensating for those applications that bypass the Windows API for timing by directly using the RDTSC (Read Time Stamp Counter) instruction. Applications that rely on RDTSC do not benefit from the logic in the operating system to properly account for the affect of power management mechanisms on the rate at which a processor core's Time Stamp Counter (TSC) is incremented. The AMD Dual-Core Optimizer helps to correct the resulting video performance effects or other incorrect timing effects that these applications may experience on dual-core or multiple processor systems.

http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_871_13118,00.html (http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_871_13118,00.html)