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 672293 - Trying to add a new language: crash while typing in the search field before the language list is completely populated
Trying to add a new language: crash while typing in the search field before t...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
3.3.x
Other Linux
: Normal critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-17 13:07 UTC by Volker Sobek (weld)
Modified: 2012-03-27 11:54 UTC
See Also:
GNOME target: 3.4
GNOME version: ---


Attachments
possible patch (3.96 KB, patch)
2012-03-19 11:22 UTC, Matthias Clasen
committed Details | Review
common: Fix crash when filtering language list (1.08 KB, patch)
2012-03-27 11:47 UTC, Bastien Nocera
committed Details | Review

Description Volker Sobek (weld) 2012-03-17 13:07:28 UTC
To reproduce go to 'region and language' -> language -> + -> start typing in search input while the list is still being populated.

Also crashes for 'region and language' -> format -> + -> start typing...

control-center-3.3.91-1.fc17.x86_64

Also happening on Fedora 16, downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=752806

warning: core file may not match specified executable file.
[New LWP 10344]
[New LWP 10346]
[New LWP 10347]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: "/var/cache/abrt-di/usr/lib/debug/usr/lib64/libicudata.so.48.1.1.debug": separate debug info file has no debug info
Core was generated by `gnome-control-center --overview'.
Program terminated with signal 11, Segmentation fault.

Thread 1 (Thread 0x7f081082a980 (LWP 10344))

  • #0 __strstr_sse2
    at ../string/strstr.c line 63
  • #1 filter_languages
    at cc-language-chooser.c line 251
  • #2 gtk_tree_model_filter_real_visible
    at gtktreemodelfilter.c line 1258
  • #3 gtk_tree_model_filter_visible
    at gtktreemodelfilter.c line 1288
  • #4 gtk_tree_model_filter_row_inserted
    at gtktreemodelfilter.c line 2275
  • #5 g_closure_invoke
    at gclosure.c line 777
  • #6 signal_emit_unlocked_R
    at gsignal.c line 3547
  • #7 g_signal_emit_valist
    at gsignal.c line 3295
  • #8 g_signal_emit
    at gsignal.c line 3352
  • #9 gtk_tree_model_row_inserted
    at gtktreemodel.c line 1821
  • #10 gtk_list_store_insert
    at gtkliststore.c line 1297
  • #11 gtk_list_store_append
    at gtkliststore.c line 1414
  • #12 add_one_language
    at cc-common-language.c line 275
  • #13 gdk_threads_dispatch
    at gdk.c line 763
  • #14 g_main_dispatch
    at gmain.c line 2510
  • #15 g_main_context_dispatch
    at gmain.c line 3047
  • #16 g_main_context_iterate
    at gmain.c line 3118
  • #17 g_main_context_iteration
    at gmain.c line 3179
  • #18 g_application_run
    at gapplication.c line 1496
  • #19 main
    at control-center.c line 207

Comment 1 Matthias Clasen 2012-03-19 11:22:54 UTC
Created attachment 210080 [details] [review]
possible patch

Here is a patch that should fix this issue.
Comment 2 Richard Hughes 2012-03-19 14:36:07 UTC
Looks good to me, Frank, can you retest with this patch applied please. Thanks.
Comment 3 Volker Sobek (weld) 2012-03-20 18:39:58 UTC
(In reply to comment #2)
> Looks good to me, Frank, can you retest with this patch applied please. Thanks.

Sorry, I can't test the patch right now because parts of my jhbuild are broken, still searching for the cause.
Comment 4 Volker Sobek (weld) 2012-03-27 00:02:40 UTC
Applied the patch on top of a7aa5f0c77277b9317cd77fbb832152920a9403e, working for me, no more crashes for both cases (language and format tab).
Comment 5 Bastien Nocera 2012-03-27 11:47:23 UTC
Created attachment 210688 [details] [review]
common: Fix crash when filtering language list

And it's still being populated. If the list gets filtered
while it's being populated, we would end up with a row with NULL
data, causing us to crash.

Make sure to hold the GDK threads lock when reading from the list,
to avoid racing with the insert code.

http://bugzilla.gnome.org/show_bug.cgi?id=672293
Comment 6 Bastien Nocera 2012-03-27 11:53:48 UTC
Comment on attachment 210080 [details] [review]
possible patch

I've applied this patch as an optimisation. It wouldn't fix the bug, as the insertions are still done in the same way, without any locks held.