Author Topic: Debris Crashing  (Read 8107 times)

0 Members and 1 Guest are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
StrattComm your roommate is talking out his arse

he found a 'solution' that solves the symptom, not the problem

floating points in comparisions don't cause any problems either

this is a memory overwrite somewhere
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
He didn't find the "solution" and the symptom is of the problem of not accounting for the sometimes odd ways that computers deal with floating point variables.  In general a proximity comparison is preferable for floating points (within set range of # rather than logical equals) as it allows for small miscalculations and inconsistancies to be overlooked.  He actually pointed me to a discussion on TopCoder that discussed just such a crash, and that was the basis for my post what, two weeks ago.  And I didn't say he looked at the code and dug up a the solution either, he just pointed out something (originally discussed on TopCoder I believe) that has appeared before, can cause a program to crash, only shows up in rare instances, and is a genuine pain to trace and debug.  As for him "talking out his arse," he is one of the best C++ coders you'll ever meet so it wouldn't hurt to at least take it under advisement.  It's not the only possibility for the crash or even a likely one, but it is possible.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline ynaig

  • 21
From reading the posts about the crash I think it might be worth taking in consideration the produced code by the compiler cause when I was working on a big project, I was experiencing strange crashes that was never caught in the debug version, and after testing and going thru the assembler code produced by the compiler for the release code, i found a small bug, a mismatched stack frame register that wasn't supposed to be there. The problem caused by that was that there were too many functions/classes in one file that might have caused the compiler to misproduce one byte of code, and it was gone by just dividing the big source file in smaller files.

Just telling my story in hunting a devious bug.

Ynaig

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Hm.  Ynaig, would you like to take a look at the code?  Say the word, and we'll give you an avatar and private forum access. ;)

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
you seem to enjoy pain.  you'll fit right in
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline ynaig

  • 21
Quote
Originally posted by Goober5000
Hm.  Ynaig, would you like to take a look at the code?  Say the word, and we'll give you an avatar and private forum access. ;)


Well I did a cvs for fs2_open and i saw that the file named hudtarget.cpp is way over 170KB and I know from my experience that big source files always compromises the compilers' ability to produce good code. Please take in consideration to break it in smaller files, as I can't successfully compile the entire fs2_open with VS.NET 2003. I keep getting lots of errors like "code\graphics\2d.h(561) : error C2383: 'screen::gf_set_palette' : default-arguments are not allowed on this symbol". At one moment it barfed with compiler internal error, meaning that the compiler ran out of memory or resources when trying to compile a file. I have 512MB so it's enough for compilation, but again I speak from experience that such big source file spells trouble for compiler.

Best regards,
Ynaig
« Last Edit: December 05, 2003, 08:52:59 pm by 1586 »

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
You downloaded the source; you're in. ;)

 

Offline Sandwich

  • Got Screen?
  • 213
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Yes, he is. ;)
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline ynaig

  • 21
I tried to compile the source code with VS.NET 2003 but to no avail, I keep getting lots of errors as i stated above. I guess the project is for VC6 which i don't have it anymore. Sorry. If i could have time to edit all the source files to compile under VS.NET 2003 i could help, but my time is limited.

Ynaig

  

Offline Kakis

  • 24
I'm missing the file "amvideo.h" which prevents me from compiling. Where can I get it?