Editor rendering errors with 9-patch and effects

Report Construct 2 bugs here.

Post » Sun Dec 04, 2016 7:47 am

Problem Description
When the following conditions are true, the problem will occur:

1. Have a 9-patch in your layout.
2. On the same layer as the 9-patch, have an object (a Sprite, for example) with a certain type of effect (Tint is known to cause it) render after the 9-patch.
3. Have enough textures loaded into the Construct 2 editor. The exact amount required is unknown and may vary between machines. The loaded textures don't have to be from the same project. If in doubt, load a few very large projects. I use a project with 257 objects in a layout with unique images for each, with an estimated video memory usage of 63.3 MB

The 9-patch will still be visible, but the object with the Tint effect and everything that renders after it will render incorrectly, usually resulting in seeing nothing at all.

Attach a Capx
I created a minimalist file, however, by itself, it does not have enough textures to cause the issue.
https://drive.google.com/open?id=0B40Xy ... VhKSVpiQ0E

Alternate file created by @wertandrew
https://1drv.ms/u/s!AkG5n8_vobVPg4sGtkt5LLjeitvUOA

Description of Capx
My capx simply has the minimum objects to cause the error, though not enough textures.

wertandrew's can meet the requirements by itself (on my machine), but if you can't reproduce, try loading more textures.

Steps to Reproduce Bug
  • Install Construct 2 64-bit. It must be 64-bit, as the problem doesn't happen on 32-bit.
  • Open example capx.
  • Make sure the project setting 'Preview Effects' is enabled.
  • Load a large project or two for good measure, in the same Construct 2 instance.
  • View the layout from the example capx.
  • Scroll around a bit. Sometimes it will appear normal when you first load it, and start screwing up if you scroll the window or zoom.

Observed Result
In my example capx, the grey box Sprite that is tinted red disappears, as well as the Sans Sprite. The 9-patch remains visible exactly where it should be.

Expected Result
I expect the objects to render where they are supposed to be.

Affected Browsers
None, this is an editor only bug.

Operating System and Service Pack
Windows 10 64-bit
Windows 7 64-bit

Construct 2 Version ID
Release 240 (64-bit) has this problem.
Release 240 (32-bit) does not have this problem.

Most of the time this bug has the effect of making it seem like objects disappeared, but I've seen a case where objects were in the wrong place and following the screen scroll (I can provide a video if needed, but not a capx), and I've seen a case where the objects somehow got a 3d rotation applied to them. This leads me to believe that it is related to an OpenGL vertex transformation matrix.

Yes, this is a duplicate to the bug you closed here:
9-patches-create-errors-in-editor-view_t183574

However, I am completely unconvinced that this is a driver issue. I tested this on the following configurations:
Windows 10 64-bit
AMD Radeon HD 5700 Series
Driver date: 2016-02-26

Windows 7 64-bit
Nvidia GeForce GT 640M
Driver date: 2016-07-10

On both systems, the problem occurs on 64-bit Construct 2, and not 32-bit Construct 2. Same exact bug, two completely different card vendors (and drivers). I've observed this bug for at least a couple of years, through many Construct 2 versions, so this isn't a regression. It has always been there since I started using it. I find it incredibly unlikely that both drivers from both vendors have the same exact bug, and it somehow only affects the Construct 2 editor and absolutely nothing else. Keep in mind I have a large steam library, and I've played most of the games in it without any sort of issue like this.
Last edited by Johncw87 on Wed Mar 22, 2017 1:43 am, edited 1 time in total.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Sun Dec 04, 2016 9:15 am

Does turning off effect rendering fix the issue for you? That's a solution we've been provided for the same report, along with: Your drivers are at fault because it always is so
B
32
S
11
G
3
Posts: 214
Reputation: 4,267

Post » Sun Dec 04, 2016 6:34 pm

Psychokiller1888 wrote:Does turning off effect rendering fix the issue for you? That's a solution we've been provided for the same report, along with: Your drivers are at fault because it always is so


Yes, I mentioned that in the post I edited a bunch in the previous thread. I also mentioned here in the steps to reproduce "Make sure the project setting 'Preview Effects' is enabled" because turning that off makes the problem stop. You probably didn't read the whole bug report, so I'll just tell you again that the 32-bit Construct 2 does not have this problem.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Post » Mon Dec 05, 2016 5:44 pm

@Ashley how much more do you need to understand it's not a driver issue? This time we've even found someone with the problem on something else than an nVidia
B
32
S
11
G
3
Posts: 214
Reputation: 4,267

Post » Thu Dec 15, 2016 5:52 am

Somehow I got sucked in to investigating this.. It definitely happens to me too.. AMD Radeon 6800 if it helps..

I started playing around.. and this thing makes no sense..
I deleted everything from wertandrew's project except debugbox (sprite), limelight font (spritefont), and the playerwindows (sprite) (-- no 9-patches left!) and the bug is still there.
Deleting either the debugbox or the spritefont makes it go away.
OR
Taking the set color effect off of either of them makes it go away.
OR
Adding another effect to either of them also makes it go away.

So anyway.. not sure I've helped any, but it seems to me the 9-patch is irrelevant.. If it might help, here's the capx super simplified (no 9-patch) and still bugged: [link removed in lieu of new one]

EDIT: I just reopened that file and now it's not bugged.. so maybe it only stayed bugged after deleting all the stuff..

EDIT again: I went through my delete objects test again, but this time I left one more spritefont in.. the saved file still contains the bug (super simplified, no 9-patches). the "makes it go away" list above still applies, except that when deleting the playerfont spritefont, you don't see that it's fixed until you save and reload.. so confusing.
Here it is: https://drive.google.com/open?id=0B1Aaz ... UdBVEZxM2s
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Sat Dec 17, 2016 1:10 am

Very interesting. So @spacedoubt you think the spritefont might be causing this? Never thought of that. The reason I think it was related to the 9-patch is because the issue originally arose when I started adding 9-patches into my big project and it was obvious that something started to look wrong. Also in some cases it was dead obvious as as soon as I dragged a 9-patch into a layout, it would make other sprites disappear.

Btw @Johncw87 we observed that 3D weirdness you mentioned on the other thread in our big C2 project. If you zoom in, objects are stretched accordingly to the zoom amount, its midly annoying because for us it happens on our placeholder layout and we cant select things easily without playing with the camera first. Not sure if its the same issue though, but it could be.
B
4
S
1
Posts: 14
Reputation: 280

Post » Wed Dec 21, 2016 2:38 pm

I can't reproduce any issue on Windows 10 64-bit with an nVidia GTX 1070 - it looks like this, which AFAICT is correct: https://dl.dropboxusercontent.com/u/15217362/9patchrendering.png
It never changes as I scroll/zoom around.

Graphics drivers are total garbage and I definitely can believe that two vendor's drivers are broken. Graphics vendors optimise like mad for the latest AAA game releases, and they often break less used apps. It is entirely plausible that both vendors made some optimisation for a recent game that breaks C2.

It could be an issue with C2 itself, but there are two points against that:
1) I should be able to reproduce it in my copy of C2, but I cant, suggesting the C2 code can work at least sometimes, and
2) it ought to reproduce in both the 32-bit and 64-bit versions identically if it's a logic problem with C2's code, since we compile the same source code for both builds.
So this seems like it could be some kind of 64-bit driver issue, but I have to admit, I'm not sure. These kinds of problems are notoriously borderline-impossible to solve. We've had a bunch of them in the past. At least this isn't a serious one - we've had "C2 crashes on startup on all Radeon cards of this model" in the past...
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Sat Dec 24, 2016 3:00 pm

@Ashley Ok, will build a GTX 1070 on my Windows 10 64 bit. What brand did you buy? Asus, Gigabyte?? What driver do you have installed?
B
32
S
11
G
3
Posts: 214
Reputation: 4,267

Post » Sun Dec 25, 2016 11:19 am

@Ashley At least now we are on stage 3, it's going forward... Don't take it bad, I'm a java dev, I react the same and I proudly wear that shirt....

Image
B
32
S
11
G
3
Posts: 214
Reputation: 4,267

Post » Mon Dec 26, 2016 7:59 am

Ashley wrote:I can't reproduce any issue on Windows 10 64-bit with an nVidia GTX 1070 - it looks like this, which AFAICT is correct: https://dl.dropboxusercontent.com/u/15217362/9patchrendering.png
It never changes as I scroll/zoom around.


A key thing missing from that screenshot is having another, large project loaded into the editor at the same time. I thought I made that pretty clear. Load multiple large projects, just to be sure.

http://i.imgur.com/AWnaaEL.png

Even the grid is missing (which is unusual for this bug).

Ashley wrote:2) it ought to reproduce in both the 32-bit and 64-bit versions identically if it's a logic problem with C2's code, since we compile the same source code for both builds.
So this seems like it could be some kind of 64-bit driver issue, but I have to admit, I'm not sure. These kinds of problems are notoriously borderline-impossible to solve. We've had a bunch of them in the past. At least this isn't a serious one - we've had "C2 crashes on startup on all Radeon cards of this model" in the past...


While I've never seen it myself, there are potential problems that can arise when compiling for 64-bit. The only thing I can think of though, is making an assumption that pointers are 4 bytes long. Perhaps a pointer is being stored in a variable that is only 4 bytes long in the 64-bit build? If I were you, I would take a close look at any pointers that may be stored on the same struct or class that contains any OpenGL transformation matrices.
B
54
S
19
G
13
Posts: 97
Reputation: 10,146

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests