Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Tier 1 product is crashing with an unknown error.

Author
Message
Kurtuk
11
Years of Service
User Offline
Joined: 5th Dec 2012
Location:
Posted: 6th Dec 2012 04:12
I'm working on a new game in tier 1 and this is the error I receive Process terminated with status -1073741819 (0 minutes, 4 seconds).
I'm concerned that somehow my compiler is not Registered properly because after running install about 5 times now I have yet to see any way in which it asks for my registration code so on the forums I found a guy post about it and followed his directions to put my serial code in place but nowhere in the program does it verify that it is recognizing my serial code. My programs run when I reinstall the compiler and then suddenly they crash every time or part of the program don't run at all. Here's a part of the code being used that crashes. At first it would compile with the arrays being Dim map[105,105] as mapstats but if I went above 105 it would crash in version 1076. I just installed 108, manually added my serial code again and then compiled with a much higher DIM[500,500] as mapstats but now the pathfinding code will not even run and if I dim it lower it crashes again.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 17:09
For starters, did you completely uninstall AppGameKit before you installed over it again? This can sometimes be a problem.

In your first code snippet, where are MapSizeX, MapSizeX and roomcount defined? Are they globals? (presumably, yes)

Is MapSizeX/Y greater than RoomSizeX/Y? Your second snippet doesn't show the values for roomcount, RoomSizeX and RoomSizeY (globals?).

Aside from all that. Since map appears to be an array of UDTs, that is probably your main problem. Especially in functions, directly using members of a UDT array (especially a multi-dimensional one) can be a problem. Try copying the array entry to a local variable of type mapstats and then using the variable instead of the directly addressed array entry. This has been know to fix 99.99 percent of the kind of error you are seeing.

But you need to be careful about storing values back into the actual array. Copying to a local variable and modifying the variable does NOT affect the original array entry.

This is either redundant code or an error (Tier 1 is not case sensitive). You set the array .room value in if .. else if .. pair with this string:

And then, after the if .. else if .. pair you execute this statement (which is effectively exactly the same thing):


Later in the code, you do this: DoorX = a + random(1,map[a,b].roomsizex-1)

And as best as I can tell, you only set the .roomsizeX/Y elements for the first and last column/row in the map. And you are relying on non-assigned values being zero. I make this assumption because the if statement that leads to the line listed above is: if map[a,b].start > 0

And you are only setting the .start element in the map[0,0] entry.

In general, I can see lots of room for optimization to speed up your code. The way you are using nested do loops and then only doing the first and last column/row is a very good example. And the case where you select exactly map[0,0] in a nested loop is unnecessary. That set can get moved outside of the nested loop altogether.

This is all I can do for now, I need to move on to my regular tasks.

Cheers,
Ancient Lady
AGK Community Tester
Kurtuk
11
Years of Service
User Offline
Joined: 5th Dec 2012
Location:
Posted: 7th Dec 2012 09:00
I have recently discovered the compiler is the problem. If I uninstall 108 beta and reinstall 1076 the game error occurs if I don't initialize all my local variables. The instant I removed roomcount as integer the game would crash. Then I noticed some other odd things. When I compiled the code from Codebase called Pathfindtest it will work just fine with 1076 but when 108 is installed it doesnt work if you recompile it. Went to a backup and the code still won't compile. it seems 108 beta breaks some things but fixes others. It compiles my code but will not run the pathfinding routines. It gives no path to target every single time unless I switch back to 1076.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Dec 2012 16:11
1076 is the best version to use at the moment, the 108+ versions are still beta. You really only should be using them if you need some new functions from it, such as 3D or the new sensor commands. If you can avoid it though use 1076 for anything you may want to release, at least at the moment.

Login to post a reply

Server time is: 2024-11-24 03:54:58
Your offset time is: 2024-11-24 03:54:58