Preview delay: Black screen, 'Page Unresponsive' before load

Get help using Construct 2

Post » Sat Oct 01, 2016 7:11 am

I get a black screen and a Chrome 'Page Unresponsive' message for a few minutes before the preview correctly continues to the loading screen and finally the preview itself. Right now the delay mainly poses an issue to my patience and work efficiency, but it may represent a bigger issue down the line. Although my project is big, I try to keep it trimmed to only what I need, and with minimal image resolution. The 'Approx. download' states 112.8 mb, and memory use states 320.9 mb, and total events states ~2700. I certainly worked with much larger projects before, but without ever previously having this black screen delay. Has anyone heard of a specific cause or setting that can cause it?

Update: Thankfully I found the problem! I tried a test of saving the project as a new temporary one so I don't mess things up by accident, then I deleted some things one at a time and ran preview til I found the culprit, which was easy because I started by deleting the largest folder of images I had from the use of Spriter, and that was the cause. More specifically, it's when I use that SCML object in a large layout. So instead I use the new self-drawing method of the SCML plugin, which doesn't require hundreds of image objects, and it runs! The self-drawing method has issues of its own, but I'm currently trying to get help for that from Spriter. Thanks!
Last edited by Team EternaL on Wed Oct 05, 2016 4:17 am, edited 1 time in total.
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Mon Oct 03, 2016 5:35 am

Wild guess here, but you may be stuck in a loop. I've had similar things happen before when using "while" loops incorrectly, but I think I usually get the option to "stop unresponsive script," though I usually test in Firefox. I'd look at any loops you may be running as a potential cause.

Have you tried loading in other browsers?
B
25
S
11
G
4
Posts: 30
Reputation: 3,917

Post » Mon Oct 03, 2016 11:47 am

jasmattkrz wrote:Wild guess here, but you may be stuck in a loop. I've had similar things happen before when using "while" loops incorrectly, but I think I usually get the option to "stop unresponsive script," though I usually test in Firefox. I'd look at any loops you may be running as a potential cause.

Have you tried loading in other browsers?

It looks to me that I may not currently be using any Loops events anywhere. I did test in Firefox just now, and got the "Stop unresponsive script" error that you got before, and also got an option to Debug that I didn't get in Chrome, so I clicked it, and it gave me this:
https://www.dropbox.com/s/n44plhgo5jfyk2t/error0.jpg
Is any info there useful for finding out the cause?
Thank you
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Tue Oct 04, 2016 5:15 pm

If Firefox is indeed pointing you in the direction of the unresponsive script, then it looks like something you're pushing into an array. It's possible that that you're pushing a lot more data into the array than you intend. Or I could be completely wrong, as I am not what you would call a "power user" ; )

Unfortunately, you have a huge project with 2700 events. Personally, I test regularly so I can see if a new feature works or not, and I save many versions so that I can go back to a the most recent functional version in a case like this. Ideally, you would have been running the game and testing it as you developed, so you would have seen the moment where the game went from running correctly to running an unresponsive script. Of course that's not very helpful now.

Something you can do is start disabling blocks of your code to see if you can stop running the script that is causing the issue. Test and repeat until you find it.

Or you could ask for help again and publish the capx for others to look through.

There may be a more technical way to find what the problem is, but I don't know it.
B
25
S
11
G
4
Posts: 30
Reputation: 3,917

Post » Wed Oct 05, 2016 4:17 am

Thankfully I found the problem! I tried a test of saving the project as a new temporary one so I don't mess things up by accident, then I deleted some things one at a time and ran preview til I found the culprit, which was easy because I started by deleting the largest folder of images I had from the use of Spriter, and that was the cause. More specifically, it's when I use that SCML object in a large layout. So instead I use the new self-drawing method of the SCML plugin, which doesn't require hundreds of image objects, and it runs! The self-drawing method has issues of its own, but I'm currently trying to get help for that from Spriter. Thanks!
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Wed Oct 05, 2016 7:07 pm

Working from a backup was a great idea, glad it worked!

I am using the SCML plugin in my current project, but hadn't heard of the direct draw feature (which is supposed to improve performance). This is the most recent info I could find on it viewtopic.php?f=146&t=75748&p=1040600#p1040600 I'm going to read up on it later, but if you have more current information please share!

Once again, glad this worked out for you!
B
25
S
11
G
4
Posts: 30
Reputation: 3,917


Return to How do I....?

Who is online

Users browsing this forum: Blendi1223, Jackriduk, Username05 and 22 guests