Ashley's Forum Posts

  • Paste should be allowed by the browser if you have copied something previously. What did the error message say exactly?

  • Ah, so it's only specific themes? That's what I was missing. I can reproduce now and should be fixed in the next build. This is pretty unusual, I'd say 95% of the time that would have been a graphics driver crash

  • Nepeo is the developer who made the IAP plugin, best to tag them instead.

  • I'm not sure there's much we can do - it affects all software system-wide, and seems to have slowed down some key parts of Windows. The best we can do is simply bypass those parts, and we've done that for the key event sheet dialogs when you set the icon mode to "Don't show unique icons". Also some users are questioning whether it's actually do to with the meltdown/spectre patches. It might not be, but I don't know of any other patches that have had headline-grabbing performance regressions lately. I guess it could be a dodgy graphics driver update or something else that coincides with it.

    • Post link icon

    Well, it at least means it's not due to a Construct 2 update, and nobody else noticed it until late 2017, so again it points towards some kind of Windows Update.

  • What is the exact error message you get? It's hard to help without more information. Tagging Nepeo

  • These are all fixed now. (I helped fix a few myself.) Thanks, we'll be shipping it as an incomplete translation in the next release.

    • Post link icon

    How come the same Windows API that creates icons works fast after reboot and becomes extremely slow an hour later after C2 application was launched a hundred times?

    I've no idea. Maybe it's a memory leak in Windows or something. It could be antivirus or Windows Defender or some other tool on the system interfering.

    [quote:3nrgmglq]So here is an uneducated speculation - maybe all these icons from every C2 session are cached or indexed or something like that, and this cache/index never gets reset?

    AFAIK that's impossible. The operating system forcibly removes all the processes' memory when the app is closed. There is no way to keep any behind, so there is no way a cache could be left behind either.

    As for the meltdown/spectre patches, AFAIK there are actually a number of patches going out, including microcode updates for CPUs. (I'm not sure if those can even be uninstalled!) It may be that it's a different patch that is responsible, but it's pretty rare that any OS update has any noticable negative performance impact, and it seems everyone suddenly started noticing a slowdown around the time the whole meltdown/spectre thing was being reported, so it does seem to line up pretty well.

    Anyway, even if it's a different patch, and we eventually figure out which one it is exactly... there still might not be anything we can do. We could rearchitect the whole icon engine to asynchronously create icons in the background or something, but that is a massive amount of work, likely comes with a slew of nasty cache invalidation or race condition bugs, and we simply don't have the resources for it. Meanwhile you can just use "Don't show unique icons" which appears to entirely bypass the issue. So, sorry folks, not sure we're going to be able to do anything on this one.

    For the record, this is categorically an issue with Windows. Unless the dialog still takes a long time to appear with "Don't show unique icons", then any delay is entirely in Windows, and there is no question about whether it's in C2. I also can't resist pointing out the great irony that people accuse us of depending on third parties too much with HTML5, but you can't get away from third parties on native either!

    • Post link icon

    If C2 versions as old as r239 (which came out late 2016) are still affected, but you only noticed in the last 30 days or so, this does make it look like a Windows Update is behind this as well. I suspect it's the same issue as in the other thread. Maybe it's a different update to the one you disabled.

  • Can't reproduce here with provided project.

    In the past, any crash at the point a layout is opened has always been a graphics driver crash, because that's the point we create an OpenGL context to display the layout and that's where buggy drivers crash. So on that basis I believe this is a graphics driver issue.

    • Post link icon

    r246 was definitely affected. Probably r244 too, but I don't remember for sure.

    Can you install the old versions and check? This is essential diagnostic information.

    • Post link icon

    The fact you say it is faster when "Don't show unique icons" is set proves that it is in Windows. In this mode, we bypass the code that asks Windows to create icons. We can't ask Windows to do it any quicker. If a dialog is slow to open even with just a few objects, and it's faster with "Don't show unique icons", Windows is somehow being really slow even just to add a few icons. I cannot think of anything we can reasonably do about this, but fortunately we have already implemented the workaround, which is the "Don't show unique icons" mode.

    The other thread was mainly about (or at least became about) the fact a recent Windows update appeared to slow down the dialogs even with "Don't show unique icons" mode selected. The ultimate resolution was to update that mode to bypass Windows even more. The fix doesn't work for other icon modes, since every icon is different, so we really have to make a call for every icon.

    Identifying the Windows Update that causes this would be interesting, but even knowing exactly which one causes it doesn't necessarily mean we'll be able to do anything about it. Personally I suspect it's the Meltdown/Spectre patches - the timing and performance impact all line up. I guess it could be something else though, but I haven't seen any other headline-grabbing performance-reducing patches recently...

  • Construct 2 does not keep an error log. Even if it did, it might not include any information about the problem, and even then if it did, it might not be enough information to allow us to actually fix anything. To actually be able to fix bugs, we need all the information required in the bug report guidelines, the most important being reliable steps to follow to reproduce the issue. We may need to follow the steps to reproduce a dozen or more times before we even understand the problem, so without these, it's almost impossible to make any progress.

    FWIW when you save a project, Construct 2 takes the following steps, specifically to try to avoid issues like this. Suppose you're saving to project.capx. It never writes directly to the file. Instead:

    1. It writes all files to a temporary folder

    2. Assuming that was successful, it then compresses it all to a zip (capx files are just renamed zips), to a file named project.capx.tmp.

    3. Notice at this point, it still hasn't touched project.capx at all, and only continues if everything so far has been successful. Now it deletes project.capx, and renames project.capx.tmp to project.capx. This basically swaps the old file for a new fully-saved one.

    There are several types of problems this avoids:

    • if writing files to a temporary folder fails, project.capx is untouched.
    • if compressing a zip fails, project.capx is untouched.
    • if deleting project.capx fails, it's left behind.
    • if deleting project.capx succeeds but renaming project.capx.tmp fails, you should still have a valid project file at project.capx.tmp which you can rename and use.

    The only case I can think of that actually completely erases the project is if renaming project.capx.tmp fails and somehow deletes the file, which is a catastrophic OS/file system/hardware failure. These types of errors can happen on any device, and this is why you need to have a good backup strategy for any kind of digital work you do.

    BTW even if you save a project folder, each individual file in the project goes through the same process as above. It's designed so there is as little scope as possible for any work-destroying bugs. But they can still happen due to factors outside our control.

    • Post link icon

    Is this new in r252 or were old versions affected? If old versions are affected, at which release did it start exhibiting a problem?

    Otherwise when exactly did you first notice this occurring?

    I've no idea what could be causing this though - I don't even know what type of problem could cause the same app to be slower to launch after completely closing it. It should be starting from a blank slate every time. Additionally any problem that takes more than 30 seconds to demonstrate, let alone an hour, is extremely time consuming to even investigate let alone solve. A typical bug report might involve me trying 20-30 different things; for an instant repro, this is a few minute's work, but for an issue like this, it could take weeks. So I'm afraid this may be a long-term project to investigate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
    • Post link icon

    Setting "Icon Mode=Don't show unique icons" removes the lag completely.

    Then I'm not sure we can do anything about this. That mode is designed to avoid Windows-related icon issues such as this one. If you want unique icons and you have thousands of objects in your project, then when the dialog is opened it has to add thousands of icons to the dialog, and that is what makes it take a long time to open. (The calls are all entirely Windows API functions, so it spends the entire time in Windows code which we don't control.) Basically we already invented the "Don't show unique icons" mode to work around this.