Bug 168922 - crash at startup when language set to Chinese
Summary: crash at startup when language set to Chinese
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdecore (show other bugs)
Version: 4.1
Platform: FreeBSD Ports FreeBSD
: NOR crash
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 17:43 UTC by Henry Hu
Modified: 2017-02-25 23:22 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2008-08-11 17:43:48 UTC
Version:            (using KDE 4.1.0)
Installed from:    FreeBSD Ports
Compiler:          gcc version 4.2.1 20070719  [FreeBSD]  
OS:                FreeBSD

My GUI language is set to Chinese Simplified, and ksysguard crash at startup.
If I set it to English, then it starts up normally.
If I set it to English, start it, and set the application language to Chinese, it runs normally till I close it. If I start it again, it would crash.
I found that the fnames in frame #9 maybe incorrect, the sender initialized a List and appended a jsString into it, and the jsString is constructed from a QString, containing "kdelibs4", as I observed from its member d.
Here's the log and the gdb log.

Application: System Monitor (ksysguard),Signal SIGSEGV
[New Thread 0x8103100 (LWP 100125)]
[Switching to Thread 0x8103100 (LWP 100125)]
[KCrash handler]
#6  0x2a85306e in memcpy () from /lib/libc.so.7
#7  0x29903a95 in QString::QString () from /usr/local/lib/qt4/libQtCore.so.4
#8  0x2f7bd7d0 in KJS::UString::qstring (this=0xbfbfcbc0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:245
#9  0x2f7c07ac in Scriptface::loadf (this=0x2f8b1560, exec=0x8169c0c, 
    fnames=@0xbfbfcc6c)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:826
#10 0x2f7c128a in KTranscriptImp::loadModules (this=0x8350520, 
    mods=@0x815a598, error=@0xbfbfceac)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:629
#11 0x2f7c1e9d in KTranscriptImp::eval (this=0x8350520, argv=@0xbfbfcf20, 
    lang=@0xbfbfd124, lscr=@0xbfbfd11c, msgctxt=@0xbfbfceb4, 
    dynctxt=@0x83062fc, msgid=@0xbfbfceb0, subs=@0x83062e0, vals=@0x83062e4, 
    final=@0xbfbfd0d8, mods=@0x815a598, error=@0xbfbfceac, 
    fallback=@0xbfbfcf3a)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:487
#12 0x28c9dbd6 in KLocalizedStringPrivate::resolveInterpolation (
    this=0x83062e0, strans=@0xbfbfd108, pos=0, lang=@0xbfbfd124, 
    lscr=@0xbfbfd11c, final=@0xbfbfd0d8, result=@0xbfbfcfa8, 
    fallback=@0xbfbfcfbb)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:681
#13 0x28c9e07c in KLocalizedStringPrivate::substituteTranscript (
    this=0x83062e0, strans=@0xbfbfd108, lang=@0xbfbfd124, lscr=@0xbfbfd11c, 
    final=@0xbfbfd0d8, fallback=@0xbfbfd148)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:509
#14 0x28c9ed3a in KLocalizedStringPrivate::toString (this=0x83062e0, 
    locale=0x8108c18)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:296
#15 0x28c9f124 in KLocalizedString::toString (this=0xbfbfd1a0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:200
#16 0x28755659 in i18nc<QString> (
    ctxt=0x28953454 "@action:intoolbar Text label of toolbar button", 
    text=0x2892d97b "%1", a1=@0xbfbfd274) at klocalizedstring.h:748
#17 0x288e324a in KToolBar::eventFilter (this=0x8284660, watched=0x8284b60, 
    event=0xbfbfd630)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/widgets/ktoolbar.cpp:1289
#18 0x2999b941 in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/local/lib/qt4/libQtCore.so.4
#19 0x29f0f2a3 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#20 0x29f15d8a in QApplication::notify ()
   from /usr/local/lib/qt4/libQtGui.so.4
#21 0x287e5ab3 in KApplication::notify (this=0x8109380, receiver=0x8284b60, 
    event=0xbfbfd630)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/kernel/kapplication.cpp:311
#22 0x2999b4d9 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/qt4/libQtCore.so.4
#23 0x29f5b202 in QWidgetPrivate::setEnabled_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#24 0x29f5b341 in QWidget::setEnabled () from /usr/local/lib/qt4/libQtGui.so.4
#25 0x2a2c9041 in QToolButton::setDefaultAction ()
   from /usr/local/lib/qt4/libQtGui.so.4
#26 0x2a2c9437 in QToolButton::actionEvent ()
   from /usr/local/lib/qt4/libQtGui.so.4
#27 0x29f5a0ab in QWidget::event () from /usr/local/lib/qt4/libQtGui.so.4
#28 0x2a20629f in QAbstractButton::event ()
   from /usr/local/lib/qt4/libQtGui.so.4
#29 0x2a2c7504 in QToolButton::event () from /usr/local/lib/qt4/libQtGui.so.4
#30 0x29f0f2cc in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#31 0x29f15d8a in QApplication::notify ()
   from /usr/local/lib/qt4/libQtGui.so.4
#32 0x287e5ab3 in KApplication::notify (this=0x8109380, receiver=0x8284b60, 
    event=0xbfbfda68)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/kernel/kapplication.cpp:311
#33 0x2999b4d9 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/qt4/libQtCore.so.4
#34 0x29f09954 in QActionPrivate::sendDataChanged ()
   from /usr/local/lib/qt4/libQtGui.so.4
#35 0x29f09b8c in QAction::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#36 0x280e6abc in TopLevel::currentTabChanged (this=0x81acf40, index=0)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/ksysguard/gui/ksysguard.cc:175
#37 0x280e6d59 in TopLevel::qt_metacall (this=0x818c040, 
    _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbfbfdbec)
    at ksysguard.moc:101
#38 0x299ababc in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#39 0x299abef2 in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#40 0x2a2b1103 in QTabWidget::currentChanged ()
   from /usr/local/lib/qt4/libQtGui.so.4
#41 0x2a2b3274 in QTabWidgetPrivate::_q_showTab ()
   from /usr/local/lib/qt4/libQtGui.so.4
#42 0x2a2b34c5 in QTabWidget::qt_metacall ()
   from /usr/local/lib/qt4/libQtGui.so.4
#43 0x288d925a in KTabWidget::qt_metacall (this=0x825f700, 
    _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbfbfdd7c)
    at ktabwidget.moc:121
#44 0x280df6aa in Workspace::qt_metacall (this=0x825f700, 
    _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbfbfdd7c)
    at Workspace.moc:83
#45 0x299ababc in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#46 0x299abef2 in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#47 0x2a2ab843 in QTabBar::currentChanged ()
   from /usr/local/lib/qt4/libQtGui.so.4
#48 0x2a2acbba in QTabBar::setCurrentIndex ()
   from /usr/local/lib/qt4/libQtGui.so.4
#49 0x2a2b0a56 in QTabBar::insertTab () from /usr/local/lib/qt4/libQtGui.so.4
#50 0x2a2b2a27 in QTabWidget::insertTab ()
   from /usr/local/lib/qt4/libQtGui.so.4
#51 0x2a2b2aa9 in QTabWidget::insertTab ()
   from /usr/local/lib/qt4/libQtGui.so.4
#52 0x280de22d in Workspace::restoreWorkSheet (this=0x825f700, 
    fileName=@0xbfbfe004, switchToTab=false)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/ksysguard/gui/Workspace.cc:288
#53 0x280dfb36 in Workspace::readProperties (this=0x825f700, cfg=@0xbfbfe1a8)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/ksysguard/gui/Workspace.cc:85
#54 0x280e6274 in TopLevel::readProperties (this=0x818c040, cfg=@0xbfbfe1a8)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/ksysguard/gui/ksysguard.cc:396
#55 0x280e8d46 in kdemain (argc=1, argv=0xbfbfe310)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/ksysguard/gui/ksysguard.cc:576
#56 0x08048832 in main (argc=)
    at /usr/ports/x11/kdebase4-workspace/work/kdebase-workspace-4.1.0/build/ksysguard/gui/ksysguard_dummy.cpp:3

(gdb) frame 4                                       
#4  0x2f7c128a in KTranscriptImp::loadModules (this=0x83303a0, mods=@0x815a598, 
    error=@0xbfbfd2cc)                                                          
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:629                                                                                
629             m_sface[mlang]->loadf(exec, alist);                                  
(gdb) l                                                                              
624             // Load the module.                                                  
625             ExecState *exec = m_sface[mlang]->jsi->globalExec();                 
626             List alist;                                                          
627             alist.append(jsString(fname));                                       
628                                                                                  
629             m_sface[mlang]->loadf(exec, alist);                                  
630                                                                                  
631             // Handle any exception.                                             
632             if (exec->hadException())                                            
633             {                                                                    
(gdb) p fname                                                                        
$1 = {static null = {<No data fields>}, static shared_null = {ref = {                
      _q_value = 3861}, alloc = 0, size = 0, data = 0x29a3499a, clean = 0,
    simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 67}, alloc = 0,
    size = 0, data = 0x29a349ae, clean = 0, simpletext = 0, righttoleft = 0,
    asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x82ffac0,
  static codecForCStrings = 0x0}
(gdb) p &fname
$2 = (QString *) 0xbfbfd094
(gdb) p fname
$3 = {static null = {<No data fields>}, static shared_null = {ref = {
      _q_value = 3861}, alloc = 0, size = 0, data = 0x29a3499a, clean = 0,
    simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0,
    array = {0}}, static shared_empty = {ref = {_q_value = 67}, alloc = 0,
    size = 0, data = 0x29a349ae, clean = 0, simpletext = 0, righttoleft = 0,
    asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x82ffac0,
  static codecForCStrings = 0x0}
(gdb) p fname->d
$4 = (QString::Data *) 0x82ffac0
(gdb) p fname->d->array[0]
$6 = 107
(gdb) p fname->d->array[1]
$7 = 100
(gdb) p fname->d->array[2]
$8 = 101
(gdb) p fname->d->array[3]
$9 = 108
...
(gdb) p fname->d->array[7]
$10 = 52
(gdb) p fname->d->array[8]
$11 = 0
(gdb)

And the values inside fname:
Breakpoint 1, Scriptface::loadf (this=0x2f8b1560, exec=0x816980c, 
    fnames=@0xbfbfd08c)                                           
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:826                                                                                
826             QString qfname = fnames[i]->getString().qstring();                   
(gdb) s                                                                              
KJS::List::operator[] (this=0xbfbfd08c, i=0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/list.h:122                     
122             JSValue *operator[](int i) const { return at(i); }                   
(gdb) s                                                                              
KJS::JSValue::getString (this=0x2f8b15a0)                                            
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/value.h:398                    
398     inline UString JSValue::getString() const                                    
(gdb) s                                                                              
400         return JSImmediate::isImmediate(this) ? UString() : asCell()->getString();                                                                                    
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0x2f8b15a0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:77               
77              return getTag(v) != 0;                                               
(gdb) s                                                                              
KJS::JSImmediate::getTag (v=0x2f8b15a0)                                              
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:155              
155         static ALWAYS_INLINE uintptr_t getTag(const JSValue* v)                  
(gdb) s                                                                              
158         }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::getTag (v=0x2f8b15a0)                                              
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:155              
155         static ALWAYS_INLINE uintptr_t getTag(const JSValue* v)                  
(gdb) s                                                                              
158         }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0x2f8b15a0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:78               
78          }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0xbfbfcfe0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:77               
77              return getTag(v) != 0;                                               
(gdb) s                                                                              
78          }                                                                        
(gdb) s                                                                              
KJS::JSValue::asCell (this=0x2f8b15a0)                                               
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/value.h:322                    
322     ALWAYS_INLINE const JSCell* JSValue::asCell() const                          
(gdb) s                                                                              
324         ASSERT(!JSImmediate::isImmediate(this));                                 
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0x2f8b15a0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:77               
77              return getTag(v) != 0;                                               
(gdb) s                                                                              
KJS::JSImmediate::getTag (v=0x2f8b15a0)                                              
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:155              
155         static ALWAYS_INLINE uintptr_t getTag(const JSValue* v)                  
(gdb) s                                                                              
158         }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::getTag (v=0x2f8b15a0)                                              
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:155              
155         static ALWAYS_INLINE uintptr_t getTag(const JSValue* v)                  
(gdb) s                                                                              
158         }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0x2f8b15a0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:78               
78          }                                                                        
(gdb) s                                                                              
KJS::JSImmediate::isImmediate (v=0x2f8b15a0)                                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/JSImmediate.h:77               
77              return getTag(v) != 0;                                               
(gdb) s                                                                              
78          }                                                                        
(gdb) s                                                                              
KJS::JSValue::asCell (this=0x2f8b15a0)                                               
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/value.h:326                    
326     }                                                                            
(gdb) s                                                                              
KJS::JSValue::getString (this=0x2f8b15a0)                                            
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/value.h:401                    
401     }                                                                            
(gdb) s                                                                              
KJS::UString::qstring (this=0xbfbfcfe0)                                              
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:243                                                                                
243     QString UString::qstring() const                                             
(gdb) s                                                                              
245         return QString((QChar*) data(), size());                                 
(gdb) s                                                                              
KJS::UString::size (this=0xbfbfcfe0)                                                 
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:356                  
356         int size() const { return m_rep->size(); }                               
(gdb) s                                                                              
WTF::RefPtr<KJS::UString::Rep>::operator-> (this=0xbfbfcfe0)                         
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/wtf/RefPtr.h:61                
61              ALWAYS_INLINE T* operator->() const { return m_ptr; }                
(gdb) s                                                                              
0x2f7c3111 in KJS::UString::size (this=0xbfbfcfe0)                                   
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:356                  
356         int size() const { return m_rep->size(); }                               
(gdb) s                                                                              
KJS::UString::Rep::size (this=0x82ffa90)                                             
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:154                  
154           int size() const { return len; }                                       
(gdb) s                                                                              
154           int size() const { return len; }                                       
(gdb) s
KJS::UString::data (this=0xbfbfcfe0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:336
336         const UChar* data() const { return m_rep->data(); }
(gdb) s
WTF::RefPtr<KJS::UString::Rep>::operator-> (this=0xbfbfcfe0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/wtf/RefPtr.h:61
61              ALWAYS_INLINE T* operator->() const { return m_ptr; }
(gdb) s
0x2f7c3131 in KJS::UString::data (this=0xbfbfcfe0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:336
336         const UChar* data() const { return m_rep->data(); }
(gdb) s
KJS::UString::Rep::data (this=0x82ffa90)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kjs/ustring.h:153
153           UChar* data() const { return baseString->buf + baseString->preCapacity+ offset; }
(gdb) p baseString->buf
$13 = (KJS::UChar *) 0x8
(gdb) p baseString->preCapacity
$14 = 0
(gdb) p baseString->offset
$15 = 0
(gdb) s
153           UChar* data() const { return baseString->buf + baseString->preCapacity+ offset; }
(gdb) p baseString->buf
$16 = (KJS::UChar *) 0x8
(gdb) p baseString->preCapacity
$17 = 0
(gdb) p baseString->offset
$18 = 0
(gdb) s

Program received signal SIGSEGV, Segmentation fault.
0x2a85306e in memcpy () from /lib/libc.so.7
(gdb)
Comment 1 John Tapsell 2008-08-11 17:56:51 UTC
Henry,

 Thank you very much for such a detailed bug report. If only all bug
reports were this useful :-)

  I think that this isn't really a ksysguard problem, but a
translation problem.  I have notified the appropriate people and they
should be able to have a look at it soon.

Thanks!
Comment 2 Maksim Orlovich 2008-08-11 21:29:24 UTC
The problem is near certainly that QtWebKit built on FBSD is exporting symbols in the KJS namespace, causing a mis-match of UString implementations (and of a lot of other stuff)... Which brings in two questions:

1) Why the heck is KSysguard linking to that anyway?
2) Why whatever Qt's build system is doing to control exports isn't working on FBSD.

Comment 3 Albert Astals Cid 2008-08-11 22:28:20 UTC
1) Because it uses Transcipt (Scripted traslations) that uses KJS
2) No idea
Comment 4 Henry Hu 2008-08-12 06:06:19 UTC
Today, I ran superkaramba, and the same crash happened when clicking "Open" in the main window.

I found that something related to the problem. I msgunfmt'ed kdelibs4.mo, and found the context in the trace log. The translation result of "%1" here is "%1|/|$[~stripAccel %1]", if I change this to "%1", the trace log changes, and if I change another translation at line 1845, also translates "%1" into "%1|/|$[~stripAccel %1]", and msgfmt the result and copy it back, it doesn't crash.

So it's something related to kdelibs, it's not related to the applications.

Trace Log:
Application:SuperKaramba (superkaramba),Signal SIGSEGV
[New Thread 0x8103100 (LWP 100196)]
[Switching to Thread 0x8103100 (LWP 100196)]
[KCrash handler]
#6  0x2a07806e in memcpy () from /lib/libc.so.7
#7  0x28caea95 in QString::QString () from /usr/local/lib/qt4/libQtCore.so.4
#8  0x302067d0 in KJS::UString::qstring (this=0xbfbfca60)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:245
#9  0x302097ac in Scriptface::loadf (this=0x302f1560, exec=0x8449c0c, 
    fnames=@0xbfbfcb0c)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:826
#10 0x3020a28a in KTranscriptImp::loadModules (this=0x84b11c0, 
    mods=@0x815b5f8, error=@0xbfbfcd4c)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:629
#11 0x3020ae9d in KTranscriptImp::eval (this=0x84b11c0, argv=@0xbfbfcdc0, 
    lang=@0xbfbfcfc4, lscr=@0xbfbfcfbc, msgctxt=@0xbfbfcd54, 
    dynctxt=@0x84a850c, msgid=@0xbfbfcd50, subs=@0x84a84f0, vals=@0x84a84f4, 
    final=@0xbfbfcf78, mods=@0x815b5f8, error=@0xbfbfcd4c, 
    fallback=@0xbfbfcdda)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/ktranscript.cpp:487
#12 0x28aa7bd6 in KLocalizedStringPrivate::resolveInterpolation (
    this=0x84a84f0, strans=@0xbfbfcfa8, pos=0, lang=@0xbfbfcfc4, 
    lscr=@0xbfbfcfbc, final=@0xbfbfcf78, result=@0xbfbfce48, 
    fallback=@0xbfbfce5b)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:681
#13 0x28aa807c in KLocalizedStringPrivate::substituteTranscript (
    this=0x84a84f0, strans=@0xbfbfcfa8, lang=@0xbfbfcfc4, lscr=@0xbfbfcfbc, 
    final=@0xbfbfcf78, fallback=@0xbfbfcfe8)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:509
#14 0x28aa8d3a in KLocalizedStringPrivate::toString (this=0x84a84f0, 
    locale=0x810aba8)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:296
#15 0x28aa9124 in KLocalizedString::toString (this=0xbfbfd040)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdecore/localization/klocalizedstring.cpp:200
#16 0x2855f659 in i18nc<QString> (
    ctxt=0x2875d454 "@action:intoolbar Text label of toolbar button", 
    text=0x2873797b "%1", a1=@0xbfbfd114) at klocalizedstring.h:748
#17 0x286ed24a in KToolBar::eventFilter (this=0x8285ba0, watched=0x82999a0, 
    event=0xbfbfd4c0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/widgets/ktoolbar.cpp:1289
#18 0x28d46941 in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/local/lib/qt4/libQtCore.so.4
#19 0x294662a3 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#20 0x2946cd8a in QApplication::notify ()
   from /usr/local/lib/qt4/libQtGui.so.4
#21 0x285efab3 in KApplication::notify (this=0xbfbfe5f0, receiver=0x82999a0, 
    event=0xbfbfd4c0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/kernel/kapplication.cpp:311
#22 0x28d464d9 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/qt4/libQtCore.so.4
#23 0x294b4f3b in QWidgetPrivate::show_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#24 0x294b4c11 in QWidgetPrivate::show_recursive ()
   from /usr/local/lib/qt4/libQtGui.so.4
#25 0x294b4d99 in QWidgetPrivate::showChildren ()
   from /usr/local/lib/qt4/libQtGui.so.4
#26 0x294b4e51 in QWidgetPrivate::show_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#27 0x294b537e in QWidget::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#28 0x294b4dd0 in QWidgetPrivate::showChildren ()
   from /usr/local/lib/qt4/libQtGui.so.4
#29 0x294b4e51 in QWidgetPrivate::show_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#30 0x294b537e in QWidget::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#31 0x294b4dd0 in QWidgetPrivate::showChildren ()
   from /usr/local/lib/qt4/libQtGui.so.4
#32 0x294b4e51 in QWidgetPrivate::show_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#33 0x294b537e in QWidget::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#34 0x29865416 in QDialog::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#35 0x298647fe in QDialog::exec () from /usr/local/lib/qt4/libQtGui.so.4
#36 0x2824483c in KFileDialog::getOpenFileNames (startDir=@0xbfbfd8c8, 
    filter=@0xbfbfd8e4, parent=0x82621a0, caption=@0xbfbfd8e0)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kio/kfile/kfiledialog.cpp:458
#37 0x0805a01c in ThemesDlg::openLocalTheme (this=0x82621a0)
    at /usr/ports/misc/kdeutils4/work/kdeutils-4.1.0/superkaramba/src/themesdlg.cpp:194
#38 0x08057618 in ThemesDlg::qt_metacall (this=0x82621a0, 
    _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfbfda0c)
    at themesdlg.moc:81
#39 0x28d56abc in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#40 0x28d56e00 in QMetaObject::activate ()
   from /usr/local/lib/qt4/libQtCore.so.4
#41 0x299b7f31 in QAbstractButton::clicked ()
   from /usr/local/lib/qt4/libQtGui.so.4
#42 0x2975cc39 in QAbstractButtonPrivate::emitClicked ()
   from /usr/local/lib/qt4/libQtGui.so.4
#43 0x2975dee0 in QAbstractButtonPrivate::click ()
   from /usr/local/lib/qt4/libQtGui.so.4
#44 0x2975e10b in QAbstractButton::mouseReleaseEvent ()
   from /usr/local/lib/qt4/libQtGui.so.4
#45 0x294b1129 in QWidget::event () from /usr/local/lib/qt4/libQtGui.so.4
#46 0x2975d29f in QAbstractButton::event ()
   from /usr/local/lib/qt4/libQtGui.so.4
#47 0x297ef1b2 in QPushButton::event () from /usr/local/lib/qt4/libQtGui.so.4
#48 0x294662cc in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/qt4/libQtGui.so.4
#49 0x2946d232 in QApplication::notify ()
   from /usr/local/lib/qt4/libQtGui.so.4
#50 0x285efab3 in KApplication::notify (this=0xbfbfe5f0, receiver=0x8277760, 
    event=0xbfbfdee4)
    at /usr/ports/x11/kdelibs4/work/kdelibs-4.1.0/kdeui/kernel/kapplication.cpp:311
#51 0x28d464d9 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/qt4/libQtCore.so.4
#52 0x2946c940 in QApplicationPrivate::sendMouseEvent ()
   from /usr/local/lib/qt4/libQtGui.so.4
#53 0x294c7a70 in QETWidget::translateMouseEvent ()
   from /usr/local/lib/qt4/libQtGui.so.4
#54 0x294c713a in QApplication::x11ProcessEvent ()
   from /usr/local/lib/qt4/libQtGui.so.4
#55 0x294ec074 in x11EventSourceDispatch ()
   from /usr/local/lib/qt4/libQtGui.so.4
#56 0x2a2141d6 in g_main_context_dispatch ()
   from /usr/local/lib/libglib-2.0.so.0
#57 0x2a217572 in g_main_context_check () from /usr/local/lib/libglib-2.0.so.0
#58 0x2a217af5 in g_main_context_iteration ()
   from /usr/local/lib/libglib-2.0.so.0
#59 0x28d6d58e in QEventDispatcherGlib::processEvents ()
   from /usr/local/lib/qt4/libQtCore.so.4
#60 0x294ebd25 in QGuiEventDispatcherGlib::processEvents ()
   from /usr/local/lib/qt4/libQtGui.so.4
#61 0x28d45653 in QEventLoop::processEvents ()
   from /usr/local/lib/qt4/libQtCore.so.4
#62 0x28d457e1 in QEventLoop::exec () from /usr/local/lib/qt4/libQtCore.so.4
#63 0x28d479ca in QCoreApplication::exec ()
   from /usr/local/lib/qt4/libQtCore.so.4
#64 0x29465867 in QApplication::exec () from /usr/local/lib/qt4/libQtGui.so.4
#65 0x08053535 in main (argc=1, argv=0xbfbfe760)
    at /usr/ports/misc/kdeutils4/work/kdeutils-4.1.0/superkaramba/src/main.cpp:134
Comment 5 Chusslove Illich 2008-08-12 12:52:56 UTC
After talking with Maksim, it would appear that this is only one manifestation of a deeper underlying problem, a clash with QtWebKit; just happened to raise its head here.

> [: Henry Hu :]
> I found that something related to the problem. I msgunfmt'ed kdelibs4.mo [...] %1|/|$[~stripAccel %1]", if I change this to "%1" [...] it doesn't crash.

By this you have prevented invocation of KJS paths for the translation, at the cost of introducing some raw edges in translation. E.g. for zh_CN you'll get accelerator markers in toolbar icon texts, like "关闭(C)", where they have no function. But, this would just postpone the problem to some other place where KJS is used.

At any rate, if you would disable scripted translations entirely until the problem is resolved, in kdelibs/kdecore/localization/klocale.cpp you can replace the line:

  readConfigEntry("Transcript", true, useTranscript);

with:

  useTranscript = false;
Comment 6 Dario Andres 2008-12-04 19:09:06 UTC
May this be related to bug 169910 ? (similar backtrace , KJS::UString::qstring , transcript )
Comment 7 John Tapsell 2008-12-06 10:58:22 UTC
I can't produce in KDE4.1, Linux, Ubuntu.
Comment 8 Dario Andres 2009-02-07 00:11:10 UTC
Have you experienced this bug again using a recent KDE (4.1.4 / 4.2.0 / 4.2svn / 4.3svn) ? Thanks :)
Comment 9 Henry Hu 2009-02-08 06:35:34 UTC
I'm waiting for KDE 4.2.0 to enter the ports, and I would report the result when it's done.
Comment 10 Henry Hu 2009-02-12 11:20:04 UTC
I'm sorry that the bug happened again. The stack trace looks the same... But now since 4.2.0 is a stable branch, the ports system does not include the symbols...

(gdb) bt
#0  0x29bab3de in memcpy () from /lib/libc.so.7
#1  0x29077945 in QString::QString () from /usr/local/lib/qt4/libQtCore.so.4
#2  0x2d42673f in KJS::UString::qstring () from /usr/local/kde4/lib/kde4/ktranscript.so
#3  0x2d42f2b8 in Scriptface::loadf () from /usr/local/kde4/lib/kde4/ktranscript.so
#4  0x2d430026 in KTranscriptImp::loadModules () from /usr/local/kde4/lib/kde4/ktranscript.so
#5  0x2d4306f1 in KTranscriptImp::eval () from /usr/local/kde4/lib/kde4/ktranscript.so
#6  0x28e460c8 in KLocalizedStringPrivate::resolveInterpolation () from /usr/local/kde4/lib/libkdecore.so.7
#7  0x28e4638f in KLocalizedStringPrivate::substituteTranscript () from /usr/local/kde4/lib/libkdecore.so.7
#8  0x28e47063 in KLocalizedStringPrivate::toString () from /usr/local/kde4/lib/libkdecore.so.7
#9  0x28e475c4 in KLocalizedString::toString () from /usr/local/kde4/lib/libkdecore.so.7
#10 0x28b1e3d5 in KToolBar::eventFilter () from /usr/local/kde4/lib/libkdeui.so.7
#11 0x2910fe31 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/local/lib/qt4/libQtCore.so.4
#12 0x2938d023 in QApplicationPrivate::notify_helper () from /usr/local/lib/qt4/libQtGui.so.4
#13 0x29393b0a in QApplication::notify () from /usr/local/lib/qt4/libQtGui.so.4
#14 0x289e23e3 in KApplication::notify () from /usr/local/kde4/lib/libkdeui.so.7
#15 0x2910f9c9 in QCoreApplication::notifyInternal () from /usr/local/lib/qt4/libQtCore.so.4
#16 0x293da5d2 in QWidgetPrivate::setEnabled_helper () from /usr/local/lib/qt4/libQtGui.so.4
#17 0x293da711 in QWidget::setEnabled () from /usr/local/lib/qt4/libQtGui.so.4
#18 0x29748811 in QToolButton::setDefaultAction () from /usr/local/lib/qt4/libQtGui.so.4
#19 0x29748c07 in QToolButton::actionEvent () from /usr/local/lib/qt4/libQtGui.so.4
#20 0x293d936b in QWidget::event () from /usr/local/lib/qt4/libQtGui.so.4
#21 0x2968542f in QAbstractButton::event () from /usr/local/lib/qt4/libQtGui.so.4
#22 0x29746cd4 in QToolButton::event () from /usr/local/lib/qt4/libQtGui.so.4
#23 0x2938d04c in QApplicationPrivate::notify_helper () from /usr/local/lib/qt4/libQtGui.so.4
#24 0x29393b0a in QApplication::notify () from /usr/local/lib/qt4/libQtGui.so.4
#25 0x289e23e3 in KApplication::notify () from /usr/local/kde4/lib/libkdeui.so.7
#26 0x2910f9c9 in QCoreApplication::notifyInternal () from /usr/local/lib/qt4/libQtCore.so.4
#27 0x293876d4 in QActionPrivate::sendDataChanged () from /usr/local/lib/qt4/libQtGui.so.4
#28 0x2938790c in QAction::setVisible () from /usr/local/lib/qt4/libQtGui.so.4
#29 0x280eff8b in TopLevel::currentTabChanged () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#30 0x280f5db8 in TopLevel::qt_metacall () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#31 0x2911ff6c in QMetaObject::activate () from /usr/local/lib/qt4/libQtCore.so.4
#32 0x291203a2 in QMetaObject::activate () from /usr/local/lib/qt4/libQtCore.so.4
#33 0x297308d3 in QTabWidget::currentChanged () from /usr/local/lib/qt4/libQtGui.so.4
#34 0x29732a44 in QTabWidgetPrivate::_q_showTab () from /usr/local/lib/qt4/libQtGui.so.4
#35 0x29732c95 in QTabWidget::qt_metacall () from /usr/local/lib/qt4/libQtGui.so.4
#36 0x28b1170a in KTabWidget::qt_metacall () from /usr/local/kde4/lib/libkdeui.so.7
#37 0x280eb67a in Workspace::qt_metacall () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#38 0x2911ff6c in QMetaObject::activate () from /usr/local/lib/qt4/libQtCore.so.4
#39 0x291203a2 in QMetaObject::activate () from /usr/local/lib/qt4/libQtCore.so.4
#40 0x2972b003 in QTabBar::currentChanged () from /usr/local/lib/qt4/libQtGui.so.4
#41 0x2972c37a in QTabBar::setCurrentIndex () from /usr/local/lib/qt4/libQtGui.so.4
#42 0x29730226 in QTabBar::insertTab () from /usr/local/lib/qt4/libQtGui.so.4
#43 0x297321f7 in QTabWidget::insertTab () from /usr/local/lib/qt4/libQtGui.so.4
#44 0x29732279 in QTabWidget::insertTab () from /usr/local/lib/qt4/libQtGui.so.4
#45 0x280e90d1 in Workspace::restoreWorkSheet () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#46 0x280e98a9 in Workspace::readProperties () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#47 0x280f140f in TopLevel::readProperties () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#48 0x280f5068 in kdemain () from /usr/local/kde4/lib/libkdeinit4_ksysguard.so
#49 0x08048712 in main ()
(gdb) 
Comment 11 Chusslove Illich 2009-02-12 11:40:33 UTC
The notes above may not have been clear on this: as it stands now, this does not seem to be the problem on KDE side, but on distribution side (see comment #2).

Thus, the proper way to go would be to check out suggestions in #2, and see if it leads to a fix. Perhaps some of pertinent distribution people can be pointed to this bug?

Secondly, to postpone the bug to some other, less serious location, KDE can be compiled as I mentioned in #5 (again, point for distribution packagers).

Thirdly, what I forgot to mention last time, the user can turn off the functionality which causes the bug by adding Transcript=0 in [Locale] section of ~/.kde/share/config/kdeglobals config file. (Of course, this is no real solution, just escape hatch.)
Comment 12 Vikram Dhillon 2010-01-24 00:35:17 UTC
Guys any updates on this one, has it already been fixed, so I can close it. Thanks.
Comment 13 Henry Hu 2017-02-25 23:22:52 UTC
I just checked on KDE 4.14.10 in a FreeBSD 11-STABLE VM. It works well.