Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (vicknick, AndrewAMD), 1,292 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Random E1513 Crashes #300627
12/03/09 20:15
12/03/09 20:15
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Hello jcl,

I resisted writing thread for three months now, trying to get to the bottom of it myself, but I'm finally all out of ideas and really need your help with it. I've contacted support before without getting into detail about the problem (thinking it had to do with mallocs) but that doesn't seem to be the case anymore..

I've been getting random E15E13 crashes all over my code, in functions that really seem to be fine. And it only gets weirder after this..

I can manage to get it crash at the same line every time I run it. Without changing the code, I then play with the nexus size a bit, and the crash will disappear or happen in another function. Also, sometimes I get the crash to happen much less frequently just by running my project using a bat file command: "C:\Program Files\GStudio7\acknex.exe" myproject.c, instead of running it from WED/SED. Finally, I sometimes got the crash to disappear just by declaring a new array to my scripts, f.e.: "var dummyarray[100000];"

I've done a lot of looking around in the forums and saw your responses to similar problems about being a memory problem/uninitialized pointer, smth like that.. I went ahead with removing all sys_mallocs from my project with no effect. I also removed other suspicious actions like running functions using function pointers, replaced structs with simple static arrays to save my data, etc, with the same results.

My major suspicion now is my lengthy source code. I've been working on this project (Intense X) for many many years now and I'm up to 1.5mb of code in 43 .c files. I've realized that if I comment out #includes of some .c files that contain functions that never even get executed on my test runs, the frequency of the E1513 crashes drop.

Finally, my attempts to debug the reported crashing functions using diag() gave me some pretty interesting results as well:

Let's say I get the following crash:



I fill the is_SubAction_CoverSpotsEvaluation function with diag()s to determine the exact position of the crash inside that function. I don't make any other changes in the code but the diag commands. I then run the project again, and it will now crash on a totally different function.

At one time I managed to get it to crash on the same function even after adding diags everywhere in it. This showed me that it's not unitialized variables that crash it since the function would run 10-20 times using a variable called xyz for example. The 21th time it run the function it would crash when it tried to access the variable xyz for the 21th time. Of course, if I add a few more diags I could move the crash to a whole different location.

I can't think of anything else I can do about this, so I'll have to give up on my project all together if you can't figure it out either. I could of course upload a level which always crashes at the beginning on my machine, although it could be about 100mb zipped.

I'm not sure if I'm still eligible for support or if I ever was (I got A7 Pro as a prize from last summer's Conitec contest) but I'm willing to pay anything it takes for you to take a look at the project. I get a nice return from it, especially on Christmas, and I wouldn't mind giving something back in order to keep it alive.

Thank you,
Aris


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Random E1513 Crashes [Re: LarryLaffer] #300647
12/03/09 21:54
12/03/09 21:54
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
just a small tipp:
check if you have declared two different objects with the same name, like a function or a STRING* both having the same name
"void temp() {}" and "STRING* temp;"
The code will still compile fine then. That gave me random crashes all over my code (usually in plugin functions) and a week of debugging until i found the cause.

Re: Random E1513 Crashes [Re: SchokoKeks] #300667
12/04/09 07:46
12/04/09 07:46
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I had this error too at the weirdest places. It turned out I had some wrong initialized pointer and a missing allocation at a different place in the code.

Once I fixed this, the error was gone.
I guess in case of a pointer/address problem the message can say about everything, but th lsited function most likely is not the root of the problem.

Re: Random E1513 Crashes [Re: FBL] #300669
12/04/09 08:01
12/04/09 08:01
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Programmers encounter often this problem, and have to be creative for finding the reason - that's what makes programming so interesting. Sometimes more interesting than you'd prefer.

Typical reason for those symptoms is writing into a wrong memory area. Either it happens directly in your code, f.i. exceeding an array length or using invalid pointers. Or it's a damaged image, model, or sound file that you're loading. Wrong content of such a file causes memory areas to be overwritten by the loading functions of the DirectX or Windows API.

Both problems often don't crash immediately, but some time later when the overwritten memory area is accessed by a totally different function.

Try to find a code configuration where the crash always happens, or at least often. Then replace all loaded files step by step by a dummy file. This way you can find a file problem. If the crash then still happens, check all suspicious parts of your code.

Some common hints can also be found here: http://manual.3dgamestudio.net/debugging.htm

Re: Random E1513 Crashes [Re: jcl] #300678
12/04/09 10:55
12/04/09 10:55
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I get most of my crashes (~95%) by invalid pointers. Often it's either a ptr_remove to a pointer that was already removed or an access to a pointer that is already invalid (something like ent.string1).

Thank God GS prints out the function where the crash happens for some months ... earlier versions just printed out one of the functions that were currently running. So nowadays debugging is much easier.

Re: Random E1513 Crashes [Re: pegamode] #300680
12/04/09 11:32
12/04/09 11:32
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Whereas I get most of mine from over-running the end of malloc'ed arrays.
Sometimes the invalid placed data gets put in a harmless variable,
or the data itself is harmless in the wrong variables....
Othertimes WHAMMO!!! Instant week-long headache.

But I gotta agree with JCL, this particulat type of fault can be a bugger to track down.
But thats OK, as I find that I improve 'dirty' coding-technique areas as part
of the bug hunt process...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Random E1513 Crashes [Re: EvilSOB] #300921
12/06/09 23:35
12/06/09 23:35
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
@ Aris:
This may be hard with your code but you may try to tear your code apart bit by bit to locate the problem. Since i dont know your programming structure i cant tell if you can simply remove parts of your code backwards but this may help.
You may also try to find the code in older backups where it appeared. (Create backups before debugging like this tongue but i guess you know that ^^ )


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: Random E1513 Crashes [Re: Puppeteer] #300930
12/07/09 01:19
12/07/09 01:19
Joined: Dec 2009
Posts: 4
G
grolflundren Offline
Guest
grolflundren  Offline
Guest
G

Joined: Dec 2009
Posts: 4
INTENSE X AI: STYROFOAM PACK

The latest Styrofoam pack enables you to play INTENSE X with the same capabilities as the others (wood, aluminum foil, bone), but now with random crashes! The errors arent Larry Laffer's fault, its conitec's fault! Lets move to another development engine!

Re: Random E1513 Crashes [Re: grolflundren] #300939
12/07/09 02:56
12/07/09 02:56
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
@Grolflundren:
This isn't helpful. Please do not write posts like this.

@LarryLaffer:
I used to get these kinds of errors all the time in my early projects. Check to make sure you aren't overusing the wait() instruction. That sometimes causes it.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Random E1513 Crashes [Re: Redeemer] #301282
12/09/09 12:43
12/09/09 12:43
Joined: Oct 2003
Posts: 130
Wollongong Australia
J
Jethro Offline
Member
Jethro  Offline
Member
J

Joined: Oct 2003
Posts: 130
Wollongong Australia
Larry
I posted this in the IX Beta forum also.
In a nutshell, we have 6 mini games pretty much ready to go using IX beta 1.0.5b and A7.80. None of them crash randomly!
Of corse we have a few bugs, but they are consistent and we have worked around them.

I notice the screenshot above is from standoff. When we tried standoff we got random errors also, Like JCL said could it be something bad in standoff!!! ie. Model, Image, Texture, wmb, dunno.

Do you get the random errors if you start a fresh project and work up from there?

Jethro.

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1