[Bug 702425] ges-launch: make it portable to all locales.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jun 20 00:40:48 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=702425
  GStreamer | gst-editing-services | git

--- Comment #4 from Alban Browaeys <prahal at yahoo.com> 2013-06-20 07:40:39 UTC ---
By the way, I managed to get the backtrace:

(gdb) bt
#0  g_set_error_literal (err=0x7fffffffc290, domain=51, code=1,
message=0x7ffff6138ae0 "Invalid byte sequence in conversion input")
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gerror.c:592
#1  0x00007ffff608ca6f in g_convert_with_iconv (str=0x7fffffffc6f3
"/home/prahal/Vidéos/Test3.xges", len=31, converter=0x612e40, bytes_read=0x0, 
    bytes_written=0x0, error=0x7fffffffc290) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:763
#2  0x00007ffff608ccef in g_convert (str=0x7fffffffc6f3
"/home/prahal/Vidéos/Test3.xges", len=-1, to_codeset=0x7ffff6138b87 "UTF-8", 
    from_codeset=0x612bf0 "ANSI_X3.4-1968", bytes_read=0x0, bytes_written=0x0,
error=0x7fffffffc290)
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:885
#3  0x00007ffff608d4ba in g_locale_to_utf8 (opsysstring=0x7fffffffc6f3
"/home/prahal/Vidéos/Test3.xges", len=-1, bytes_read=0x0, bytes_written=0x0, 
    error=0x7fffffffc290) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:1216
#4  0x00007ffff60bcfa7 in parse_arg (context=0x610eb0, group=0x610f40,
entry=0x611780, value=0x7fffffffc6f3 "/home/prahal/Vidéos/Test3.xges", 
    option_name=0x612c60 "-q", error=0x7fffffffc290) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1160
#5  0x00007ffff60bd91d in parse_short_option (context=0x610eb0, group=0x610f40,
idx=1, new_idx=0x7fffffffbdc4, arg=113 'q', argc=0x7fffffffbe9c, 
    argv=0x7fffffffbe90, error=0x7fffffffc290, parsed=0x7fffffffbdc8) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1425
#6  0x00007ffff60bebc7 in g_option_context_parse (context=0x610eb0,
argc=0x7fffffffbe9c, argv=0x7fffffffbe90, error=0x7fffffffc290)
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1926
#7  0x0000000000403d80 in main (argc=3, argv=0x7fffffffc3a8)
    at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/gst-editing-services/tools/ges-launch.c:494



#3  0x00007ffff608d4ba in g_locale_to_utf8 (opsysstring=0x7fffffffc6f3
"/home/prahal/Vidéos/Test3.xges", len=-1, bytes_read=0x0, bytes_written=0x0, 
    error=0x7fffffffc290) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:1216
1216        return g_convert (opsysstring, len, 
(gdb) l
1211      const char *charset;
1212    
1213      if (g_get_charset (&charset))
1214        return strdup_len (opsysstring, len, bytes_read, bytes_written,
error);
1215      else
1216        return g_convert (opsysstring, len, 
1217                  "UTF-8", charset, bytes_read, bytes_written, error);
1218    }


155    /**
(gdb) l
156     * g_get_charset:
157     * @charset: return location for character set name
158     *
159     * Obtains the character set for the <link linkend="setlocale">current
160     * locale</link>; you might use this character set as an argument to
161     * g_convert(), to convert from the current locale's encoding to some
162     * other encoding. (Frequently g_locale_to_utf8() and
g_locale_from_utf8()
163     * are nice shortcuts, though.)
164     *
165     * On Windows the character set returned by this function is the
(gdb) 
166     * so-called system default ANSI code-page. That is the character set
167     * used by the "narrow" versions of C library and Win32 functions that
168     * handle file names. It might be different from the character set
169     * used by the C library's current locale.
170     *
171     * The return value is %TRUE if the locale's encoding is UTF-8, in that
172     * case you can perhaps avoid calling g_convert().
173     *
174     * The string returned in @charset is not allocated, and should not be
175     * freed.
(gdb) 
176     *
177     * Return value: %TRUE if the returned charset is UTF-8
178     */
179    gboolean
180    g_get_charset (const char **charset)

which confirm the issue is with setlocale.



About gettext. Indeed gettext-runtime is not called , only glibc gettext
implementation. I shinted to much.


About other gstreamer tools: only the arguments parsed via
g_option_context_parse are breaking (the pipeline parser does not). Thus
stressing gst-launch-1.0 via the only paramaters I found where oe could have
accentuated characters (say a local plugin directory in a home subdirectory
with a non ascii character in its name) i can reproduce:
Breakpoint 2, g_set_error_literal (err=0x7fffffffbfc8, domain=51, code=1,
message=0x7ffff73e6ae0 "Invalid byte sequence in conversion input")
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gerror.c:592
592      if (err == NULL)
(gdb) bt
#0  g_set_error_literal (err=0x7fffffffbfc8, domain=51, code=1,
message=0x7ffff73e6ae0 "Invalid byte sequence in conversion input")
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gerror.c:592
#1  0x00007ffff733aa6f in g_convert_with_iconv (str=0x7fffffffc6ca
"/home/prahal/Vidéos/", len=21, converter=0x6158f0, bytes_read=0x0, 
    bytes_written=0x0, error=0x7fffffffbfc8) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:763
#2  0x00007ffff733acef in g_convert (str=0x7fffffffc6ca "/home/prahal/Vidéos/",
len=-1, to_codeset=0x7ffff73e6b87 "UTF-8", 
    from_codeset=0x6157f0 "ANSI_X3.4-1968", bytes_read=0x0, bytes_written=0x0,
error=0x7fffffffbfc8)
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:885
#3  0x00007ffff733b4ba in g_locale_to_utf8 (opsysstring=0x7fffffffc6ca
"/home/prahal/Vidéos/", len=-1, bytes_read=0x0, bytes_written=0x0, 
    error=0x7fffffffbfc8) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gconvert.c:1216
#4  0x00007ffff736b3a0 in parse_arg (context=0x613f90, group=0x614260,
entry=0x6144b0, value=0x7fffffffc6ca "/home/prahal/Vidéos/", 
    option_name=0x615710 "--gst-plugin-path", error=0x7fffffffbfc8) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1298
#5  0x00007ffff736bfad in parse_long_option (context=0x613f90, group=0x614260,
idx=0x7fffffffbeec, 
    arg=0x7fffffffc6ba "gst-plugin-path=/home/prahal/Vidéos/", aliased=0,
argc=0x7fffffffbfac, argv=0x7fffffffbfa0, error=0x7fffffffbfc8, 
    parsed=0x7fffffffbee8) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1537
#6  0x00007ffff736c8d6 in g_option_context_parse (context=0x613f90,
argc=0x7fffffffbfac, argv=0x7fffffffbfa0, error=0x7fffffffbfc8)
    at /home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/goption.c:1870
#7  0x0000000000405f8d in main (argc=4, argv=0x7fffffffc358) at
gst-launch.c:1001

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list