software-properties-kde crashes in Turkish locale

Bug #97420 reported by M. Vefa Bicakci
10
Affects Status Importance Assigned to Milestone
python-qt4 (Ubuntu)
Undecided
Unassigned
software-properties (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: software-properties-kde

Running "kdesu software-properties-kde" crashes in Turkish locale. Because adept_manager also calls software-properties-kde, adept_manager cannot manage repositories in Turkish locale. (E.g. When one clicks on "Manage Repositories" in adept_manager in Turkish locale, adept_manager only fetches updates; a repository management window is not shown.)

I believe that this is a critical bug which should be fixed before the official release of Feisty.

System: Kubuntu Feisty with all of the updates as of 2007-03-28.

Note: A similar issue might exist for software-properties-gtk. Because I don't have access to a Ubuntu Feisty system - I use Kubuntu Feisty - I haven't tested software-properties-gtk in Turkish locale yet.

Revision history for this message
M. Vefa Bicakci (mvb) wrote : Output of "kdesu software-properties-kde"
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Does software-properties crash using the following command:

sudo "LANG=C;software-properties-kde"

Changed in language-support-tr:
status: Unconfirmed → Needs Info
Revision history for this message
Jonathan Riddell (jr) wrote :

I can recreate this. It only seems to affect tr_TR.UTF-8 and _CY that I can find. en, fr, zh and C locales are all fine. I can't recreate it with other pyqt4 applications that load .ui files (ubiquity, calculatorform example in pyqt4 package). A bit of a mystery.

Changed in language-support-tr:
status: Needs Info → Confirmed
Revision history for this message
M. Vefa Bicakci (mvb) wrote :

$ LANG=C sudo software-properties-kde

works properly. But

$ LANG=tr_TR.UTF-8 sudo software-properties-kde

doesn't work.

Please see the attachment of the second comment for
the output of software-properties-kde before it crashes.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Hmm, I checked latest .po file from Rosetta and I don't see anything wrong there.

Also, I would like to note that the .ui file strings are being extracted so I guess that would be a problem to get this application full translated. I'm not sure whether QT is finding a translation from other part of the application and it's breaking due that.

In fact, that trace seems to say that it's not able to find a property in one of the ui files 'setproperty'... IT doesn't seem to be related with translations. Not sure why is that with a C locale it doesn't fail though...

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Is this still an issue?

Revision history for this message
M. Vefa Bicakci (mvb) wrote :

Yes, this bug still exists.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Perhaps the priority of this bug should be raised to high.

Michael Vogt (mvo)
Changed in software-properties:
importance: Undecided → High
Revision history for this message
Atilla Öntaş (tarakbumba) wrote :

Still existed in Gutsy tribe 5.However, command "LANG=tr adept-manager" works.

Revision history for this message
M. Vefa Bicakci (mvb) wrote :

Hello,

I have found out why this bug occurs. It is because of the
following part of PyQt4 in

/usr/lib/python2.5/site-packages/PyQt4/uic/properties.py:

line
187 else:
188 getattr(widget, "set%s%s" % (propname[0].upper(), propname[1:]))(
189 self.convert(prop, widget))
190

Everything looks fine. However, notice the usage of "upper()".
One would expect this to work fine in the Turkish locale but
it doesn't. Here's the reason: When a propname whose first
letter is "i" is processed, because of the Turkish locale,
the function "upper()" does not convert it into "I" (the
regular English capital "i") but something else: Idotabove.
(The Turkish capital "i" with a dot on top.)

This bug occurs because there is a propname named "indentation"
in software-properties-kde. (I found about this by inserting
"print(propname);" just before line 188.) When this propname
is processed, Python tries to convert the first letter to
Idotabove but for some reason fails.

When the attached patch is applied, the bug ceases to
exists. However, a better solution would be fix Python
itself so that the Turkish capital "i" with a dot on top
would not affect anything.

I apologize for my English. I am willing to try to
clarify parts of this message which were not well
understood because of my English.

Thank you for attention,

situert

Revision history for this message
M. Vefa Bicakci (mvb) wrote :

The patch file I posted has a problem regarding file paths.
I am attaching another patch without that problem.

To apply this patch, do the following:

cd /
sudo patch < /path/to/patch_file

Revision history for this message
M. Vefa Bicakci (mvb) wrote :

I apologize for messing up twice.

The correct way to apply the second patch is:

cd /usr/lib/python2.5/site-packages/PyQt4/uic
sudo patch < /path/to/patch_file

Revision history for this message
Jonathan Riddell (jr) wrote :

Patch uploaded with python-qt4_4.3-2ubuntu7. Many thanks for the fix.

Changed in software-properties:
status: Confirmed → Fix Released
Changed in python-qt4:
status: New → Fix Released
Revision history for this message
Jonathan Riddell (jr) wrote :

python-qt4 (4.3-2ubuntu7) gutsy; urgency=low

  * Add kubuntu_01_turkish_capital_i.dpatch by Situert, fixes
    crash when loading properties beginning in "i" in Turkish.
    Closes LP: #97420

 -- Jonathan Riddell <email address hidden> Thu, 04 Oct 2007 20:28:04 +0100

Revision history for this message
M. Vefa Bicakci (mvb) wrote :

Hello Mr. Riddell,

I have noticed another usage of .upper() in the same
file. I am attaching another patch which fixes that portion
of the code. Please apply this patch too.

Thank you for your attention,

situert

Revision history for this message
M. Vefa Bicakci (mvb) wrote : Re: [Bug 97420] Re: software-properties-kde crashes in Turkish locale

Hello Mr. Riddell,

I noticed another usage of .upper() in
/usr/lib/python2.5/site-packages/PyQt4/uic/properties.py
and attached to the Launchpad bug report a patch which
fixes that instance of the usage of .upper()

For your convenience, I am attaching the patch
to this e-mail.

Please apply this patch as well.

Thank you for your attention,

situert

--- Jonathan Riddell <email address hidden> wrote:

> python-qt4 (4.3-2ubuntu7) gutsy; urgency=low
>
> * Add kubuntu_01_turkish_capital_i.dpatch by Situert, fixes
> crash when loading properties beginning in "i" in Turkish.
> Closes LP: #97420
>
> -- Jonathan Riddell <email address hidden> Thu, 04 Oct 2007 20:28:04
> +0100
>
> --
> software-properties-kde crashes in Turkish locale
> https://bugs.launchpad.net/bugs/97420
> You received this bug notification because you are a direct subscriber
> of the bug.
>

      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers