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 788550 - test-egl: g_assert_not_reached called incorrectly in function handle_queued_objects
test-egl: g_assert_not_reached called incorrectly in function handle_queued_o...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
1.12.3
Other All
: Normal minor
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-05 08:46 UTC by Ashish Kumar
Modified: 2018-01-19 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH][Fix for] g_assert_not_reached called incorrectly in both if and else (805 bytes, patch)
2017-10-05 09:04 UTC, Ashish Kumar
none Details | Review
[Patch][gst-omx] TestEgl: Removed redundant/unused code (1017 bytes, patch)
2018-01-19 10:09 UTC, Ashish Kumar
committed Details | Review

Description Ashish Kumar 2017-10-05 08:46:59 UTC
In 
File : testegl.c
Function : static gboolean handle_queued_objects (APP_STATE_T * state)
Line No. 942

g_assert_not_reached in correctly called in both if and else clauses

----------------------
      if (gst_structure_has_name (s, "not-used")) {
        g_assert_not_reached ();
      } else {
        g_assert_not_reached ();
      }
---------------------

as g_assert_not_reached()is a debugging macro to terminate the application if it is ever reached. If it is reached, an error message is logged and the application is terminated.


Solution : 
else clause should be removed

- else {
-        g_assert_not_reached ();
-      }

Please let me know if I can submit a patch
Comment 1 Tim-Philipp Müller 2017-10-05 08:52:23 UTC
Please don't ask to submit a patch, just make a patch from the start, thanks. This avoids us having to look at something multiple times if the fix is right.
Comment 2 Ashish Kumar 2017-10-05 09:04:54 UTC
Created attachment 360952 [details] [review]
[PATCH][Fix for] g_assert_not_reached called incorrectly in both if and else

Please review the patch attached to fix the issue
Comment 3 Tim-Philipp Müller 2018-01-18 22:28:11 UTC
Julien: could you take a quick look please?

I don't understand this code.

How do we know the else should be removed and not the if branch?
Comment 4 Julien Isorce 2018-01-18 23:11:24 UTC
Review of attachment 360952 [details] [review]:

::: gst-omx-1.12.3_org/examples/egl/testegl.c
@@ +941,1 @@
 

Thx for the patch. Please remove the whole block "else if (GST_IS_QUERY (object)) {". It should have been removed by this commit https://cgit.freedesktop.org/gstreamer/gst-omx/commit/examples/egl/testegl.c?id=f1c76ef92112acc7855d5715ac149a3620559f6a , my mistake. Indeed the function "queue_object" does not queue any query anymore.
Comment 5 Ashish Kumar 2018-01-19 10:09:37 UTC
Created attachment 367068 [details] [review]
[Patch][gst-omx] TestEgl: Removed redundant/unused code

Review comment implemented.
Comment 6 Julien Isorce 2018-01-19 10:14:58 UTC
Review of attachment 367068 [details] [review]:

Thx for the updated patch.
Hi Tim, would you mind to push it ? Thx a lot.
Comment 7 Tim-Philipp Müller 2018-01-19 10:17:24 UTC
Done. Thank you both!

commit fdf3b39dd4d634297c9a2effaea00f4dd0e71c52 (HEAD -> master)
Author: Ashish Kumar <kr.ashish@samsung.com>
Date:   Fri Jan 19 15:18:23 2018 +0530

    TestEgl: Removed redundant/unused code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788550