Mac Dashboard "Unit Converter" Malfunctioning

isgoed

macrumors 6502
Original poster
Jun 5, 2003
328
0
My unit converter in the dashboard is malfunctioning. It only appears with all fields blank. It then uses 100% cpu-power of one processor and stays this way forever.

When I shark it I see that it spent all its time in libicucore.A.dylib
Code:
# Report 0 - Session 1 - Time Profile of DashboardClient
SharkProfileViewer
# Generated from the visible portion of the outline view
- 21.5% u_charDigitValue (libicucore.A.dylib)
- 21.4% icu::UnicodeString::doCompare(int, int, unsigned short const*, int, int) const (libicucore.A.dylib)
- 20.0% icu::DecimalFormat::subparse(icu::UnicodeString const&, icu::ParsePosition&, icu::DigitList&, signed char*, unsigned short*) const (libicucore.A.dylib)
- 15.9% 0x909f0b2e [118B] (libicucore.A.dylib)
- 14.2% 0x909f090e [147B] (libicucore.A.dylib)
- 5.5% icu::NumberFormat::isGroupingUsed() const (libicucore.A.dylib)
- 1.5% 0x909eb31e [20.9KB] (libicucore.A.dylib)
The code tree looks like this (see attached text file)
(basically a NSURL call which calls khtml, which calls KJS (JavaScript?).)

edit: I reported a bug to apple. And instead of Apple's "unit converter" I now use "Currency Converter". Currencies were the most important anyway.
 

Attachments

isgoed

macrumors 6502
Original poster
Jun 5, 2003
328
0
mad jew said:
Did you try trashing the preference file (widget-com.apple.widget.unitconverter.plist) because mine works normally. :)
That file doesn't even exist. I guess the widget doesn't even manage to start up properly.
 

mad jew

Moderator emeritus
Apr 3, 2004
32,199
6
Adelaide, Australia
Depending on your version of OSX, widget may not necessarily be written at the start. In other words, it may show up as simply com.apple.widget.unitconverter.plist but if neither of these files are present, then I dunno what's wrong. A reinstall of a combo update may remedy it if you can be bothered. A system file may be missing.
 

isgoed

macrumors 6502
Original poster
Jun 5, 2003
328
0
mad jew said:
Depending on your version of OSX, widget may not necessarily be written at the start. In other words, it may show up as simply com.apple.widget.unitconverter.plist but if neither of these files are present, then I dunno what's wrong. A reinstall of a combo update may remedy it if you can be bothered. A system file may be missing.
I did a spotlight search for unitconverter: no luck (Of course I also looked in the Preferences folder myself). And I cannot be bothered to do an OS install for a widget. I just wait and see if the regular OS updates will fix it. If they don't I just keep the widget disabled.
 

isgoed

macrumors 6502
Original poster
Jun 5, 2003
328
0
Problem Solved

I solved this problem when working on a solution for another problem. Funnily I found my own thread (this one you are reading now ;)) when I was looking for a solution on Google by using the search term "libicucore".
 

esj102780

macrumors newbie
Feb 27, 2009
2
0
Is this the Safari 4 beta-related problem?

I recently installed Safari 4 beta and the currency part of my unit converter widget started acting up. I've found in some forums that other people have experienced the same problem. I've sent a bug report to apple, but I wanted to check if you guys had some input on this.
 

isgoed

macrumors 6502
Original poster
Jun 5, 2003
328
0
I recently installed Safari 4 beta and the currency part of my unit converter widget started acting up. I've found in some forums that other people have experienced the same problem. I've sent a bug report to apple, but I wanted to check if you guys had some input on this.
I think that the real problem is caused by using a custom notation for numbers and valuta's. I am in europe, but I like to write my decimals with a "." instead of a ",". In the Leopard OS it seems that you can't configure this any more (you can in Panther 10.3). I was still able to change it with some terminal commands I found on the internet. Just check if changing your notation to the default US/English fixes it.
 

usediv

macrumors newbie
Mar 22, 2009
3
0
I'm pretty certain it is the beta version of Safari 4 that's the problem. Mine was working fine until I installed it. Now US Dollars are in different locations on the list and I can't get any consistent conversions.
 

usediv

macrumors newbie
Mar 22, 2009
3
0
It seems like because USD has been shifted from the top of the list on the right to further down (where the other 'u's are), everything is one space out now. So Australian dollars is correct on the list on the left but to get USD on the right you have to select Australian dollars.
 

Sun Baked

macrumors G5
May 19, 2002
14,874
57
I'm pretty certain it is the beta version of Safari 4 that's the problem. Mine was working fine until I installed it. Now US Dollars are in different locations on the list and I can't get any consistent conversions.
I know the US dollar tanked, but mine reports $100 USD are worth less that 2 pounds.
 

RoninXI

macrumors regular
Jun 5, 2006
141
0
Vermilion, Ohio
It has to do with Safari 4 I found a fix and it worked for me.

http://www.macosxhints.com/article.php?story=20090225162441861

To fix this problem, make a copy of /Library/Widgets/Unit Converter.wdgt on your Desktop, Control-click on it and choose Show Package Contents from the pop-up menu, then open the UnitConverter.js file in a text editor. Search for "USD" (with the quotes). There should be only one matching line:

if (a.iso == "USD") return -1;
Delete this line. Then, delete the else at the start of the next line, i.e. change the line from this...
else if (a.name < b.name) return -1;
...to this...
if (a.name < b.name) return -1;