Search Issue Tracker

Fixed in 2019.3

Fixed in 2019.2

Votes

0

Found in

2018.3.0a6

2019.1.0a1

2019.2.0a1

2019.2.0a11

Issue ID

1148582

Regression

Yes

Painting terrain crashes when texture resolution is below FullRes in QualitySettings

Terrain

-

Findings so far:
1. When QualitySettings.textureQuality is not at full resolution, the textures are reloaded behind-the-scenes to bring them down by however many mip levels.
2. Terrain doesn't consider this, and so generates temporary textures to copy to/from based on the full-res texture size.
3. Copying from the full-res temp texture into the smaller texture doesn't crash, but throws errors.
4. Copying from the smaller texture into the full-res temp texture ONLY crashes when the location of the copied subresource is out of bounds of the smaller texture.

The crashes we see are due to #4.

===========================================
Reproduction steps:
1. Open the attached project named "Case_1148582"
2. Select the Terrain and try to paint using the blue texture

Expected result: The blue texture is painted on the Terrain ( Track_1148582_V1 )
Actual result: Either nothing happens, black artifacts appear or the Editor crashes ( Depends on the Unity version used, more information in the Notes below)

Reproducible with: 2018.3.0a6, 2018.3.14f1, 2019.1.0f2, 2019.2.0a13
Not reproducible with: 2017.4.26f1, 2018.3.0a5

Notes:
1. When 2018.3.0a6 - 2019.1.0f2 versions are used Textures don't change when painted, however, the Scene's Lighting is re-baked as if changes were made. Behavior is shown in Track_1148582_V2
2. When 2019.2.0a11 and above is used, black artifacts appear when painting. Crashes are also possible. Behavior is shown in Track_1148582_V3
3. The issue happens when "Half Res", "Quarter Res" or "Eighth Res" Quality settings are used

Stack trace from the crash:

========== OUTPUTTING STACK TRACE ==================

0x00007FF8574CA271 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

  1. Response avatar

    Resolution Note (fix version 2019.3):

    A broader solution is necessary for copying to/from downmipped textures in general, but this changeset resolves the problem for terrain alphamaps.

Comments (2)

  1. 080da55f4ea35c613a60078cb23ff737?d=mm

    vagelis199

    Sep 07, 2019 18:23

    still hapends to 2019.3 .0b2

  2. B93496ecac015d4e734cdc3358fdf04c?d=mm

    DemonGamesStudio

    Jul 08, 2019 04:50

    Not fixed. Unity is crashing when painting textures. : /

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.