WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237948
[GTK][WPE] Debug build assertion, TextureMapperPlatformLayerProxyGL asserts when going back in the minibrowser
https://bugs.webkit.org/show_bug.cgi?id=237948
Summary
[GTK][WPE] Debug build assertion, TextureMapperPlatformLayerProxyGL asserts w...
Alejandro G. Castro
Reported
2022-03-16 01:38:34 PDT
We are not initializing m_compositorThread properly with the invalidation and the ThreadedCompositor is destroyed after a navigation, and when going back the browser asserts.
Attachments
Patch
(1.96 KB, patch)
2022-03-16 01:47 PDT
,
Alejandro G. Castro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alejandro G. Castro
Comment 1
2022-03-16 01:45:23 PDT
Added a new bug for a follow up patch to create a test for the ThreadedCompositor destroyed situation.
Alejandro G. Castro
Comment 2
2022-03-16 01:46:37 PDT
I forgot to say it is
bug 237949
.
Alejandro G. Castro
Comment 3
2022-03-16 01:47:27 PDT
Created
attachment 454811
[details]
Patch
EWS
Comment 4
2022-03-16 06:04:55 PDT
Committed
r291342
(
248481@main
): <
https://commits.webkit.org/248481@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 454811
[details]
.
Radar WebKit Bug Importer
Comment 5
2022-03-16 06:05:18 PDT
<
rdar://problem/90365573
>
Michael Catanzaro
Comment 6
2022-03-16 08:06:05 PDT
Comment on
attachment 454811
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=454811&action=review
> Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96 > +#ifndef NDEBUG > + m_compositorThread = nullptr; > +#endif
I'm not sure if the #ifndef NDEBUG was a great idea... when I see this, I think "why is this only needed with asserts enabled?" Probably better to keep the debug/release codepaths similar rather than different. Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts are not (NDEBUG).
Carlos Garcia Campos
Comment 7
2022-03-16 08:12:52 PDT
(In reply to Michael Catanzaro from
comment #6
)
> Comment on
attachment 454811
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=454811&action=review
> > > Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96 > > +#ifndef NDEBUG > > + m_compositorThread = nullptr; > > +#endif > > I'm not sure if the #ifndef NDEBUG was a great idea... when I see this, I > think "why is this only needed with asserts enabled?" Probably better to > keep the debug/release codepaths similar rather than different. > > Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts > are not (NDEBUG).
That's right, ASSERT_ENABLED should be used here and in other places where NDEBUG is used for m_compositorThread
Alejandro G. Castro
Comment 8
2022-03-16 08:59:25 PDT
(In reply to Michael Catanzaro from
comment #6
)
> Comment on
attachment 454811
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=454811&action=review
> > > Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96 > > +#ifndef NDEBUG > > + m_compositorThread = nullptr; > > +#endif > > I'm not sure if the #ifndef NDEBUG was a great idea... when I see this, I > think "why is this only needed with asserts enabled?" Probably better to > keep the debug/release codepaths similar rather than different. >
Basically all the file is using the variable with NDEBUG, if we don't use it the variable is not even defined, there is no change in the behaviour. It would be great if you can review this and the other proxies and propose a patch, I think the dmabuf is using a similar setup.
> Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts > are not (NDEBUG).
Urg, in that case even the compilation is broken because the variable is defined in the headers inside NDEBUG guards. A patch for that kind of code is really welcome.
Michael Catanzaro
Comment 9
2022-03-16 09:09:04 PDT
(In reply to Alejandro G. Castro from
comment #8
)
> Basically all the file is using the variable with NDEBUG, if we don't use it > the variable is not even defined, there is no change in the behaviour.
Oh OK, of course that's fine then. Should probably still use ASSERT_ENABLED rather than NDEBUG, but I see we have many other places in WebKit using NDEBUG. I suppose whoever next tries to enable assertions in release builds will wind up figuring this out....
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug