[Interest] Certain QTextCodecs causing crashes on Linux
Karl Ruetz
karl.ruetz at ruetzdogz.com
Wed Jul 31 18:55:41 CEST 2013
Are you using Ubuntu by any chance? We had a similar problem last
year but it was unrelated to Qt. If you tried to do several consecutive
searches in a web browser on Ubuntu using the French language, this
exact error would get sent to standard error and the browser would
crash.
Applying this patch fixed it:
https://bugzilla.gnome.org/show_bug.cgi?id=670586
I believe some
people reported a similar problem on Debian that was fixed with the same
patch.
I have no idea if this would apply to this situation or not. I
just remembered seeing the exact same error message away from Qt.
Karl
On 2013-07-31 10:44, Scott Aron Bloom wrote:
> Ran into a weird
situation.. I have to allow my customer to set the System Codec so when
they load a file, it loads correctly.
>
> However, in QA'ing the code,
certain Text Codecs are causing a crash in QMessageBox (and presumably
other widgets).
>
> 6 int main( int argc, char ** argv )
>
> 7 {
>
> 8 QApplication appl( argc, argv );
>
> 9 QString codecName =
"UTF-8";
>
> 10 if ( argc > 1 )
>
> 11 codecName = argv[ 1 ];
>
>
12
>
> 13 QTextCodec * codec = QTextCodec::codecForName(
codecName.toAscii() );
>
> 14 if ( !codec )
>
> 15 {
>
> 16
QMessageBox::warning( NULL, argv[ 0 ], QString( "%1 not found" ).arg(
codecName ) );
>
> 17 return 1;
>
> 18 }
>
> 19
>
> 20
QTextCodec::setCodecForLocale( codec );
>
> 21 QMessageBox::warning(
NULL, argv[ 0 ], codecName );
>
> 22 return 0;
>
> 23 }
>
> When
called with UTF-32 I get the following crash:
>
> [scott at localhost
build]$ ./CodecTest UTF-32
>
> **
>
>
GConf:ERROR:gconf-client.c:2021:gconf_client_lookup: assertion failed:
(last_slash != NULL)
>
> Aborted (core dumped)
>
> This is with Qt
4.7.4.
>
> Any Ideas?
>
> Thanks
>
> Scott
>
>
_______________________________________________
> Interest mailing
list
> Interest at qt-project.org
>
http://lists.qt-project.org/mailman/listinfo/interest [1]
Links:
------
[1]
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130731/6489c526/attachment.html>
More information about the Interest
mailing list