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 (5)

  1. 5b973c31fd93fdba780fe17692fa9028?d=mm

    unikum

    Nov 07, 2019 15:04

    This is NOT fixed.

    Reproduce by do the following:
    - Go into your Project Settings > Quality and click on the "Very Low" level.
    - Create a new tiled terrain with Terrain Toolbox (might work with regular terrain)
    - Add or create layers and try to paint

    You might be able to paint on some terrains but sooner or later it will crash.

    Quick solution:
    - Go into quality settings and click on Ultra to make sure the editor isn't trying to run the low settings. It is easy to accidentally leave it on low settings after adjusting settings for a build. Marking a setting to edit it should not automatically make the editor run that setting.

  2. Fdd9de2e64220bf8c7942a5662860d1d?d=mm

    joshcamas

    Nov 04, 2019 16:25

    Happening for me as well, 2019.2.11.

  3. 5f68d53c9a8bbfbcf3dead9fe5d99e2e?d=mm

    NaruAkitsuki

    Oct 01, 2019 14:36

    metoo

  4. 080da55f4ea35c613a60078cb23ff737?d=mm

    vagelis199

    Sep 07, 2019 18:23

    still hapends to 2019.3 .0b2

  5. 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.