ERR_INSUFFICIENT_RESOURCES when previewing in Chrome

0 favourites
  • 10 posts
From the Asset Store
Check preview, download and add value to your games.
  • Problem Description

    Hi guys

    I'm encounting a crash due to resource issues when previewing my game in Chrome. I have thousands of frames of images all up in maybe a hundred sprites.

    I'm not sure if it's a bug with the way requests are sent via Chrome or not, so apologies if this is in the wrong part of the forum.

    In order to test the issue, I've created a blank layout with no events. I created a single sprite and have loaded a random picture into the frames via the sprite strip import as a quick and easy way of creating lots of individual images. I've created 10k frames for this test in case it's a system specific resources issue - my current game throws up the error when there are approx. 5500 images being loaded.

    When previewing, I receive a red loading percentage - viewing the console I can see the following errors thrown:

    GET http://localhost:50000/sprite-default-6238.png net::ERR_INSUFFICIENT_RESOURCES

    This repeats for every image onwards up to 10,000.

    I then get the following error reported:

    Error loading image 'http://localhost:50000/sprite-default-6238.png': Event {clipboardData: undefined, path: NodeList[1], cancelBubble: false, returnValue: true, srcElement: img…}

    This also repeats for every image onwards up to 10,000.

    After doing a lot of research and troubleshooting, I came across another post on the bug forum with a similar issue that was closed due to not being able to replicate the issue:

    r178-game-crash-in-preview_t112992?start=3 (The same error is reported in the Chrome console in that post)

    Researching the Chrome specific error came up with the following 'bug fix' made to Chromium:

    https://codereview.chromium.org/18541

    [quote:2zkdt5ks]Add a constraint on how many requests can be outstanding for any given render process (browser-side).

    Once the constraint is reached, subsequent requests will fail with net::ERR_INSUFFICIENT_RESOURCES.

    The bound is defined as "25 MB", which represents the amount of private bytes we expect the pending requests to consume in the browser. This number translates into around 6000 typical requests.

    Note that the upload data of a request is not currently considered part of the request's in-memory cost -- more data is needed on the average/maximum upload sizes of users before deciding what a compatible limit is.

    Here's another link discussing the issue:

    https://code.google.com/p/chromium/issu ... il?id=5688

    I don't know if this is a bug with the way that Construct 2 compiles the page requests, hence why I thought it might fit into the bug reporting forums. I'm hoping it's possible to work around this limit somehow, or whether this is a hard coded limit that cannot be worked around within Construct 2 code.

    Thanks

    Chris

    Attach a Capx

    https://dl.dropboxusercontent.com/u/143 ... Issue.capx

    Description of Capx

    Sample file with 10,000 frames loaded into 1 sprite, no events.

    Steps to Reproduce Bug

    • Step 1: Load capx with latest version of Construct 2.
    • Step 2: Preview in Chrome.
    • Step 3: View console.

    Observed Result

    Error messages preventing preview from loading.

    Expected Result

    Game loads successfully without errors.

    Affected Browsers

    • Chrome: YES - v38.0.2125.104 m (64-bit)
    • FireFox: NO
    • Internet Explorer: NO

    Operating System and Service Pack

    Windows 7 Professional SP1 x64

    Construct 2 Version ID

    Latest stable: v184 (Built 15:42:21 on Oct 9 2014)

  • Closing as won't fix. People occasionally report this but I just cannot believe how you could possibly genuinely need so many thousands of images in one project. You must be doing something wrong or appallingly inefficient! Can you explain a bit more about why you need this and why there really is no other alternative than to have thousands of images?

    I have no idea how we could work around this, even if Chrome was fixed then Windows has a hard-coded limit of about 10,000 images per app, and indeed if you try to edit the animations of the sprite in C2 then it starts throwing up errors about being unable to create icons (since there's no more space for new images). This is a limit in the Windows OS itself, not Construct 2. I don't know what could be done about this; the obvious solution seems to be - use less images!

  • Same issue here. The reason we have so many images is because there is no way to hue swap sprites without using webGL HSL effect. This is an issue since the Wii U can't do webgl effects and we need customizable colors for lots of things since our game is all about personalization. Is it possible to add hue swap as an option to canvas 2d? or is that just not possible with canvas 2d?

  • suntank , you might be able to use the Canvas plugin by r0j0hound to change the pixel data of a sprite, but I haven't tried it so I'm not entirely sure. You would probably have to paste the object to the canvas, edit the pixel data, then use the getimageurl and load that into the sprite frame.

    I don't know how efficient it would be, since editing pixel data can be slow, but it might be a workaround depending upon the situation.

  • Prominent, I had considered this possibility as we are making quite heavy use of the Canvas plugin by r0j0hound. Quite an impressive plugin since you can use it to retrieve and store image information in the form of text files or send them across the network using the multiplayer object as we do for player profile avatars. (of course you'll need a system to break it down and rebuild it since the image information will be far to big for one message).

    To edit this information however isn't quite as straight forward as one would hope. It would require knowing in advance the different shades of say, yellow, you wanted to replace the same shades of Red with. I did create a scanner type system that could read the pixel information from the canvas object and do various operations based on that information. maybe I could try using some sort of realtime reader that can make adjustments to specific pixels while leaving others intact since our pallete doesn't change too much. I might experiment with this idea. Good call

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm gonna necro this...

    Was this ever fixed or is there a workaround?

    We're making a game where we have hundreds of little customer characters (it's a tycoon game) and each one has two or three 16 frame animations.

    Other than massively sacrificing animation quality or customer variation, I don't see how I can shred images from the engine.

    Help?

  • Also, it works fine when exported!

  • I figured out a workaround using the mirror behavior. In retrospect it's more efficient anyway.

  • I figured out a workaround using the mirror behavior. In retrospect it's more efficient anyway.

    Hi, can you share the solution?

  • Essentially I was doing something inefficient and replaced all of my left facing sprites with - on facing left -> mirror.

    This cut the sprites per NPC in 1/2 which is great.

    On the other hand, I still run into this issue constantly.

    Firefox doesn't run into the issue, nor does edge, nor does the exported build. Seems like, for me at least, it's Chrome specific.

    Hope that helps!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)