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 608998 - [jpegparse] unit test fails
[jpegparse] unit test fails
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-04 15:53 UTC by Tim-Philipp Müller
Modified: 2010-02-17 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
return offset+length from _get_image_length() (800 bytes, patch)
2010-02-17 10:35 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
return offset+length from _get_image_length() (909 bytes, patch)
2010-02-17 11:12 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Tim-Philipp Müller 2010-02-04 15:53:22 UTC
Running suite(s): jpegparse
0%: Checks: 2, Failures: 2, Errors: 0
gstcheck.c:449:F:jpegparse:test_parse_single_byte:0: size of the buffers are not the same
gstcheck.c:449:F:jpegparse:test_parse_all_in_one_buf:0: size of the buffers are not the same
FAIL: elements/jpegparse

Test should be fixed or disabled for the release.
Comment 1 Sebastian Dröge (slomo) 2010-02-05 16:27:47 UTC
commit 185df279e85990c643ca26092140caa48e5862f8
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Feb 5 17:25:59 2010 +0100

    jpegparse: Fix unit test
    
    The parsed buffers have a framerate of 1/1.
    
    Fixes bug #608998.
Comment 2 Tim-Philipp Müller 2010-02-07 10:17:00 UTC
It still seems to fail for me in the exact same way..
Comment 3 Sebastian Dröge (slomo) 2010-02-07 10:44:26 UTC
Hmm

$ make elements/jpegparse.check
  CC    jpegparse.o
  LINK  elements/jpegparse
Running suite(s): jpegparse
100%: Checks: 2, Failures: 0, Errors: 0
Comment 4 Tim-Philipp Müller 2010-02-16 10:38:27 UTC
Maybe something to do with this?
Running suite(s): jpegparse
==5562== Conditional jump or move depends on uninitialised value(s)
==5562==    at 0x872156B: gst_jpeg_parse_match_next_marker (gstjpegparse.c:319)
==5562==    by 0x87216EE: gst_jpeg_parse_find_end_marker (gstjpegparse.c:372)
==5562==    by 0x8721857: gst_jpeg_parse_get_image_length (gstjpegparse.c:402)
==5562==    by 0x8722F3B: gst_jpeg_parse_chain (gstjpegparse.c:779)
==5562==    by 0x50944D4: gst_pad_chain_data_unchecked (gstpad.c:4122)
==5562==    by 0x5094EC1: gst_pad_push_data (gstpad.c:4351)
==5562==    by 0x4E2B8DA: gst_check_element_push_buffer_list (gstcheck.c:432)
==5562==    by 0x401368: test_parse_single_byte (jpegparse.c:106)
==5562==    by 0x4E2F165: srunner_run_all (check_run.c:372)
==5562==    by 0x401487: main (jpegparse.c:190)
==5562== 
==5562== Conditional jump or move depends on uninitialised value(s)
==5562==    at 0x872157E: gst_jpeg_parse_match_next_marker (gstjpegparse.c:319)
==5562==    by 0x87216EE: gst_jpeg_parse_find_end_marker (gstjpegparse.c:372)
==5562==    by 0x8721857: gst_jpeg_parse_get_image_length (gstjpegparse.c:402)
==5562==    by 0x8722F3B: gst_jpeg_parse_chain (gstjpegparse.c:779)
==5562==    by 0x50944D4: gst_pad_chain_data_unchecked (gstpad.c:4122)
==5562==    by 0x5094EC1: gst_pad_push_data (gstpad.c:4351)
==5562==    by 0x4E2B8DA: gst_check_element_push_buffer_list (gstcheck.c:432)
==5562==    by 0x401368: test_parse_single_byte (jpegparse.c:106)
==5562==    by 0x4E2F165: srunner_run_all (check_run.c:372)
==5562==    by 0x401487: main (jpegparse.c:190)
==5562== 
0%: Checks: 2, Failures: 2, Errors: 0
gstcheck.c:450:F:jpegparse:test_parse_single_byte:0: size of the buffers are not the same
gstcheck.c:450:F:jpegparse:test_parse_all_in_one_buf:0: size of the buffers are not the same
Comment 5 Tim-Philipp Müller 2010-02-17 01:44:19 UTC
0:00:10.285522732 28177      0x6fbf9c0 LOG                    check gstcheck.c:449:gst_check_element_push_buffer_list: compare buffers, orig vs. new: size 4 vs. 2, caps image/jpeg, parsed=(boolean)true, framerate=(fraction)1/1 vs. image/jpeg, parsed=(boolean)true, framerate=(fraction)1/1
0:00:10.288162942 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:450:gst_check_element_push_buffer_list: ---------------------------------------------------------------------------
0:00:10.288964929 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:450:gst_check_element_push_buffer_list: orig buffer
0:00:10.296625820 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:450:gst_check_element_push_buffer_list: 00000000: ff d8 ff d9                                      ....            
0:00:10.297240213 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:450:gst_check_element_push_buffer_list: ---------------------------------------------------------------------------
0:00:10.297991147 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:451:gst_check_element_push_buffer_list: ---------------------------------------------------------------------------
0:00:10.298200391 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:451:gst_check_element_push_buffer_list: new  buffer
0:00:10.298457197 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:451:gst_check_element_push_buffer_list: 00000000: ff d8                                            ..              
0:00:10.298658131 28177      0x6fbf9c0 MEMDUMP                check gstcheck.c:451:gst_check_element_push_buffer_list: ---------------------------------------------------------------------------
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:457:F:jpegparse:test_parse_single_byte:0: size of the buffers are not the same
Comment 6 Tim-Philipp Müller 2010-02-17 01:46:58 UTC
Sorry, let's try that again:

logging added to gst_check_element_push_buffer_list reports:
compare buffers, orig vs. new: size 4 vs. 2,
    caps image/jpeg, parsed=(boolean)true, framerate=(fraction)1/1
       vs. image/jpeg, parsed=(boolean)true, framerate=(fraction)1/1
---------------------------------------------------------------------------
orig buffer
00000000: ff d8 ff d9                                      ....            
---------------------------------------------------------------------------
---------------------------------------------------------------------------
new  buffer
00000000: ff d8                                            ..              
---------------------------------------------------------------------------
0%: Checks: 1, Failures: 1, Errors: 0
gstcheck.c:457:F:jpegparse:test_parse_single_byte:0: size of the buffers are not the same
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-17 10:35:56 UTC
Created attachment 154012 [details] [review]
return offset+length from _get_image_length()
Comment 8 Tim-Philipp Müller 2010-02-17 10:43:38 UTC
Works for me, please commit, but:

 - please use C comments instead of C++ comments
 - please put the 'Fixes 12345' into the body of the commit message, not the header line

Thanks!
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-17 11:12:26 UTC
Created attachment 154016 [details] [review]
return offset+length from _get_image_length()
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-17 13:55:20 UTC
commit caf2be2115ef4d52adf0b454bb24ea3f2458b1ec
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Wed Feb 17 12:34:38 2010 +0200

    jpegparse: return offset+length from _get_image_length().
    
    _find_end_marker() find the position of the marker. EOI has a fixed length of 2
    bytes that where missing. Fixes #608998