After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694657 - cogl-buffer: Stop warning spam running in sw rendering
cogl-buffer: Stop warning spam running in sw rendering
Status: RESOLVED FIXED
Product: cogl
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-02-25 10:28 UTC by Bastien Nocera
Modified: 2013-07-10 23:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cogl-buffer: Stop warning spam running in sw rendering (958 bytes, patch)
2013-02-25 10:28 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2013-02-25 10:28:44 UTC
.
Comment 1 Bastien Nocera 2013-02-25 10:28:46 UTC
Created attachment 237344 [details] [review]
cogl-buffer: Stop warning spam running in sw rendering

/etc/gdm/Xsession[731]: Aviso do gerenciador de janelas: Log level 8: g_error_free: assertion `error != NULL' failed
Comment 2 Robert Bragg 2013-02-25 17:51:23 UTC
Thanks, I've pushed your patch to master and cherry picked to the cogl-1.14 branch too.

master: 83dbf79986981fac9ec0f2575b7c7cb32f629f0f
cogl-1.14: bd1e3e7642e23a863728157e3d8226d24f9906d8
Comment 3 Neil Roberts 2013-02-26 14:54:33 UTC
It would be good to know why cogl_buffer_map_rage is returning NULL. Generally if an API has a return value that represents an error, it should always set the CoglError if it is used, shouldn't it?
Comment 4 Robert Bragg 2013-02-26 15:40:03 UTC
Hmm, right, I just landed this on autopilot, sorry.

I've re-opened the bug as unconfirmed and I wonder if we should revert the patches for now?

Inspecting the code I can't see an obvious way that cogl_buffer_map_rage() would return NULL without setting an error unless we hit one of these checks:

_COGL_RETURN_VAL_IF_FAIL (cogl_is_buffer (buffer), NULL);
_COGL_RETURN_VAL_IF_FAIL (!(buffer->flags & COGL_BUFFER_FLAG_MAPPED), NULL);

Bastien, it would be good if you could step through the cogl_buffer_map_range() call that's resulting in your warning to find out why it returns NULL.

I wonder if perhaps you're hitting a problem with the buffer being mapped multiple times, or otherwise maybe we have overlooked some error path and forgotten to return a CoglError.
Comment 5 Bastien Nocera 2013-02-26 15:50:43 UTC
(In reply to comment #4)
> Hmm, right, I just landed this on autopilot, sorry.
> 
> I've re-opened the bug as unconfirmed and I wonder if we should revert the
> patches for now?
> 
> Inspecting the code I can't see an obvious way that cogl_buffer_map_rage()
> would return NULL without setting an error unless we hit one of these checks:
> 
> _COGL_RETURN_VAL_IF_FAIL (cogl_is_buffer (buffer), NULL);
> _COGL_RETURN_VAL_IF_FAIL (!(buffer->flags & COGL_BUFFER_FLAG_MAPPED), NULL);

I would expect those to produce their own warnings as well, correct? Then you forgot another error path, as the error I mentioned above gets written about 15 times a second.

> Bastien, it would be good if you could step through the cogl_buffer_map_range()
> call that's resulting in your warning to find out why it returns NULL.
> 
> I wonder if perhaps you're hitting a problem with the buffer being mapped
> multiple times, or otherwise maybe we have overlooked some error path and
> forgotten to return a CoglError.
Comment 6 Robert Bragg 2013-02-26 19:08:26 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Hmm, right, I just landed this on autopilot, sorry.
> > 
> > I've re-opened the bug as unconfirmed and I wonder if we should revert the
> > patches for now?
> > 
> > Inspecting the code I can't see an obvious way that cogl_buffer_map_rage()
> > would return NULL without setting an error unless we hit one of these checks:
> > 
> > _COGL_RETURN_VAL_IF_FAIL (cogl_is_buffer (buffer), NULL);
> > _COGL_RETURN_VAL_IF_FAIL (!(buffer->flags & COGL_BUFFER_FLAG_MAPPED), NULL);
> 
> I would expect those to produce their own warnings as well, correct? Then you
> forgot another error path, as the error I mentioned above gets written about 15
> times a second.

it depends on whether your cogl is built with --enable-debug since we build with G_DISABLE_CHECKS if not.
Comment 7 Bastien Nocera 2013-02-27 13:43:38 UTC
I cannot reproduce this after having fully updated my system. Might have been some bad interaction between LLVMpipe and some mesa libraries. (mesa 9.1/llvm-libs 3.2).

Feel free to revert the patch and close this.
Comment 8 Robert Bragg 2013-07-10 23:30:01 UTC
I reverted this at the time, but forgot to close the bug.