Openbor crashes without log

Toranks

Active member
There is an error that does not happen with the Build 4153 but yes with the latest release 6391 and the 4.0 alpha.
It's rare, but it's annoying because of randomness, besides leaving no trace in the log (only a Windows 7 "APPCRASH").

I have identified the origin, it is a script that is activated when an enemy grabs you, and that allows you to free yourself from it by mashing buttons.
The error occurs when many enemies try to grab you simultaneously or successively, but it doesn't happen always.

How can I identify the exact origin of the error? Is there any way to activate extra debug logs on Openbor?

(I don't know if this is the right section, sorry)
 
post your script so people could change your script into different script that would work better.
No info crash ( no shutdown and no log trace) happens also when animation frame is missing, i woyld prefere if engine would use frame none and output to log missing frame, why ? Cause i spent 3 hours looking everywhere else, i deleted frame by accident, it was a frame in type none entity, i used it for bg decoration.
 
It's not mine, so perhaps the problem may be in another function that is activated here and I does not know it.
I have reviewed the frames and none is missing, it is also a very rare error, if frame absence were the cause it would occur always a certain animation is activated.

Code:
name			grab1
type			obstacle

scroll			1
health			300
speed			0
nomove			1 1
facing			1
noquake			1
shadow			0
falldie			1
antigrab		10
offscreenkill 	        30000
subject_to_wall		0
subject_to_platform 	0
subject_to_obstacle 	0
subject_to_hole 	0
subject_to_gravity 	0
diesound        data/sounds/empty.wav
setlayer	999999998

lifebarstatus 150 20 0 1 0 2 5
lifeposition 120  240
nameposition -200 -200
nolife 1



script   @script
void main()
{
    	void self = getlocalvar("self");
	void attacker = getentityproperty(self,"parent");
   	void victim2 = getentityproperty(attacker, "opponent");
  	void victim = getentityproperty(victim2, "playerindex");
	int HP = getentityproperty(self,"health");
	int HPmax = getentityproperty(self,"maxhealth");

	int x1 = getentityproperty(attacker,"x");
	int z1 = getentityproperty(attacker,"z");

    	int escape = getentityvar(self, "grabgo"); //johnny madjon

	if(HP>=HPmax && escape == 1){
	changeentityproperty(victim2, "position", x1, z1);
     	performattack(victim2, openborconstant("ANI_FOLLOW15"));
    	setidle(attacker, openborconstant("ANI_IDLE"));
     	bindentity(victim2, NULL());
     	performattack(attacker, openborconstant("ANI_PAIN8"));
	setentityvar(self, "madjon", NULL());
	killentity(self);

	} else if(HP>=HPmax && escape == 2){
	changeentityproperty(victim2, "position", x1, z1);
     	performattack(victim2, openborconstant("ANI_FOLLOW16"));
    	setidle(attacker, openborconstant("ANI_IDLE"));
     	bindentity(victim2, NULL());
    	performattack(attacker, openborconstant("ANI_PAIN8"));
	setentityvar(self, "madjon", NULL());
	killentity(self);

      	} else if(playerkeys(victim, 2, "moveleft")){// Left is pressed?
    	changeentityproperty(self, "health", HP+1);
  	} else if(playerkeys(victim, 2, "moveup")){// Left is pressed?
    	changeentityproperty(self, "health", HP+1);
   	} else if(playerkeys(victim, 2, "movedown")){// Left is pressed?
    	changeentityproperty(self, "health", HP+1);
	} else if(playerkeys(victim, 2, "moveright")){// Right is pressed?
    	changeentityproperty(self, "health", HP+1);
	} else if(playerkeys(victim, 2, "attack")){// Right is pressed?
    	changeentityproperty(self, "health", HP+1);
	} else if(playerkeys(victim, 2, "jump")){// Right is pressed?
    	changeentityproperty(self, "health", HP+1);
	} else if(playerkeys(victim, 2, "special")){// Right is pressed?
    	changeentityproperty(self, "health", HP+2);
      	}
}
@end_script









anim	death
	loop	0
	delay	5
	offset	50 90
	bbox	0 0 0 0
	platform	1 1 1 1 1 1 1 1
	frame	data/chars/misc/grab/empty.gif
	frame	data/chars/misc/grab/empty.gif
		
anim	follow1
	loop	1
	delay	6
	offset	50 90
	bbox	0 0 0 0
	platform	1 1 1 1 1 1 1 1
	frame	data/chars/misc/grab/grab04.gif
	frame	data/chars/misc/grab/grab05.gif
	frame	data/chars/misc/grab/grab04.gif
	frame	data/chars/misc/grab/grab06.gif
		
anim	idle
	loop	0
	delay	15
	offset	90 90
	bbox	0 0 0 0
	platform	1 1 1 1 1 1 1 1
	frame	data/chars/misc/grab/grab00.gif
	frame	data/chars/misc/grab/grab01.gif
	frame	data/chars/misc/grab/grab02.gif
	frame	data/chars/misc/grab/grab03.gif
	frame	data/chars/misc/grab/grab02.gif
	frame     data/chars/misc/grab/grab01.gif #4
	frame	data/chars/misc/grab/grab02.gif
	frame	data/chars/misc/grab/grab03.gif
	frame	data/chars/misc/grab/grab02.gif
	frame	data/chars/misc/grab/grab01.gif
	frame	data/chars/misc/grab/grab02.gif
	frame	data/chars/misc/grab/grab03.gif
	frame	data/chars/misc/grab/grab00.gif
	frame     data/chars/misc/grab/empty.gif #12
		
anim	spawn
@script
	void self = getlocalvar("self");
	void atk = getentityproperty(self,"parent");
  	void vtm = getentityproperty(atk, "opponent");
    	changeentityproperty(self, "health",-5);

	if(getentityproperty(vtm, "type")==openborconstant("TYPE_NPC"))
	{
	killentity(self);
	}
	@end_script	
	loop	0
	delay	5
	offset	50 90
	bbox	0 0 0 0
	platform	1 1 1 1 1 1 1 1
	frame	data/chars/misc/grab/empty.gif
	frame	data/chars/misc/grab/empty.gif
	frame	data/chars/misc/grab/empty.gif
	frame	data/chars/misc/grab/empty.gif
		
#|edited by openBor Stats v 0.53
 
bWWd, if you can type up something very specific describing what happens I might be able to add some enhanced logging.

There's no really viable way to log missing frames, because frames as you think of them don't actually exist. In OpenBOR, an entity has an array of animations. Logically you'd think each animation has an array of frames, and it would look like this:

entity->animation[animation_number]->frames[frame_number]-><some frame property>


...but it doesn't work that way at all. Instead, animation properties that need to work on frame basis (like the sprite image), are each their own array. So it actually looks like this:


entity->animation[animation_number]-><some property>[frame_number]


Sounds crazy at first, but it saves an unbelievable amount of memory. The point is, there's really no such thing as a frame, so there's really nothing there we can debug. But if I know your situation, I might be able to write something that can catch the problem a different way and log it.

DC
 
For these crashes I use the normal debug mode, which shows you the invisible entities, so I can identify which one and when it crash
 
Toranks, I noticed something in grab1.txt you quoted above. It starts as an obstacle, however it changed type into NPC. This could be the source of the problem cause obstacles don't need certain animations such as PAIN while NPCs do need those

grab1.txt doesn't have PAIN and also doesn't have anything to prevent it from playing PAIN

That's my thought on the cause of crash without log for now, i.e missing PAIN animation
 
Thank you, I will try that. That error has not happened to me again, it only happened to me twice. If with the pain animation works well, I will leave it that way just in case.
 
Damon Caskey said:
bWWd, if you can type up something very specific describing what happens I might be able to add some enhanced logging.

There's no really viable way to log missing frames, because frames as you think of them don't actually exist. In OpenBOR, an entity has an array of animations. Logically you'd think each animation has an array of frames, and it would look like this:

entity->animation[animation_number]->frames[frame_number]-><some frame property>


...but it doesn't work that way at all. Instead, animation properties that need to work on frame basis (like the sprite image), are each their own array. So it actually looks like this:


entity->animation[animation_number]-><some property>[frame_number]


Sounds crazy at first, but it saves an unbelievable amount of memory. The point is, there's really no such thing as a frame, so there's really nothing there we can debug. But if I know your situation, I might be able to write something that can catch the problem a different way and log it.

DC
I think its not worth to add additional checks just to catch missing frames after eveyrthing was already loaded, i removed some unused stuff and some important stuff was also deleted, so i kept having shutdowns with no log info about missing frame, i brought back folder with frames and it was all ok again.
The issue is searching for the cause , crash and no info is a bit nasty problem to have unless you remember what you did between game working and game not working.

  Anyway, i will derail a bit and ask is there any way to have multiple obstacles to create mario like levels ? Or something to create stage from blocks kinda like tiles  that could block characters movement and not drain so much memory to slow the game down ? After awhile game starts to slowdown on android devices with so many obstacle entities, like labirynth stage for he-man.Heres text file for stage and obstacle entity:
Code:
# File modified by Level Editor on 2010-08-04
# File modified by Level Editor on 2010-08-04



music		data/music/m18.bor


background	data/bgs/labir.gif

panel		data/bgs/labir.gif



#fglayer data/bgs/fogl.gif 1 0 1 0 -80 0 0 -1 1 1 1

#fglayer data/bgs/fogub.gif 1 1 1 -100 -150 0 0 -1 1 1 1






order           AAA
spawn1  100  410
spawn2  200  410
spawn3  300  410
spawn4  400  410
nohit   1
 settime  30

direction both
gravity  -25
maxfallspeed -150
maxtossspeed  1000
scrollspeed 4
cameratype  1
cameraoffset 0  -120
type  1 2







light -800 -60
at  0


shadowcolor 70_70_50
at  0
shadowalpha  4
at  0


spawn  laws
	coords  344  1325  0
	at  0
spawn  law
	coords  899  780  0
	at  0
spawn  law
	coords  2706  780  0
	at  0
spawn  law
	coords  3393  780  0
	at  0
spawn  law
	coords  1743  180  0
	at  0
spawn  law
	coords  3322  660  0
	at  0

spawn  law
	coords  3827  540  0
	at  0
spawn  laws
	coords  2834  724  0
	at  0
spawn  laws
	coords  3150  1088  0
	at  0
spawn  law
	coords  2568  1140  0
	at  0
spawn  law
	coords  2869  1500  0
	at  0
spawn  law
	coords  3320  1500  0
	at  0
spawn  laws
	coords  2077  1577  0
	at  0
spawn  law
	coords  2242  1500  0
	at  0
spawn  law
	coords  3686  1380  0
	at  0
spawn  law
	coords  1275  1140  0
	at  0
spawn  laws
	coords  3225  483  0
	at  0
spawn  law
	coords  3053  420  0
	at  0
spawn  law
	coords  1152  1500  0
	at  0
spawn  law
	coords  22  1500  0
	at  0
spawn  law
	coords  2992  1380  0
	at  0
spawn  law
	coords  3320  1260  0
	at  0
spawn  law
	coords  2870  1260  0
	at  0
spawn  law
	coords  641  1140  0
	at  0
spawn  law
	coords  190  1140  0
	at  0
spawn  law
	coords  3355  1020  0
	at  0
spawn  law
	coords  2453  1020  0
	at  0
spawn  law
	coords  887  1020  0
	at  0


spawn  laws
	coords  1043  842  0
	at  0


spawn  law
	coords  433  1020  0
	at  0
spawn  law
	coords  201  900  0
	at  0
spawn  law
	coords  2026  900  0
	at  0
spawn  law
	coords  2473  900  0
	at  0
spawn  law
	coords  206  660  0
	at  0
spawn  law
	coords  865  420  0
	at  0
spawn  law
	coords  1314  660  0
	at  0
spawn  law
	coords  3217  540  0
	at  0
spawn  law
	coords  518  540  0
	at  0
spawn  law
	coords  3252  180  0
	at  0
spawn  law
	coords  1966  420  0
	at  0
spawn  law
	coords  -1  300  0
	at  0
spawn  law
	coords  454  300  0
	at  0
spawn  law
	coords  906  300  0
	at  0
spawn  law
	coords  2267  300  0
	at  0
spawn  law
	coords  2720  300  0
	at  0
spawn  law
	coords  1590  300  0
	at  0
spawn  law
	coords  2420  420  0
	at  0
spawn  law
	coords  2798  180  0
	at  0
spawn  law
	coords  3710  180  0
	at  0
spawn  law
	coords  972  540  0
	at  0
spawn  law
	coords  1631  540  0
	at  0
spawn  law
	coords  2086  540  0
	at  0
spawn  law
	coords  2760  540  0
	at  0
spawn  law
	coords  67  540  0
	at  0
spawn  law
	coords  859  660  0
	at  0
spawn  law
	coords  1768  660  0
	at  0
spawn  law
	coords  2222  660  0
	at  0
spawn  law
	coords  2673  660  0
	at  0
spawn  law
	coords  412  420  0
	at  0
spawn  law
	coords  1317  420  0
	at  0
spawn  laws
	coords  1480  485  0
	at  0
spawn  law
	coords  1580  900  0
	at  0
spawn  law
	coords  913  900  0
	at  0
spawn  law
	coords  1340  1020  0
	at  0
spawn  law
	coords  1794  1020  0
	at  0
spawn  law
	coords  2904  1020  0
	at  0
spawn  law
	coords  499  1380  0
	at  0
spawn  law
	coords  391  1260  0
	at  0
spawn  law
	coords  844  1260  0
	at  0
spawn  law
	coords  1974  1260  0
	at  0
spawn  law
	coords  2421  1260  0
	at  0
spawn  law
	coords  953  1380  0
	at  0
spawn  law
	coords  1408  1380  0
	at  0
spawn  law
	coords  2087  1380  0
	at  0
spawn  law
	coords  2539  1380  0
	at  0
spawn  laws
	coords  1989  843 0
	at  0
spawn  law
	coords  1524  1260  0
	at  0
spawn  law
	coords  1926  1140  0
	at  0
spawn  laws
	coords  1872  1083  0
	at  0
spawn  law
	coords  1603  1500  0
	at  0
spawn  law
	coords  3018  1140  0
	at  0
spawn  law
	coords  3648  1140  0
	at  0
spawn  law
	coords  2921  900  0
	at  0
spawn  laws
	coords  3424  604  0
	at  0
spawn  law
	coords  3613  300  0
	at  0
spawn  law
	coords  2196  180  0
	at  0
spawn  laws
	coords  2110  244  0
	at  0
spawn  law
	coords  1097  180  0
	at  0
spawn  law
	coords  647  180  0
	at  0
spawn  law
	coords  2254  780  0
	at  0
spawn  law
	coords  1805  780  0
	at  0
spawn  law
	coords  1352  780  0
	at  0
spawn  law
	coords  445  780  0
	at  0
spawn  law
	coords  3838  900  0
	at  0
spawn  laws
	coords  3166  1207  0
	at  0
spawn  laws
	coords  3127  1324  0
	at  0
spawn  laws
	coords  1572  1444  0
	at  0
spawn  laws
	coords  1535  1326  0
	at  0
spawn  law
	coords  3713  420  0
	at  0
spawn  laws
	coords  507  123  0
	at  0
spawn  laws
	coords  1067  367  0
	at  0
spawn  laws
	coords  1713  244 0
	at  0
spawn  laws
	coords  2895  364  0
	at  0
spawn  laws
	coords  3403  898  0
	at  0
spawn  laws
	coords  3161  1442  0
	at  0
spawn  law
	coords  699  1500  0
	at  0

spawn  laws
	coords  710  605  0
	at  0
spawn  laws
	coords  2097  1200  0
	at  0



spawn  laws
	coords  3404  966  0
	at  0
spawn  laws
	coords  3404  835  0
	at  0
spawn  laws
	coords  3510  725  0
	at  0
spawn  laws
	coords  2370  370  0
	at  0
spawn  laws
	coords  2223  485  0
	at  0





spawn  sbox
@script void main() {
  	   changeentityproperty(getlocalvar("self"), "type", openborconstant("TYPE_ENEMY"));
   changeentityproperty(getlocalvar("self"), "animation", openborconstant("ANI_ATTACK4"));

} @end_script
        map 1
        alias labir
	coords  260  220  0
	at  0




spawn  shad
	health  250
	coords  382  1573  0
	at  0

spawn  shad
	health  250
	coords  1760  865  0
	at  0

spawn  shad
health  250
	coords  3404  374  0
	at  0


spawn  shad
health  250
	coords  965  1088  0
	at  0


spawn  shad
health  250
	coords  3300  1564  0
	at  0

And entity :
Code:
name law
type obstacle
shadow	0
nolife  1
offscreenkill  99999
subject_to_gravity  0







anim	attack1
	loop	1
	delay	50
	offset	82 152
	bbox	1 -137 172 312
		platform  47  189  -45  -45  99  99  62  342
	frame	data/sprites/lawb.gif

anim	idle
	loop	1
	delay	50
	offset	232 151
	bbox	5 -156 460 327
		platform  106  183  -117  -117  367  364  60  342
	frame	data/sprites/law.gif

anim	spawn
				@script
                void self = getlocalvar("self");
          int HP = getentityproperty(self,"health");
		if ( HP == 2 ){
   changeentityproperty(self, "animation", openborconstant("ANI_ATTACK1"));
		}
	@end_script	
	loop	0
	delay	2
	offset	232 151
	bbox	5 -156 460 324
	frame	data/sprites/law.gif
	frame	data/sprites/law.gif

As You see, entity is not complicated but it does drain resources, it would be nice to be able to have those simple one frame /tile like entities without consuming so much cpu cycles.
OR maybe there is completely different way to create this kind of labirynth level with walls that can block you from passing through them.
 
I think I found a possible cause! What bWWd told gave me an idea to look for
All fall7 animations on all characters are linked to a script grab system, and this related to the escape script. In all the main characters the fall animation look like this:

Code:
anim	fall7
	delay	1000
	offset	45 95
	bbox	0 0 0 0
	frame	data/chars/1ryo/slam0.gif
	offset	45 95
	frame	data/chars/1ryo/slam1.gif
	offset	50 85
	frame	data/chars/1ryo/slam2.gif
	offset	45 95
	frame	data/chars/1ryo/slam3.gif
	offset	45 95
	frame	data/chars/1ryo/slam4.gif
	offset	75 55
	frame	data/chars/1ryo/slam5.gif
	offset	40 80
	frame	data/chars/1ryo/slam6.gif
	offset	20 90
	frame	data/chars/1ryo/slam7.gif
	offset	65 55
	frame	data/chars/1ryo/slam8.gif
	offset	65 83
	frame	data/chars/1ryo/slam9.gif
	offset	65 83
	frame	data/chars/1ryo/slam10.gif
	offset	20 90
	frame	data/chars/1ryo/slam11.gif
	offset	75 55
	frame	data/chars/1ryo/slam12.gif
	offset	75 55
	frame	data/chars/1ryo/slam13.gif
	offset	50 85
	frame	data/chars/1ryo/slam14.gif
	offset	45 95
	frame	data/chars/1ryo/slam15b.gif
	offset	55 70
	frame	data/chars/1ryo/slam16.gif
	offset	65 83
	frame	data/chars/1ryo/slam17.gif
	offset	65 83
	frame	data/chars/1ryo/slam18.gif
	offset	45 95
	frame	data/chars/1ryo/slam19.gif
	offset	45 95
	frame	data/chars/1ryo/slam20.gif
	offset	45 95
	frame	data/chars/1ryo/slam21.gif
	offset	45 95
	frame	data/chars/1ryo/slam22.gif
	offset	59 85
	frame	data/chars/1ryo/slam15b.gif
	offset	59 80
	frame	data/chars/1ryo/slam24.gif
	offset	45 95
	bbox	25 10 60 80
	frame	data/chars/1ryo/slambbox1.gif
	bbox	0 0 0 0

Do you see that bbox 0 0 0 0 without frame below? Maybe when animation reach this frame is when openbor can't find the frame and crash?
I've erased them all to see if it doesn't happen again.
 
Back
Top Bottom