Loading problem on Mobile [Android]

Discussion and feedback on Construct 2

Post » Thu Sep 21, 2017 5:07 pm

Finally I was able to debug my phone using chrome. Problem is with loading sprites:

l13e2_12fps-sheet0.png Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES:

Error loading image 'file:///android_asset/www/images/l13e2_12fps-sheet0.png': Event {isTrusted: true, type: "error", target: img, currentTarget: img, eventPhase: 2, …}bubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: nulldefaultPrevented: falseeventPhase: 0isTrusted: truepath: [img]returnValue: truesrcElement: nulltarget: nulltimeStamp: 6911.925000000001type: "error"__proto__: Event
c.onerror @ c2runtime.js:114
B
9
S
2
G
1
Posts: 53
Reputation: 748

Post » Mon Sep 25, 2017 6:47 pm

All resources are loaded at the beginning. In memory it takes 600MB+ and this is the problem. I thought that resources are loaded before each layout and release after exit from layout. How does it works ? There is any option to optimize loading ?
B
9
S
2
G
1
Posts: 53
Reputation: 748

Post » Wed Oct 04, 2017 8:14 am

I've tested on new Xiaomi MI6 with 6 GB RAM with a lot of free memory and still problem is the same Failed to load resource: net::ERR_INSUFFICIENT_RESOURCES.
Do you have any idea how I can resolve this problem ?
B
9
S
2
G
1
Posts: 53
Reputation: 748

Post » Sun Oct 08, 2017 8:27 pm

Maybe related:

https://codereview.chromium.org/18541

Basically saying not to send so many requests at once, along with some 25mb 'limit' I have seen mentioned.

EDIT: looks like a wont fix:

err-insufficient-resources-when-previewing-in-chrome_t118122

:(

P.S: I had a similar issue on a scratch emulator project I was working on, and I ended up having to convert stuff using b64toBlob type functions and ajax requests that waited until that requests onload had completed.

It maybe possible but would mean messing with the way the loader works...
B
9
S
4
Posts: 25
Reputation: 727

Post » Tue Oct 17, 2017 6:54 pm

So this is the reason. Probably only global solution is introduce delay in loader. On mobile probably loader works to fast and try load too many resources in the same time. In browser net connection is delay but for other hand it works when graphics is loaded from cache.
B
9
S
2
G
1
Posts: 53
Reputation: 748

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests