* CRITICAL ERROR * Game Crashing after few min.

Get help using Construct 2

Post » Sat May 20, 2017 1:32 am

This is the crash thing I got.

ANR Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 18. Wait queue head age: 5580.8ms.)

I have variables going up and at 1, 4, 7, 10, and 13 they each do random 1-5 wait 4 sec. random 1-5. For all of them. Could that be whats causing the game to lag and eventually crash?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sat May 20, 2017 9:42 am

Try adding a "Trigger once" condition when setting the variables. I suspect that the game is setting those variables each tick to random 1-5...
ImageImageImageImage
B
30
S
9
G
7
Posts: 244
Reputation: 5,600

Post » Sat May 20, 2017 1:42 pm

So Trigger once Variable = 1, random 1 - 5 wait 4 seconds random 1 -5 ? Could that also be why when the game is paused (timescale = 0) for awhile and unpaused (timescale = 1) the lag gets worse? Cause Timescale is supposed to stop Every 1 second. Every 1 second I add 1 to the Variable. That gets around the Every x seconds starts when the game starts. Cause at the start of the Layout the Variable is set back to 0.

I'll try that, thank you :) Trigger once Variable = 1, etc. thank you :)
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sat May 20, 2017 2:06 pm

@Phoenixbowman No problem, let me know if it doesn't work. =D
ImageImageImageImage
B
30
S
9
G
7
Posts: 244
Reputation: 5,600

Post » Sat May 20, 2017 2:47 pm

Can trigger once while true be put after variable = x and have the same effect? I put it before in, in the same event area

trigger once while true
variable = x

but it wasn't working. Nothing was being generated.

I switched it to

variable = x
trigger once while true

Will it have the same effect of only generating once and never every tick? I haven't tried it on the phone yet, but will putting trigger once while true after variable = x stop it from doing a random number every second?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun May 21, 2017 4:23 am

It's still lagging bad if its played for too long.

I tried

trigger once while true
variable = x

but it wouldn't run at all. Then I did

variable = x
trigger once while true

but it still lags :(
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun May 21, 2017 12:03 pm

Are you sure the variable are the ones causing the lag? I suggest running in debug move and in the event tab see what takes the most memory from the system.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Sun May 21, 2017 12:12 pm

This may be resolved much quicker by providing a .capx for us to investigate, rather than relying on guesswork.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,414
Reputation: 59,512

Post » Sun May 21, 2017 2:29 pm

I dont feel comfortable sending the .capx sorry. My friends and I are small group and it took us awhile to come up with this game, the characters, and graphics, sound, and music.

Everything is in the .capx. I'd rather not give out the .capx sorry. Also I've completey redone how the sprites made. I got rid of the Variables that make the sprites. Now I have invisible stationary sprites that when they collide with them, more sprties get made.

I'm trying something where sprites hitting stationary invisible sprites generate more sprites. I was looking at the debug but dont know how to read it.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Sun May 21, 2017 4:46 pm

Nope, it's still lagging, and now it lags sooner. I made it so now running into stationary sprites sets off a wait, after waiting x seconds it generates another sprite, etc. in a loop.

Could it be the movement? As simple as that? i have on touching R, L, U, D, simulate 8 directions. Could it be that? I have four arrow keys, for moving in four different directions.

For testing I have default controls are set to Yes. Could that be what's messing it up?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests