Re: Francois. Bad Object.
Can you repeat this bad object every time, or was it a once-off?
Unfortunately the chance of fixing it without repro steps is very low.
Re: Francois. Bad Object.
yes i saved the application right before the bad object appeared and it appears everytime.
I think i've really narrowed it down to involving the Create Object Events, and changing What object Shoots What.
So i have Gun ->Shooting Projectile Then I decided to change "WHO" shoots the projectile, when I change the Shooter from the Gun to the "Guy" then the bad object appears.
This really is a nasty bug, but it seems that changing code in the who shoots an object causes something to get lost. I think... [crazy]
Re: Francois. Bad Object.
Then upload it here, definitely.
Re: Francois. Bad Object.
I can second that "Bad Objects" seem to have to do with the "Create Object" event editor action. I've only encountered one in my complicated project so far, and it only occurred in the one object I had given a "Built-in Movement", and stopped happening after I removed that movement.
Does your object have a movement, like ball movement?
Re: Francois. Bad Object.
Please post the application and the way to make the bad object appear.
Re: Francois. Bad Object.
I always used to get bad objects in MMF1.5, TGF etc, but I've never experienced once in MMF2, and I have been using it since it was released in June 2006.
I do remember bad objects occuring with create object actions and shoot actions, though.
Re: Francois. Bad Object.
i'm gonna have to send it to Francois, i don't want to upload it publicly, it's got some coding methods behind most of my games.
Re: Francois. Bad Object.
Makes sense. Hopefully he can repro this one, and another bad object bug is killed!
Re: Francois. Bad Object.
PixelTheif, yes ball movement for the bullets. I'm curious if that's the exact issue though, because it actually made objects bad that were not related to the objects I was changing, which is why i hate this bug, it's really like a mindfield. When you think you've got it, then it totally is in a different area.
The funny thing is that I was just talking about this bug in the Open Forum... [crazy] I haven't encountered this bug in like 2 years, then ...
Re: Francois. Bad Object.
Bad object bug MMF2 2-10-2010
------------------------------
O.k. so the bug appears when i try to change the flame thrower object to make the flame bullet come from the player instead of the flame thrower.
Don't laugh, but I was making the Player shoot the flame thrower from his... hands instead of the weapon, [i was in the process of changing this engine over to a Superhero engine, i always seem to hit some sort of snafu with this type of game...]
I was changing the "Create Object" area of the event editor, and after i changed the association from the flamethrower gun to the player, i received the bad object message...
http://img697.imageshack.us/img697/6315/badobject.jpg
By null at 2010-02-09
Re: Francois. Bad Object.
o.k. now i can't reproduce it... i did exactly the same steps before i got it!
Sure this isn't a Windows problem? Like for instance a resource or Windows environment problem?
It seems like the bug might happen when Windows is at it's most active or weakest?
That's the only other reason why I could imagine it happens so randomly...
This happened about 2 years ago on a long running project Superhero Computer Game, you'll find it if you search for that exact title, but I went back to previous saves and meticulously went through steps to avoid bringing it up, and made it to the next save Bad Object free, i've yet to encounter it again in that Application and i've been working on it on and off for over 2 years making lots of changes... No bad object.
The last time it happened in the Superhero Computer game project, i was changing the character artwork for the player character, and that character had lots of objects and events associated with it.
Re: Francois. Bad Object.
Unfortunately memory trashing bugs (also known as accessing memory outside of array bounds or accessing a freed pointer) tend to be quite random due to memory allocations not normally being predictable.
Re: Francois. Bad Object.
exactly, so by the nature of MMF it's impossible to narrow this bug down, it's like this is just a symptom of such a complex software.
Couldn't there possibly be a resource limiter added to MMF's event editor? I don't ever remember getting this object with very simple/small projects.
I'm thinking every day you load up your application to work on it, and random day nn at hour random 00:00 changing random object 000 to 999 you'll get a bad object, and this would be on day nn,nn,nnnn... [laugh]
Re: Francois. Bad Object.
If it's those bugs, they can normally be found by always setting a pointer to 0 after freeing it, and always doing bounds checks on array accesses.
Also, very specific repro steps can catch them. For example, loading via the menu vs loading by double-clicking the file can change memory allocations and can be the difference between finding and not hitting a memory trashing bug.
Fortunately event-driven applications (i.e. the app only does things in response to user input) are much easier to track memory trashing bugs down in than realtime applications (like games), where to reliably repro a bug you could have to get frame-perfect timing on doing something...
EDIT: I have experience in tracking these kind bugs down, especially the last kind. Can you tell?
Re: Francois. Bad Object.
Well, I can only contribute what I've seen of them. And OOJ I think you are correct that it is something with a combination of Create Object and "Built-in Movement" objects. I know for certain that in my last project I had bad objects in, the object that turned bad was a fireball with ball movement, the only non-static object in the game. And it occurred only when I would attempt to alter completely unrelated code involving "create object" on a different object- not even referencing the fireball once.
I've been unfortunately unable to repro too many of these bad object bugs, because I just don't use built in movements ever, so I haven't encountered a bad object in ages
Re: Francois. Bad Object.
Dynasoft & Pixel Thief, yes the funny thing is that also since it effects [makes bad objects for] objects unrelated to the area you work in - edit, it seems like the bad event just gets attached to "some" memory location, like the memory location of "AN" object, so it's like chaos theory.
Remember Jurrasic Park? When Ian said a butterfly flaps it's wings in central park and you get rain instead of Sun in China...
It seems like that kind of issue.
I'm in right field tweaking something, and then something goes haywire in left field.
Re: Francois. Bad Object.
Well the way I figure it, perhaps the object movements are implemented incorrectly in some way with the memory, and cause a memory conflict when the create object (properly) uses an overlapping segment. Which in turn would cause the object to corrupt.
That would explain why I have never seen it occur with either my multitude of "Create Object" events nor objects without built-in movements, only in those that have said movements.
Reminds me, I should talk to retriever about how the animation controls in lua work, because they're causing all sorts of hilarious array-out-of-bound problems if you don't check them carefully.