Random window issues since 164

0 favourites
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • Problem Description

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

    Construct 2 Check failure

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

    Check failure! This is probably a bug:

    GetHICON returned NULL

    Condition: ret != NULL

    File: Projects\ObjectTexture.cpp

    Line: 612

    Function: struct HICON__ *__cdecl ResizeBitmapToIcon(const class cr::vector2_base<int> &,class Gdiplus::Bitmap *,int)

    Build: release 167.2 (32-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

    Can't post on forum.

    Description of Capx

    Insanity's Blade game.

    Steps to Reproduce Bug

    There seems to be no rhyme or reason to the cause. It just randomly happens. In the case of this error I was adding an event to an event sheet and the window pops open blank for a split second and then disappears. Upon hitting the enter key several times I finally got this window with an error.

    Whenever I do events or try to save (export) an object image I get this one randomly. Another one I get which never gives me a visible error window and eventually I have to force quit - losing my work.

    I've uninstalled C2 and even tried 32-bit instead of 64-bit. I've updated windows and video drivers. But This has just started happening since 164. I removed the Wii U plugin as well incase that was it. No new plugins aside of that have been added since.

    As far as I Can tell it's related to the objects being minimized for the object window in c2. But sometimes text is missing too. I'll try rolling back to the stable build as I don't think we've used any of the new features.

    Also - no other programs on my computer are having issues. No much new in the way of software since this is my work machine.

    Observed Result

    Blank windows, missing scroll bars. Missing gfx, closing windows and the occasional complete crash.

    Expected Result

    normal functionality of c2.

    Affected Browsers

    Does not apply.

    Operating System and Service Pack

    Windows 7-64 bit. Completely up to date.

    Construct 2 Version ID

    Currently 167.2

    ***EDIT***

    I hit abort after that error and then got this one:

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

    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: __thiscall ObjectTexture::~ObjectTexture(void)

    Build: release 167.2 (32-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    ***EDIT 2***

    I've gone back to 163. Now it's doing it there as well. Either I've brought a bug back with me or something else has gone wrong. It's kind of reminding me of what CC used to do when I ran out of memory - the bigger my game got, the worse the crashing got. I'll go through the game and try to get rid of all of the garbage, but there is still more to add gamewise if so this is only a temp fix if it works. This time there was no error, just my variable boxes greyed out so I can't see what I'm typing and then it froze.

  • Just a quick update. This is still happening no matter what we do with the game or what computer we try it on. One thing I forgot to mention though is that it can crash windows explorer. This also happens on my other pc with a clean windows 7 -64 bit install. Open an event window and bang explorer crashes instead of C2. It's like a power struggle for a resource. Another machine is running Win 8.1 64bit.

    Although it shows C2 using around 400-500mb of ram out of 8gb. It happens with nothing else running beside normal windows tasks.

    Could this be a 64-bit issue we're running into?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like a memory leak. Not much we can do without your .capx though, can you send it? Or perhaps you have simply made your project so large your computer does not have enough memory to handle it.

  • Ashley JayJay also agreed that it was a memory leak, he was constantly getting random errors. I'm in the middle of stripping the "NES" version completely out of the game. Since it (in the long run) would technically double the amount of objects in the game. We both have different machines. And like I said, C2 is reporting 400-500mb tops using memory. I have 8gb in all of my machines. We're not even coming close to the max.

    I can PM you later about the capx. JayJay did a stripped down version of the game so he could work on the map/inventory screen last night and had no issues with a ton of objects removed. But what it's looking like is that it can't cache the resized version of the graphics for the icons.

    Oh - I also installed Win7 32-bit on another pc last night. Got everything up to date with drivers etc. Got everything installed for c2 and still had the problems though they showed up differently. When creating an event, the window would open, some of the text boxes were just blank but this time the "OK", "Cancel" or "Back" buttons would be flickering.

    The game itself is small as far as file sizes go - it's the music that makes it big. I cut the WAV versions of the sound out too. Over all it's about 224mb and 212 of that is the sound/music in the two formats.

    Anyhow I'm going to continue stripping the NES version out so I can get my work done. I'll PM the old capx once I'm finished

    Thanks!!

  • damainman - 500mb of images? That's such an extraordinarily huge amount you may even be running out of VRAM. Do you have a 512mb card or a 1gb card? It doesn't matter if you have more system memory, it may only use memory available on the video card itself.

  • Ashley not 500mb of images...I'm not that fast at art. I'm saying C2 is reporting that it's using 400-500mb (in windows task manager) of ram when it's running (C2 itself not the game) maximum. I also have a 2gb video card anyhow. There are probably 6mb max of images LOL!!

  • Ashley Ok I've tried to recreate the error - and this is far extreme compared to what our game does (we have like a little over 8000 events and probably 30 event sheets).

    I set the objects to the same amount in our game. That didn't cause the problem though once I got past 250 sprites the images weren't caching right anymore in the object window. I set the amount of events to ours and nothing happened. Then I started cutting and pasting variable - nothing. But when I started making blank event sheets it started freezing and then it crashed. I started getting blank windows again, etc. And then a full blown app crash.

    I gave it to JayJay and he's getting mixed results. As am I. Sometimes I can have it open for awhile before it messes up. Sometimes it messes up right away. This is exactly what the game is doing. One time I was able to use it fine for about 6-7 minutes just messing with stuff and copying and pasting and trying to edit the fake variables.

    So yeah our game has nowhere near as many "things" in it (events, etc) but it is having the same crashing issues. We wanted to try to recreate the problem without having any other plugins etc present.

    https://www.dropbox.com/s/mtayltix4ne7gp2/c2test.zip

  • I feel that it's an issue in rendering the icons of every object, as I only have a serious crash when expanding the objects tab in the project, or trying to add an event.

    Is there some debug mode option to turn rendering of icons off for testing?

  • So you're saying there's a problem when you have close to 1500 object types in a project? How could you arrive at such a number even in a large, realistic project? The example you provided is obviously ridiculous with lots of redundant repetition, but does your project really have 1000+ unique object types with no redundancy?

    The project bar needs an icon for every object type in the project, and with such a huge number eventually Windows, not Construct 2, fails to return any more icons. So there must be some internal limit in Windows. I don't know what else we could do about this, the project bar still needs to show those icons.

  • Ashley I'd say around 1000 at this point. I'll be doing a final clean up. But yes there are a lot of objects. Every stage has it's own backgrounds, enemies, bullets... etc etc. Some of the bosses are made up of multiple parts. The special effects are usually objects if not particles. Power up items, other weapons, 4 different player sprites with all of their various bullets. Then there is the shooter stage that has it's own set of graphics etc.

    I've probably got about as many enemies in the game as a big castlevania game at this point and a lot of those have invisible sprites that control them. Then there is the map/savegame/item select screen, Cutscenes, etc etc. I am, however, about to cut a boss fight which required a whole new player sprite set because they are riding horse back and shooting. The old bosses for that stage are there too. So I'll probably be able to cut the game by another 200 objects at least between that stage and old NES gfx bits I'm still finding.

    I think you are right about Windows thing. When I started making the mock up capx and duplicating those objects when I hit around 200-250 objects the object bar icons weren't working right anymore. For example, it was showing the villager sprite icon over and over when the tiled background icon should have be seen, or even one of the icons for the plugins.

    But if it is Windows, what could even be done about that? Some sort of work around?

  • I don't know what could be done other than impose an arbitrary limit of say 1000 icons, and stop returning icons after that. But then if you have a project with 2000 objects, it just won't show icons for half of them, which isn't great.

  • damainman, have you tried to close all C2 tabs? When you visit your layouts of event sheets it remains open in a tab consuming memory. I had this random error/crashing issue long time ago due to C2 memory leak. All my issues resolved when I started closing tabs regularly.

  • nemo It does it with only one tab open. It can be any tab, and sometimes it happens as soon as you open C2. We have removed all of the extras from the game now. We might take a flogging from a couple of the Kickstarter backers possibly but I think more people are worried about playing the full game working instead of playing the extras or the NES version. We are just going to have the NES styled version of the game as a separate download now for customers.

    The temp fix was killing disabled lines in events, deleting objects, and clearing out unused layouts (some of the maps have been redesigned 3-4 times so there were a couple of old maps still). It's not just the objects causing it, it's everything - overall game size I guess.

  • You're not alone in this, damainman at all. I regularly have those display issues and at times get the hicon error you posted in the op. My C2 failures almost always happen after running a preview (or export) of the game. Any subsequent preview (if I can get one to work at all) will have all text tiny and missing values and the C2 IDE is largely unresponsive and throws errors left and right.

    Ashley if it is indeed linked with a need for windows to show icons, would it be possible to add a text-only option for projects that intend to be large? I've done some toying and I can increase how many successful previews I can achieve by having the object and property bars closed, saving, restarting, and previewing from there so those things don't have to load. It also did help a little to split up my biggest event sheet (500 events down to 2x250).

    I'm not being wasteful or poorly planning Courier. I could probably reduce the object count by around 50 or 60 if I really tried, but the project is at 1,200 objects by my best count. About half of it comes from Spriter and how many NPCs I have in the game (and all the objects created for it). My events aren't crazy--for the whole project I'm at 2,600 events split up across a bunch of event sheets. It's as efficient as I can make a large, varied RPG. It never reaches 40 MB of vram and never more than 1,500 objects in the heaviest of situations.

    So a (relatively) simple fix like having and option to make objects in the project bar text-only may correct the problem if I'm thinking about this correctly. An option down the road would be something like a small preview window of an object when you click on it in the list, but something to help larger projects run more stably in C2 would be a huge help.

  • I was chatting with C7 about this earlier, and had some thoughts: I don't know how icons work, but could they possibly be 'spritesheeted' the same way sprite animation frames are on export so multiple icons would be on one texture? Could that increase the number of icons possible?

    Or could the icon system currently used be subverted somehow by displaying object icons in some other manner, like drawing them manually?

    Or could C2 have a max limit on the number of icons and start replacing currently unused icons with the onscreen icons once it goes past the limit rather than just trying to create more of them?

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