Check failures: Failed to create HICON & Object texture leak

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • (I apologize for my previous incorrect bug report posting - Please forgive any possible slights in this one as well, due in part to a lack of sleep! - Thank you for your patience.)

    Problem Description

    With enough objects in a C2 project, any of these two check failure errors come up, and you must abort program, even with icon caching unchecked in preferences, using the latest version of C2: beta r226.

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Failed to create HICON

    Condition: icon32 != NULL

    File: Projects\ObjectTexture.cpp

    Line: 696

    Function: struct HICON__ *__cdecl ObjectTexture::GetHICON32(bool &)

    Build: release 226 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort Retry Ignore

    ---------------------------

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Object texture leak: a texture is still loaded when cleaning up an ObjectTexture, check all textures released properly

    Condition: gl_instances.empty()

    File: Projects\ObjectTexture.cpp

    Line: 33

    Function: __cdecl ObjectTexture::~ObjectTexture(void)

    Build: release 226 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort Retry Ignore

    ---------------------------

    Attach a Capx

    dropbox.com/s/699w3flgu0ug862/C2Help.capx

    Fresh new bare-minimum capx created just for this report. Needless to say, the amount of objects therein are essential to this report. This includes any and all duplicate images existing in separate folders. They are intended and essential to the project.

    Description of Capx

    A bare-minimum capx of thousands of objects. Primarily png images. Meant for a game/app.

    Steps to Reproduce Bug

    • Have thousands of objects in C2.
    • Attempt to work with the project in any way, such as what I happened to be doing before the latest and unexpected error: Simply adjusting the UI spacing of the actual C2 program's event sheet UI.

    Observed Result

    Check failure, and need to abort C2.

    Expected Result

    Would like it to work without check failure error. Need to be able to work with project. My guess is that the total amount of objects does not reach 10000 objects, which could cause the Windows OS 10000 object limit. In the unlikely case of such a limit reached, please advise on possible workarounds. For example:

    A way to have a single game/app be comprised of two different C2 projects?

    Or, a possibility that the user could be prompted to download 'part 2' of the game/app upon reaching the end of 'part 1'?

    Or, even the suggestion to buy an inexpensive Mac for C2, in the case that Macs do not have this object limit?

    (I could alternatively plan for two released apps instead of one, which would have to be downloaded from app markets independent of each other, aptly named to the effect of 'Part 1' and 'Part 2'. But let's call that 'Plan B' for now. Any help would be appreciated, for the sake of user convenience, as well as the possibility that a single app would make my job easier regarding any Event work to come, such as in the case of dealing with game saves and loads between two projects/apps.)

    Affected Browsers

    • Chrome: NO
    • FireFox: NO
    • Internet Explorer: NO

    Operating System and Service Pack

    Latest Windows 10 Pro 64-bit, latest service pack, including all automatic and latest updates released.

    Construct 2 Version ID

    Beta r226. Realized new version came out yesterday. Upgraded. It appeared to help at first, even to the point that it fully allowed all intended objects to be inserted successfully. However, error still occurs upon enough attempt to work with project.

  • WOW! that capX. 340 Mb. Takes a while to open. Sounds as a warning ? It is. Curiosity killed the cat (me).

    I am afraid there is a problem in the 'Spriter Plugin", but what do i know ? It is (in my opinion) virtual impossible to find ONE cause for the many errors in this capX.

    I really hope for you that there is a better way to handle so many bitmaps in so many differend sizes. Because the project looks AWSOMME. It should be finished.

    May i suggest you take this to the forums. No, may i plz ask you to take this to the forums. There must be someone who knows how to handle this amount of bitmaps in a better way then loading them all at once.

  • Aw thanks for the kind words 99!

    I collected just those two errors in the capx so far, but more may be possible. The project is nearing the last week-month of a version 1.0 release, even if it becomes necessary to release it in the form of a two-part app, but first I'd just like Ashley to take a crack at it here when possible. Either way, I'll begin working on it as a two-part app today, while awaiting a possible fix that allows me to go with the initial one-app plan.

    Thanks!

    Update: The file also works very slowly when it does let me work with it, again suggesting there are too many objects. Every click to add a new action or event takes a long time to load up, which adds up.

  • The .capx link returns 404 not found, so I cannot investigate this. Besides, this type of problem is very difficult for us to do anything about. I did not know about Windows' "10,000 objects is enough for anybody" limitation when designing C2, and even if I had I don't think I'd have imagined anybody would ever create a project with such a colossal number of images. So at this stage we'd have to rearchitect C2 to work around this, which is not going to happen. We are however designing C3 with this limitation in mind.

    Construct 2 has to create a couple of graphics objects per animation frame - one for the frame itself, and two (but sometimes three) different icon sizes for the frame. It doesn't seem to matter if these are small, they still count towards the 10k limit. I assume the .capx is just a project with several thousand images. I have a hard time understanding how this is necessary. I cannot think of any reasonable way to design a game where this really cannot be avoided. For example I've seen projects in the past which have the same character with 100 animation frames, copied and pasted 30 times, with tiny alterations. There are much better ways of doing that. The advice in remember not to waste your memory will help you avoid coming close to the limit too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problemo Ash! Since then I've come to accept that I can just, if need be, put up two entire apps on Google Play instead of just one. And that's if I can't simply use expansion files, which I may soon have to research, in case it isn't obvious how to do that through Construct 2, regarding how to use events, or whatever applicable, to communicate between two different projects, exports, or APKs. I'm so new to the world of app creation that I'm only interested in starting at a modest level for now, and expanding from there as more tests pass and my knowledge grows.

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