Closed Bug 1242811 Opened 8 years ago Closed 7 years ago

GrBatchAtlas.cpp:243: failed assertion "!plot->unique()"

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase
On shutdown:

gfx/skia/skia/src/gpu/GrBatchAtlas.cpp:243: failed assertion "!plot->unique()"
Attached file stack
I was not able to reproduce this at all. I tried loading the test case then shutting down Firefox in various ways. It all worked fine.
While I couldn't manage to reproduce this one, at least it would be a good idea to force the GrContext to discard any remaining unprocessed batched draws. This way we avoid the GrContext trying to draw things during the shutdown process for whatever reason, which could only lead to nothing good.
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Attachment #8712773 - Flags: review?(jmuizelaar)
Comment on attachment 8712773 [details] [diff] [review]
discard partial draws before destroying GrContext

Review of attachment 8712773 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/SkiaGLGlue.cpp
@@ +942,5 @@
>       * through it, uses mGLContext
>       */
> +    if (mGrContext) {
> +      // Discard any partial draws as deleting the GrContext will implicitly flush them.
> +      mGrContext->flush(GrContext::kDiscard_FlushBit);

Is discarding the right thing to do? What if we have a snapshot? What makes sure it gets these deferred updates?
(In reply to Jesse Ruderman from comment #0)
> Created attachment 8711967 [details]
> testcase

Can you reproduce in rr?
Flags: needinfo?(jruderman)
Comment on attachment 8712773 [details] [diff] [review]
discard partial draws before destroying GrContext

Review of attachment 8712773 [details] [diff] [review]:
-----------------------------------------------------------------

I'm going to r- for now until we better understand what's happening here.
Attachment #8712773 - Flags: review?(jmuizelaar) → review-
This no longer reproduces on trunk.
Assignee: lsalzman → nobody
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(jruderman) → in-testsuite+
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: