Bug 14920

Summary: pk-import-desktop crashes when argc=1
Product: PackageKit Reporter: Debarshi Ray <rishi.is>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed fix
Debarshi's (rishi) pubic SSH key

Description Debarshi Ray 2008-03-09 09:43:50 UTC
When run without specifying any command line parameters, pk-import-desktop crashes with a SIGSEGV.

[rishi@ginger ~]$ gdb /usr/bin/pk-import-desktop
[...]
PackageName:    gnome-session   [ vi si lt ar nl_NL hi am hr uk_UA es_DO is nso it_CH bn_IN sq_AL zu bn it_IT be es_MX nb xh es_HN gl cs ru af_ZA nb_NO pl_PL ko_KR zh_TW zh_HK bs fa es_ES th mg da sr bg eu_ES uk hy or es_CO sr@latin de_AT es_AR pa eu fa_IR sv_SE tr_TR sl fi de_DE hu_HU dz az_IR es_PR hr_HR lv nn cs_CZ zh_CN es_CR de_CH sr@Latn mi es_EC ja af ko sv es_VE de el_GR es_SV et he_IL pt_PT nl_BE mn pt_BR az tr et_EE it te ga ja_JP ml mr mk ta es_PE id ru_RU es_UY kn es_NI es sq am_ET sl_SI he ne nl eo ka be@latin es_CL pl sk hu sr@latn cy es_PA es_GT ku sr@ije tk gu pt ro ms el (null)[New Thread 46912496320320 (LWP 29645)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496320320 (LWP 29645)]
pk_extra_set_locale (extra=0x61b1e0, locale=0x0) at pk-extra.c:90
90                      if (extra->priv->locale_base[i] == '_') {
(gdb) bt
#0  pk_extra_set_locale (extra=0x61b1e0, locale=0x0) at pk-extra.c:90
#1  0x0000000000401a23 in main (argc=1, argv=0x7fff77db5338)
    at pk-import-desktop.c:130
#2  0x000000391d21e2b4 in __libc_start_main () from /lib64/libc.so.6
#3  0x0000000000401469 in _start ()

Installed packages:
gnome-packagekit-0.1.9-1.fc9
PackageKit-0.1.9-1.fc9
PackageKit-debuginfo-0.1.9-1.fc9
PackageKit-libs-0.1.9-1.fc9
yum-3.2.8-2.fc8
Comment 1 Debarshi Ray 2008-03-09 09:48:54 UTC
Created attachment 14979 [details] [review]
Proposed fix

The attached patch fixes the problem for me. Is it the correct approach?
Comment 2 Richard Hughes 2008-03-09 11:57:22 UTC
Fix looks great. If you send me (or attach to this bug) your chosen username and public ssh key I'll give you commit on the server. I trust you :-)

Richard.
Comment 3 Debarshi Ray 2008-03-09 23:49:08 UTC
Created attachment 14996 [details]
Debarshi's (rishi) pubic SSH key
Comment 4 Debarshi Ray 2008-03-09 23:50:19 UTC
(In reply to comment #2)

> Fix looks great. If you send me (or attach to this bug) your chosen username
> and public ssh key I'll give you commit on the server. I trust you :-)

Username: rishi
Key: <attached>

Thank you.
Comment 5 Richard Hughes 2008-03-10 02:21:27 UTC
You should have an email soon with instructions on how to access the development server. Thanks!
Comment 6 Debarshi Ray 2008-03-10 13:19:30 UTC
(In reply to comment #2)
> Fix looks great. If you send me (or attach to this bug) your chosen username
> and public ssh key I'll give you commit on the server. I trust you :-)

Committed and pushed to upstream as '9cd8995f50190e5d9b4a67500d9dbcbed6fcf703'.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.