123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|718|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> adnormal program termination on End?

Wed, 23 Jul 2008, 18:49
mindstorm8191
I've been working on a project called Garbage Invaders for quite some time now. It has grown to be quite a complex undertaking, but I'm enjoying the challenge. The trouble is, I'm starting to have some strange and unfixable problems.

I have only gotten this problem recently, but when my program ends, I get a Visual C++ Runtime Library error. It says that Blitzcc.exe had a runtime error; it says simply, abnormal program termination. I've been using Blitz3D for like 5 years now, and I really don't know what's causing it. I've had projects with more lines of code, so I know the project size isn't the issue. I'm not using any DLLs attached to the project either.

About the only thing I can consider is that the project is quite complex in its data structure. I use a great deal of banks, which serve as lists of types. The only thing I've recently added is a series that processes script values for each component level. That's nothing processor-intensive, it just adds bank values together as needed.

At this point I'm really not sure what to do, or what even caused the problem. I don't want to simplify things, because there's alot more complexity to add to it all (I mean, I don't even have a ship to shoot at yet, or new components to swap in). Has anyone here ever had this sort of problem?

-=-=-
Vesuvius web game
Thu, 24 Jul 2008, 01:55
Jayenkai
Are you 100% sure you're not over-extending any bank values.
I'm not sure how Blitz manages its banks, but it's array stuff's ever so slightly dodgy, so if you start peeking and poking outside your reserved area, it might not be so nice about it.
Other than that, I can't really think of anything specific.

-=-=-
''Load, Next List!''
Thu, 24 Jul 2008, 17:02
mindstorm8191
Well, if I were to read outside a bank's size, I'd get a runtime error straight away. The funny thing about this error is it happens whenever the program ends, not while its running. I've tried freeing all the banks, plus media before ending the program, but that didn't change anything. I can certainly keep working on the project with this error, but its not exactly a nice clean end to the game.

-=-=-
Vesuvius web game
Fri, 25 Jul 2008, 04:46
Afr0
... download Visual C++ 2008 Express and debug Blitz3D?
And send the ASM to BB.com?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Fri, 25 Jul 2008, 07:01
JL235
It might be going outside the bank and writing over some of Blitz's other memory causing a runtime error later in the program. I've heard of it happening in C/C++ when you write outside of some malloc'd memory.

Alternatively, have you upgraded or changed Windows? Perhaps this is similar to the problems discussed in the other thread where a Windows upgrade causes it to now catch some of Blitz's memory errors.
Fri, 25 Jul 2008, 07:16
mike_g
I tried using banks a couple of times in blitz only to find that they were no faster than an array. So I just stuck with using arrays. From what I remember, unlike C, blitz will throw an error when you try and access array elements out of bounds, its the hardware surfaces it lets you write out of buffer with writepixelfast. Which doesnt pose any security risk, because its non-executable data.
Thu, 31 Jul 2008, 14:34
mindstorm8191
JL: Blitz always tells you when you're reading or writing outside the bounds of a bank - or array - no matter how large or small the bank is.

I actually haven't updated my version of WinXP, in over a year and a half, because its my laptop and we don't have wireless here. I wouldn't imagine anything system-wise would have changed with it.

Mike: I use banks because they can be resized easily, and you can move data around in them easily. For example, if I want to cut off the first 4 bytes of a very long bank, I only have to copybank all the data foreward, and resize the bank 4 bytes smaller.

-=-=-
Vesuvius web game
Fri, 01 Aug 2008, 19:46
JL235
Maybe in debug it always finds it, but I've written to outside of an array in Blitz in the past. It's not allowed if it's outside of the applications memory, meaning that if it doesn't crash your writing over your memory somewhere else in your application.
Sat, 02 Aug 2008, 18:13
mindstorm8191
JL: Umm... that's fine and all, but first, I'm not using arrays at all, yet. Second, this only happens when the program ends, not when I'm doing anything else. Third, it says that Blitzcc.exe caused the error, not my game program. Right now I don't think it has anything to do with the way I'm using banks; there hasn't been any problems in the past.

-=-=-
Vesuvius web game
Sun, 03 Aug 2008, 08:13
Teasy
Hey, I've noticed that there are various ways your own Blitz code can trigger various Windows failsafe mechanisms, all the way up to blue screens
What I would do, is try running the program on someone else's computer, to see if the same error occurs.
If it does, try isolating the error by either disabling parts in the code, or thoroughly testing each component separately, until you find the missing "-1"