GNOME Bugzilla – Bug 694657
cogl-buffer: Stop warning spam running in sw rendering
Last modified: 2013-07-10 23:30:01 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
Thanks, I've pushed your patch to master and cherry picked to the cogl-1.14 branch too. master: 83dbf79986981fac9ec0f2575b7c7cb32f629f0f cogl-1.14: bd1e3e7642e23a863728157e3d8226d24f9906d8
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?
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.
(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.
(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.
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.
I reverted this at the time, but forgot to close the bug.