I'm sure the issue is something related to my UDT arrays, as I use them often (as a lot of you have said). I've always been extremely careful to avoid what I've found in the past to cause issues, but apparently it isn't enough. One thing I'll try that BatVink mentioned though,
Quote: "I only ever expand arrays, never decrease them. I believe from my experience that increasing them is not an issue. This would suggest a memory leak when removing elements and the old data not being cleaned up."
It's worth a shot.
Quote: "understand, searching for this kind of errors is no fun.
debugging with print or selfmade breakpoints (sub function enabled by a flag with print and sync), storing
position or last function call in a global udt will help you finding errors/problems faster.
i agree in version < 108 there was much problems in agk that prevent
me from develope a game too.
v2 seems better."
Yep. I do have an error log that's come in handy throughout development. So far it hasn't helped me track anything down though. The part of the code that seems to be causing the issue moves depending on what functions I comment out in testing.

It's become rather tricky. I think my only chance it to check every array to make sure I haven't missed anything simple.
Quote: "It's never the compiler's fault. It's always mine!"
Quote: "Those are elementary mistakes, so I think it's a bit tough to blame the compiler."
It is always my fault

but you can't expect the programmer to never make mistakes. Somehow I sense I have a typo somewhere. I've never been a fan of treating undeclared variables as 0, it always gets me. Regardlessly, the program should never simply crash. We have error reports because mistakes are made

If AppGameKit was reporting properly this sort of problem would likely take under a minute to solve.
Quote: "I would say that in general projects don't scale as well when using basic. This is the reason much of the practises the basic language uses are not used anymore.
That said, if your project is not planned out in every detail at the start then 5-6 months is around the time it gets messy, no matter what language you are using imo."
Absolutely. OOP does seem to pay off a lot more over time. My project is actually a pretty good reflection of what I had laid out originally. Of course, minus the bug
Edit: Some of my changes seem to have helped the problem, but not stopped it. The crash now just takes longer to reproduce
Edit2: Apparently, removing this line fixes the problem ._.
deleteSprite(bullet[ID].bodyID)
The ID is undoubtedly in range, but perhaps my array is somehow corrupt and the value passed into deleteSprite crashes it? I'll find out soon I suppose.
Edit3: Nope. ID:0 bodyID:10035. Does AppGameKit wait to remove sprites at a later time? The only difference I can see here is that this deleteSprite is called close to update(0). (Physics is enabled for these sprites) Perhaps I'll turn physics off entirely first.
Edit4: Nope.
setSpritePhysicsDelete(bullet[ID].bodyID)
setSpriteVisible(bullet[ID].bodyID, false)
Also crashes. I'd also like to point out the error only seems to occur when I have just altered the sprite's collision bits
Edit5: Interesting.
setSpritePhysicsOff(bullet[ID].bodyID)
setSpriteVisible(bullet[ID].bodyID, false)
Does not crash. It seems to relate to removing physics objects. Additionally, the error occurs very frequently if I always alter the collision bits and then remove. It seems that if one of these sprites originally is set to NOT collide with another sprite, in 1 frame is set to collide with it, is removed, and would have collided with the other sprite had it still existed, AppGameKit crashes. I'm going to test my theory by waiting to delete the sprite until after update() and collision check loop.
Relevant Edit: Oh my gosh I was right!

So it wasn't my fault after all. Well, perhaps the issue only occurs because of array problems, but I have very few changes left to make. If the project can just crawl the last couple meters I can live with it

My code has turned into a complete abomination as I kept all the changes as I went on on the off chance that there were multiple problems. Summary,
set sprite A to not collide with sprite B
sync()
set sprite A to collide with sprite B
ensure that sprite A and sprite B are lined up to collide
delete sprite A
update(0)
enjoy crash

or at least for me. I'll have to isolate it later on and see if that's always the case or if my code is cursed.