Godot: draw_string draws blocks, outputs errors when window resized

Created on 14 Dec 2018  路  2Comments  路  Source: godotengine/godot

Godot version:
3.1 alpha 3.
OS/device including version:
Windows 10, graphics card NVIDIA GeForce GTX 760

Issue description:
A node that has custom drawing that includes draw_string() will begin drawing blocks when the window is resized. It will also start repeatedly outputting the error "Condition ' !id_map.has(p_rid.get_data()) ' is true. returned: __null".

Issue #15023 looks similar. However, the font resource should still be there, since in my example project it's stored in an export variable. Also, the first time it is drawn there are no errors, it's only during the window resize that problems happen.

Steps to reproduce:
Create a node that uses the _draw() function and have it call draw_string(). Verify that it can draw when the program starts, and then resize the window.

Minimal reproduction project:
draw_string Issue.zip

bug core

Most helpful comment

This is now fixed, but the demo project is not correct as ignoring stretch aspect will produce a broken font oversampling. A warning will be shown in this case indicating it.

All 2 comments

Can confirm with the sample project (if testing, remember to resize).
Bisected:

git bisect start
# bad: [03563c8ddf748b73c6bef962f14e0e41eac45447] Merge pull request #23061 from groud/remove_thumbnail_view
git bisect bad 03563c8ddf748b73c6bef962f14e0e41eac45447
# good: [e1da261844419ebb31a1d0a82f0853acc42f6427] Restored opus build since WebM needs it, but disabled it from code.
git bisect good e1da261844419ebb31a1d0a82f0853acc42f6427
# bad: [37d01b057d4c2108a786fd4e71e920d6c73191df] Merge pull request #19408 from akien-mga/3rdparty-copyright-unbundling
git bisect bad 37d01b057d4c2108a786fd4e71e920d6c73191df
# good: [f3c79d8b6a2ce7f828a892a751b71653d6cbacec] Merge pull request #17399 from Dar13/update_image_format_docs
git bisect good f3c79d8b6a2ce7f828a892a751b71653d6cbacec
# bad: [613a8bee415381a8564d34092b479e1f159e8e60] Merge pull request #18370 from KidRigger/master
git bisect bad 613a8bee415381a8564d34092b479e1f159e8e60
# good: [7ca2e73dea59a2e0683253e73b9b549d749e12f9] Merge pull request #17965 from karroffel/gdnativelib-config-api
git bisect good 7ca2e73dea59a2e0683253e73b9b549d749e12f9
# good: [fa97ec23858d9c997e7c33ceecb292c5ab75c531] Merge pull request #17724 from Noshyaar/doc
git bisect good fa97ec23858d9c997e7c33ceecb292c5ab75c531
# good: [db705386883eb656e9b51ff3437573f76c8aa6f3] Merge pull request #18168 from Chaosus/fixcrash
git bisect good db705386883eb656e9b51ff3437573f76c8aa6f3
# bad: [b35f3a569e578c5ff7eb73257f84d74e30e361d1] Merge pull request #18458 from YeldhamDev/animation_editor_changes
git bisect bad b35f3a569e578c5ff7eb73257f84d74e30e361d1
# bad: [6b797574a2a238968211daa6c731bae56e7bff05] [DOCS] Add note that Pool*Arrays are passed by value (#18340)
git bisect bad 6b797574a2a238968211daa6c731bae56e7bff05
# good: [2730b39a4d462fa197ead5ba3899754dea7dddc4] Merge pull request #18295 from endragor/purchase-errors
git bisect good 2730b39a4d462fa197ead5ba3899754dea7dddc4
# bad: [0dd526e06273ee27696c9adf06aff4fb5384fb78] Docs update for several classes
git bisect bad 0dd526e06273ee27696c9adf06aff4fb5384fb78
# bad: [fab28cc0f3f7ac7fa6cf05e260f7571300943b83] Merge pull request #18285 from Calinou/enable-dynamicfont-oversampling
git bisect bad fab28cc0f3f7ac7fa6cf05e260f7571300943b83
# bad: [16a3f664207b4d195ac1880bb004b9955d565dde] Enable DynamicFont oversampling by default
git bisect bad 16a3f664207b4d195ac1880bb004b9955d565dde
# first bad commit: [16a3f664207b4d195ac1880bb004b9955d565dde] Enable DynamicFont oversampling by default

Seems it was caused by 16a3f664207b4d195ac1880bb004b9955d565dde, CC @Calinou.

This is now fixed, but the demo project is not correct as ignoring stretch aspect will produce a broken font oversampling. A warning will be shown in this case indicating it.

Was this page helpful?
0 / 5 - 0 ratings