Good FPU Control Error Shiit

Good FPU Control Error Shiit

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Good FPU Control Error Shiit

Post by REVENGE »

Continues to be cause of much PITA and irritation...argh...

Now, it only happens when I press, then release Alt+Shift, so I have to remember not to do that ingame, which is annoying because I can't build in blocks now...

As for the actual error, it's

Code: Select all

Assertion failed!

Program: Blah\Spring.exe
File: rts\Game\game.cpp
Line: 1375

Expression: good_fpu_control_registers("CGame::Update")

For more information, go post thread on TA: Spring forum and annoy people ingame by crashing all the time...

Blah blah blah...
User avatar
overkill
Posts: 500
Joined: 02 Sep 2006, 01:15

Post by overkill »

is that why u keep crashing
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Post by REVENGE »

overkill wrote:is that why u keep crashing
YES! :oops:

/me cries...
BaCaMe
Posts: 11
Joined: 29 Dec 2005, 23:57

Post by BaCaMe »

Just on a sidenote: Alt+Shift is the standard keycombo to change to a different keyboard input scheme for windows. Maybe this is what's causing the problem somewhow and not Spring itself?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

http://taspring.clan-sy.com/mantis/view.php?id=341:
Changed the code to be a bit less constraining.

In the next version, it will show a warning in infolog.txt and reset the FPU control word to the correct value. You then only have to pray no synced floating point calculations were performed while the control word was wrong, because if that's so you'll probably desync.

Keeping the bug report open because this is just a workaround, not a true solution.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Is the FPU control word a per-process thing, or could other running apps also change it?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It's per process, should be part of the FPU state that's supposed to be saved/restored on task switches. (It's saved with FXSAVE and loaded with FXRSTOR at least.)

So it should be as easy/hard to change by other apps as the rest of the FPU state of another program :-)

EDIT: according to some links and what I thought already, the problem is that in windows lots of system functions load lots of DLLs all in the same context, and some DLLs mess with the FPU control word (they set it in their initialization routine for example).
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

I suppose executing an FLDCW on every ENTER_SYNCED would be overkill? :]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Has nobody written a 3rd party implementation of these libraries for use in this sort of situation? Surely we cant be the first people to come across this problem in an opensource project.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Kloot wrote:I suppose executing an FLDCW on every ENTER_SYNCED would be overkill? :]
Hmm, could be possible too. Still have the same issue tho, but less chance for it to happen.
Post Reply

Return to “Help & Bugs”