[FIXED]Minidumps in Beta 3

So far I have had 3 minidumps in Beta 3.  It only occurs if I don't restart after the last game and play another game.

http://www.fileden.com/files/2008/8/7/2039910/Sins-v1.096-2008-10-14-21-24-30-5860-5332.dmp http://www.fileden.com/files/2008/8/7/2039910/Sins-v1.096-2008-10-14-21-29-49-6496-7260.dmp http://www.fileden.com/files/2008/8/7/2039910/Sins-v1.096-2008-10-18-20-52-34-9880-10016.dmp

 

4,221 views 35 replies
Reply #1 Top

I'm trying to recreate this now. Were you using a mod? Is there an easy way to make it happen?

Reply #2 Top

No mod.  Make sure that Alloy is enabled.  The easiest way to make this happen is play a game using ICO for a little while (might as well just play out a good 2v2 just to get your system going).  Once the game is done, play another game in ICO (without restarting the game and as quickly as possible).  Seems to be the trigger.  If that doesn't trigger it, just quit and remake a game.  Repeat until you get the dump, it will eventually come.

My gut says that there is a variable that needs to be reset when you finish game.  This would explain why it doesn't happen when you start the game fresh.

Reply #3 Top

Ok, I was doing all of that over and over again but I wasn't using Alloy. I'll try that new condition out. Thanks!

Reply #4 Top

I fixed one of the causes. Of course there could be more. Thx for the help!

Reply #5 Top

Excellent.  Thanks!  Mind if I ask what one of the problems was?

 

Reply #6 Top

Sure. Buffs that activate on the "OnFinished" condition were being applied during shutdown of the game instance. So when you started a new game, there were buffs in the master buff list which were referencing things that no longer existed. The chance of this happening was pretty rare.

Reply #7 Top

Out of curiosity - what is the game written in???

Reply #8 Top

Probably mostly C++ - majority of windows software is, which makes it very hard platform to develop for if you hate pseudo-OO programming like yours truly :)

Reply #9 Top

What exactly is pseudo-OO programming???

Reply #10 Top

hehe...pseudocode object oriented?  or fake object oriented?

Reply #12 Top

Pseudo as in its not real OOP.

Real OOP is SmallTalk: everything is an object and you communicate with objects exclusively via messages.

If parts of the language are in procedural programming with implied object messaging, you have pseudo-OOP.

Since many people find true OOP confusing - in SmallTalk, there is no operator precedence, its a simple left-to-right thing, because algebraic operations are just more objects messaging each other, so why shoudl they have separate rules? - OO languages after SmallTalk use procedural algebra, multiple object inheritance models, and Greenspun's tenth rule instead.

This makes them (generally) lose on power/information density, and gain on flexiblity.

Reply #13 Top

@ Soor

In the words of the great Jack O'Neil, "That was a waste of a perfectly good explanation."

Reply #14 Top

Pseudo as in its not real OOP.

Real OOP is SmallTalk: everything is an object and you communicate with objects exclusively via messages.

If parts of the language are in procedural programming with implied object messaging, you have pseudo-OOP.

Since many people find true OOP confusing - in SmallTalk, there is no operator precedence, its a simple left-to-right thing, because algebraic operations are just more objects messaging each other, so why shoudl they have separate rules? - OO languages after SmallTalk use procedural algebra, multiple object inheritance models, and Greenspun's tenth rule instead.

This makes them (generally) lose on power/information density, and gain on flexiblity.
End of quote

 

@ Soor

In the words of the great Jack O'Neil, "That was a waste of a perfectly good explanation."

End of quote

 

It is ok How....it is just a fancy way of explaining that he meant "fake".  Aaaah....good old Jack O'Neil.

 

Soor,

Luckily you future programmers will get the benefit of extraordinarily powerful CPU's and massive storage capacities to use with the inefficient but flexible languages of the future.  Considering I taught myself to program in Pascal as a kid, I was not amused when I had to write some programs in Cobol for a college class.  It didn't even seem like a programming language to me.  You should try Cobol...C++ will start to look sexah.

Anyhow, until that future day, I will marvel at how efficiently some games (cough Sins cough) run on an economy computer.  =)

 

 

Reply #15 Top

Quoting Howdidudothat, reply 13
@ Soor

In the words of the great Jack O'Neil, "That was a waste of a perfectly good explanation."
End of Howdidudothat's quote

I was bored :D

Quoting Cykur, reply 14
Soor,

Luckily you future programmers will get the benefit of extraordinarily powerful CPU's and massive storage capacities to use with the inefficient but flexible languages of the future.  Considering I taught myself to program in Pascal as a kid, I was not amused when I had to write some programs in Cobol for a college class.  It didn't even seem like a programming language to me.  You should try Cobol...C++ will start to look sexah.

Anyhow, until that future day, I will marvel at how efficiently some games (cough Sins cough) run on an economy computer.
End of Cykur's quote

Contrary to popular opinion, flexiblity and efficiency are not in an inverse relationship. LisP exists since 1958, is still by far the most flexible programing language around, and yet modern implementations of CommonLisp can equal C in performance - naturally, like with all programming language comparisons, this depends on the data structure you're using.

The problem with C++ is not that its a hybrid of Algol, Smalltalk and Lisp - that frankensteining is true for most languages designed in the last 20 years, you just accept it and move on. However, its lack of overall design direction means it has a number of separate, incomplete and clunky abstraction mechanism, and 0x looks like it will only add to the melange.

That's a natural byproduct of greenspun's tenth rule, but C++ suffers particularly badly from it for a number of reasons.

Finally, you should never use cobol in language comparisons, its like using the original Benz Patent Motorwagon in car speed comparisons: the only language that might possibly lose out in such a comparison is BASIC, and there's room for debate.

Reply #16 Top

I kinda liked BASIC...back in the day.  At least it was easy to for my feeble brain to understand.....not that I'm making any statements about its overall value as a programming language.

Reply #17 Top

I write in C mostly today, doing windows drivers and linux kernel etc.. But don't talk about things like OO, Lisp or Smalltalk etc.. there are far too many "script kiddies" out there who think that PHP, ASP and Python are God's gift to software development.

I don't mean to run down "script kiddies", I write a ton of Perl/PHP for Web UIs as well. But such languages tend to make programmers lazy with things like "automated garbage collection" instead of malloc/free or "dynamicly sized arrays" instead of predefined buffers of char x[y].. Ask any of these young 'uns what "\0" means to a string and they'll probably look at you funny.

IMHO, while such advancements are very useful (esp things the two examples I gave to defeat poor programming and buffer overuns etc), I just feel that while there are more "programmers" in general nowadays compared to 30 years ago, the number who truly understands the fundamental concepts behind telling a computer how to do something is still lacking.

Reply #18 Top

I think higher level programming languages that abstract away details like garbage collection and other things are still useful.  If you need to write something quickly, do a mockup of a GUI, or need some easy OS neutral code, then a high level language is an OK choice.  Obviously if you need fast system performance you'll want to use something lower level like C to get all the performance you can out of it.  Higher level languages open up programming to more people which is usually a good thing.  I think there are two big issues for programmers in the future.  First, as programming languages begin to build on top of one another and we get even more stuff abstracted away, it becomes increasingly difficult to maintain the language.  It's like building a tower out of blocks, if there's something wrong in C at the lower level this could have a trickle up effect to the higher level languages that are built on top of it.  The other issue which I think is even bigger is the fact that multi-core CPUs will become more popular.  We'll go from 4 to maybe 64 in a fairly short amount of time.  It becomes increasingly difficult for programmers to take both legacy code and even new stuff and get out of the current sequential programming paradigm into some new paradigm where there are tons of cores.  You can't just hardcode support for 2 cores or 4 cores, it has to be a larger change in programming.  New compiler tools and other things should be able to help although I think it's still unclear if they can do everything for us.

Reply #19 Top

C# is a new language - no legacy issues...

It has Garbage Collection, and a whole bunch of other things that mean you can't overrun an array accidentally. And is it so much easier going

if (x == null) rather then if strcmp(x, "\0") etc...

I can do things in PowerBuilder/.NET in a day that would have taken me weeks to do in C (which I did at Uni. Win32 in C = yuck)...

The issue is that people need to know HOW to program. Once you know that, then a language that makes things easier is better then one that makes you do it all yourself...

Reply #20 Top

if (x == null) rather then if strcmp(x, "\0") etc...
End of quote

Actually, I think strcmp(x, "\0") is wrong.. shouldn't it be ('\0' == x[0]) instead? Fundamentally, x is an array of chars, hence strcmp(x, "\0") implies:

((x[0] == '\\') && (x[1] == '0') && (x[2] == '\0'))

whereas (x == null) is more likely a null (empty) string, meaning ('\0' == x[0])..

See, well, this is what I mean.. Please don't misunderstand me, I'm not trying to run you down or anything.. Simply that an array (a series of bytes one after another) is fundamentally a basic building block of a string, even if it is a vector/class or other dynamic construct of some kind. The difference is that in higher level languages, someone has taken care of the array handling work for you so while it is easier to write/program, it means that the knowldge of the lower fundamentals are "obscured".

Probably the day will come when programmers forget how a buffer overun happens. And maybe one day, if/when that happens, that will be the source of a really big security hole.

 

Reply #21 Top

C++ is a fascinating language. Complex, yes, but so powerful. Other, more recent programming languages are often single-paradigm languages (e.g. Java forces you to use OO), while C++ is multi-paradigm. OO? Check. Structured programming? Check. Sphaghetti code? Check. Obfuscated code? Check. All possible with C++, it does not force you into any specific style.

Most if not all language features have been designed for efficiency, things like mandatory garbage collection (Java), switch statements on strings (C#) and similar would just devrease overall performance of C++.

And if you really need those things, you can implement and use them. Smart pointers, weak references and such, all part (with C++0x) of the STL. It is all there.

And then there's the template system, again extremely useful. Especially the container classes of the STL with their guranteed runtime complexity classes. What other language does have those?

Templates really aren't that difficult. The only problem are the compilers. Understanding the error messages they spew out, that is the hard part. But hardly a flaw in the language.

 

To conclude, let's do a small quiz: What does the below line do (syntactically)?

foo<4>(5);

Reply #22 Top

I HAVE coded in C before. Skipped C++ (thank goodness) and now play with C# and other languages.

Its may have been 10+ years since Uni, but I believe strcmp checks the two strings (char arrays) char by char

http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html

So if strcmp (x, "\0") ==0 would work (wouldn't it???) - since you are asking to determine if string x is equal to a null terminated empty string.

Simply that an array (a series of bytes one after another) is fundamentally a basic building block of a string, even if it is a vector/class or other dynamic construct of some kind. The difference is that in higher level languages, someone has taken care of the array handling work for you so while it is easier to write/program, it means that the knowldge of the lower fundamentals are "obscured".
End of quote

You are assuming that a string OBJECT in C# (or other .NET language) or Java is the same as how they are done in C or C++. Since they are objects, they have methods etc... In C#, a string is immutable (but has compiler optimisations to allow str1 = str2 + str3 by converting the code to something like

StringBuilder stringbuilder = new StringBuilder ();

stringbuilder.Append(str2);

stringbuilder.Append(str3);

str1  = stringbuilder.ToString();

Probably the day will come when programmers forget how a buffer overun happens. And maybe one day, if/when that happens, that will be the source of a really big security hole.
End of quote

Maybe - but if the langauge won't allow it (e.g. .NET managed code - cannot overrun buffer) - how can you get a security hole?

Something else to note - unless you REALLY need tight efficent code, higher level languages are easier to develop and are ALMOST as good when compiled. Try writing sockets programming in C# with built in framework support vs C or C++)

Reply #23 Top

So, getting back on topic...are the minidumps gone yet?

Reply #24 Top

So if strcmp (x, "\0") ==0 would work (wouldn't it???) - since you are asking to determine if string x is equal to a null terminated empty string.
End of quote

Hmm, maybe we are misunderstanding each other here. I mean that "\0" is a string, which is entirely different from the null character '\0'. "\0" as a string takes at least two bytes but '\0' as a null character is only one byte long. The null character ('\0') is therefore used as a string terminator, but the string "\0" just means a '\' character followed by the number '0' and does not have any special meaning to a string. Hence strcmp/strncmp string compare (and such string routines) would look at it differently. Perhaps you can try strcmp(x, "") instead, although I think ('\0' == x[0]) is much faster/lighter.

Look at it another way, in your C# example above, what is the difference between (x == null) and (x == "\0") ?

You are assuming that a string OBJECT in C# (or other .NET language) or Java is the same as how they are done in C or C++. Since they are objects, they have methods etc...
End of quote

I don't dispute the object-ness + methods idea of OO. But let me ask a question (pls excuse the high simplification, extrapolate to your fav OO-methods/etc):

str1 = "Hello";

str2 = "World";

str3 = str1 + str2; // which == "HelloWorld"

How did the language/compiler/etc concatenate/join/append/etc the two strings? Chances are they malloc/realloc-ed etc new/more space on str1 then copied the bytes from str1 and/or str2 etc etc. Bottom line is, the strings are still represented as an array at a low level. So the fundamental difference of the string "\0" vs the character '\0' is still there.

Maybe - but if the langauge won't allow it (e.g. .NET managed code - cannot overrun buffer) - how can you get a security hole?
End of quote

That assumes that the guy who wrote the .Net APIs, DLLs, compilers, etc etc all did not make a big mistake. And clearly, those guys needs to understand buffer overruns eh? For example, try writing a Windows Device Driver or Linux Kernel Module in anything but C (not even C++).

Something else to note - unless you REALLY need tight efficent code, higher level languages are easier to develop and are ALMOST as good when compiled. Try writing sockets programming in C# with built in framework support vs C or C++)
End of quote

I fully agree with you. As I said in my earlier post, such advancements are really useful. For example, I thank God I don't need to write ASM.. :) But IMHO some fundamental understanding should be learned by programmers at least, even if they write higher level code exclusively.

 

Reply #25 Top

Quoting Howdidudothat, reply 23
So, getting back on topic...are the minidumps gone yet?
End of Howdidudothat's quote

Oops, sorry, didn't mean to hijack the thread :S