Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad polygon! error when changing TextureProgress value from 0 to 1 #21923

Open
ghost opened this issue Sep 10, 2018 · 9 comments
Open

bad polygon! error when changing TextureProgress value from 0 to 1 #21923

ghost opened this issue Sep 10, 2018 · 9 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2018

latest master. compiled last night.

in any event. this bug is pretty weird. took me a while to track it down

steps:

  • create TextureProgress
  • give it texture progress texture
  • create a tween in the scene
  • attach gdscript file

put in gdscript:

tween.interpolate_property(texture_progress, "value", 100, 0,  2, 0, 0)
tween.start()

and look at the error:

full error:

0:00:04:0775 - Bad Polygon!
----------
Type:Error
Description: Bad Polygon!
Time: 0:00:04:0775
C Error: Method/Function Failed, returning: 
C Source: servers\visual\visual_server_canvas.cpp:692
C Function: VisualServerCanvas::canvas_item_add_polygon
@ghost ghost changed the title bad polygon! error when initializing a tween? bad polygon! error when tweening a TextureProgress Sep 10, 2018
@ghost
Copy link
Author

ghost commented Sep 10, 2018

this could also be related to why the tween does not TWEEN in a linear fashion, which is related to my other issue #21818

@Piet-G
Copy link
Contributor

Piet-G commented Sep 14, 2018

I'm not getting the bad polygon error. Do you have a reproduction project?

@ghost
Copy link
Author

ghost commented Sep 16, 2018

@dualmatrix going to make one right now. sorry just saw this

@ghost
Copy link
Author

ghost commented Sep 16, 2018

@dualmatrix badpolygonerror.zip
click anywhere on screen. look at how it behaves (not linear and at the end it like glitches out lol), and you get bad polygon error. this code works flawlessly in 3.0.6. might be regression somewhere. ty for taking a look.

E 0:00:03:0248   Bad Polygon!
  <C Source>     servers\visual\visual_server_canvas.cpp:692 @ VisualServerCanvas::canvas_item_add_polygon()

@Piet-G
Copy link
Contributor

Piet-G commented Sep 23, 2018

Ah this seems to be a problem with TextureProgress breaking with values between 0 and 1

@ghost
Copy link
Author

ghost commented Sep 23, 2018

@dualmatrix ha, nice catch. yep. sorry i just kept thinking it was related to tweening lol (cause was using that as my hotkey bar spinner in game)

e: changed the title, thanks!

@ghost ghost changed the title bad polygon! error when tweening a TextureProgress bad polygon! error when changing TextureProgress value from 0 to 1 Sep 23, 2018
@Piet-G
Copy link
Contributor

Piet-G commented Sep 23, 2018

This seems to happen because you had exp_edit enabled in the TextureProgress

@Piet-G
Copy link
Contributor

Piet-G commented Sep 23, 2018

Apparently when exp_edit is true then min_value must be > 0

@tom-jk
Copy link

tom-jk commented Jul 27, 2020

Testing MRP:
Can reproduce "bad polygon!" error in 3.1.stable.
Can't reproduce "bad polygon!" error in 3.2.stable, 3.2.2.stable, 3.2.3.beta1.

There remains the configuration warning in the scene tree about how min_value must be greater than zero when exp_edit is enabled, but there's no longer any apparent consequence for doing so (you can also go negative). Is it obsoleted?

edit: I notice it does make a difference for other controls, eg. hslider. So the warning is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants