Bug 769617

Summary: crash while "Type to seach..." because app->casefolded_exec == NULL
Product: [Fedora] Fedora Reporter: Mark Wielaard <mjw>
Component: gnome-shellAssignee: Owen Taylor <otaylor>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: browning48ky, maxamillion, otaylor, samkraju, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-04 19:10:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Wielaard 2011-12-21 13:36:00 UTC
Description of problem:

If I move my cursor to the top left and start typing to search for an item gnome-shell crashes. I found a core file that shows shell-app.c:1264 trying to do a strstr on app->casefolded_exec which is NULL.

Version-Release number of selected component (if applicable):

gnome-shell-3.2.1-2.fc16.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Move cursor to top-left
2. Type anything
3. Crash
  
Actual results:

Sad gnome computer screen telling me to restart gnome-shell.

Expected results:

gnome-shell displaying some search icons that relate to what I typed.

Additional info:

There is a core file left behind. Examining it with gdb shows that gnome shell tries to do a strstr on app->casefolded_exec which is NULL leading to the crash.

Reading symbols from /usr/bin/gnome-shell...Reading symbols from /usr/lib/debug/usr/bin/gnome-shell.debug...done.
done.
[New LWP 2389]
[New LWP 2396]
[New LWP 2547]
[New LWP 2537]
[New LWP 2398]
[New LWP 2397]
[New LWP 2395]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/gnome-shell'.
Program terminated with signal 11, Segmentation fault.
#0  __strstr_sse42 (s1=0x0, s2=0x3358e10 "sl") at ../sysdeps/x86_64/multiarch/strstr.c:179
179	  if (__builtin_expect (p1[0] == '\0', 0))
(gdb) up
#1  0x00007f008ad80d75 in _shell_app_match_search_terms (terms=<optimized out>, app=0x279cc60 [ShellApp]) at shell-app.c:1264
1264	      p = strstr (app->casefolded_exec, term);
(gdb) list
1259	            current_match = MATCH_PREFIX;
1260	          else
1261	            current_match = MATCH_SUBSTRING;
1262	        }
1263	
1264	      p = strstr (app->casefolded_exec, term);
1265	      if (p != NULL)
1266	        {
1267	          if (p == app->casefolded_exec || *(p - 1) == '-')
1268	            current_match = MATCH_PREFIX;
(gdb) print *app
$1 = {parent = {g_type_instance = {g_class = 0x2795330}, ref_count = 2, qdata = 0x2fca071}, started_on_workspace = 0, state = SHELL_APP_STATE_STOPPED, entry = 0x2794550, 
  running_state = 0x0, window_id_string = 0x0, casefolded_name = 0x3431a60 "nautilus pastebin configurator", name_collation_key = 
    0x27939a0 "QDXWLOXVSDVWHELQFRQILJXUDWRU\001", '\030' <repeats 28 times>, "\001\020\t\t\t\t\t\t\t\020\t\t\t\t\t\t\t\020", '\t' <repeats 11 times>, "\001\tӑ\tӑ", 
  casefolded_description = 0x0, casefolded_exec = 0x0}

Comment 1 Mark Wielaard 2011-12-21 13:40:44 UTC
Found a workaround. Based on the app->casefolded_name I looked for something nautilus and pastebin related. I found nautilus-pastebin-0.5.0-5.fc15.x86_64 installed. After yum removing that package the problem went away and I am a happy gnome-shell user again.

Comment 2 Owen Taylor 2012-01-04 19:10:37 UTC

*** This bug has been marked as a duplicate of bug 741964 ***