Bug 285611 - Lokalize crashes applying TM to XLIFF
Summary: Lokalize crashes applying TM to XLIFF
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 01:31 UTC by Andrew Mason
Modified: 2011-11-25 21:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mason 2011-11-03 01:31:26 UTC
Application: lokalize (1.2)
KDE Platform Version: 4.7.2 (4.7.2)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-12-generic-pae i686
Distribution: Ubuntu 11.10

-- Information about the crash:
- What I was doing when the application crashed:
I was editing an XLIFF file. Lokalize provided a TM suggestion for one of the translation units that I was editing. I pressed ctrl+1 to select the first translation. The appliction then crashed

This only seems to occur in situations where there is a { } (inline element) present in the source translation unit.



- Unusual behavior I noticed:

This is the output from the CLI 

okalize(31296) adaptCatalogString: HERE "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>. 
Comencé en marzo del 2008, y ahora a casi dos años y 22 piezas acuñadas de 
oro puro suizo, me encuentro fervientemente involucrado en lo que es el muy 
popular y poderoso MLM." 
lokalize(31296) adaptCatalogString: inserting "strong-8" 6 0 
lokalize(31296) adaptCatalogString: HERE 0 "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>. 
Comencé en marzo del 2008, y ahora a casi dos años y 22 piezas acuñadas de 
oro puro suizo, me encuentro fervientemente involucrado en lo que es el muy 
popular y poderoso MLM." 
lokalize(31296) adaptCatalogString: HERE 1 "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>. 
Comencé en marzo del 2008, y ahora a casi dos años y 22 piezas acuñadas de 
oro puro suizo, me encuentro fervientemente involucrado en lo que es el muy 
popular y poderoso MLM." 
lokalize(31296) adaptCatalogString: HERE 2 "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>. 
Comencé en marzo del 2008, y ahora a casi dos años y 22 piezas acuñadas de 
oro puro suizo, me encuentro fervientemente involucrado en lo que es el muy 
popular y poderoso MLM." 
lokalize(31296) TM::TMView::slotUseSuggestion: 1 "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>. 
Comencé en marzo del 2008, y ahora a casi dos años y 22 piezas acuñadas de 
oro puro suizo, me encuentro fervientemente involucrado en lo que es el muy 
popular y poderoso MLM." 
lokalize(31296) insertCatalogString: TAGRANGE_IMAGE_SYMBOL 68 
lokalize(31296) XliffStorage::targetInsert: 2 "Estoy muy orgulloso de ser un asociado de <strong>younique™</strong>" 
lokalize(31296) XliffStorage::targetInsert: 2 "" 
lokalize(31296) XliffStorage::targetInsert: 2 "" 
lokalize(31296) insertCatalogString: posToTag.value(i) 0 0 
KCrash: Application 'lokalize' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/amason/.kde/socket-dcam/kdeinit4__0

[1]+  Stopped                 lokalize
amason@dcam:~/projects/youniquewealth.com-locale$ QSocketNotifier: Invalid socket 13 and type 'Read', disabling...
QSocketNotifier: Invalid socket 26 and type 'Read', disabling...
QSocketNotifier: Invalid socket 11 and type 'Read', disabling...

The crash can be reproduced every time.

-- Backtrace:
Application: Lokalize (lokalize), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4bf2710 (LWP 31296))]

Thread 7 (Thread 0xb25b5b70 (LWP 31298)):
#0  0xb5303d44 in __pthread_mutex_unlock_usercnt (mutex=0x99ffed4, decr=1) at pthread_mutex_unlock.c:52
#1  0xb5d08f54 in pthread_mutex_unlock (mutex=0x99ffed4) at forward.c:184
#2  0xb51a520b in g_main_context_release () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb51a6906 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb51a6c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb606cb37 in QEventDispatcherGlib::processEvents (this=0x99ffe50, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0xb603d1dd in QEventLoop::processEvents (this=0xb25b52b0, flags=...) at kernel/qeventloop.cpp:149
#7  0xb603d421 in QEventLoop::exec (this=0xb25b52b0, flags=...) at kernel/qeventloop.cpp:201
#8  0xb5f4090b in QThread::exec (this=0x95d0270) at thread/qthread.cpp:498
#9  0xb601de2d in QInotifyFileSystemWatcherEngine::run (this=0x95d0270) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb5f437b3 in QThreadPrivate::start (arg=0x95d0270) at thread/qthread_unix.cpp:331
#11 0xb5300d31 in start_thread (arg=0xb25b5b70) at pthread_create.c:304
#12 0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 6 (Thread 0xb1d92b70 (LWP 31299)):
#0  0xb7896424 in __kernel_vsyscall ()
#1  0xb5304a5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb5d08cfc in __pthread_cond_wait (cond=0x9b503b8, mutex=0x9b503a0) at forward.c:139
#3  0xb5f43cc0 in wait (time=4294967295, this=0x9b503a0) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x9b50060, mutex=0x9b5005c, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0xb6847d7b in QFileInfoGatherer::run (this=0x9b50054) at dialogs/qfileinfogatherer.cpp:214
#6  0xb5f437b3 in QThreadPrivate::start (arg=0x9b50054) at thread/qthread_unix.cpp:331
#7  0xb5300d31 in start_thread (arg=0xb1d92b70) at pthread_create.c:304
#8  0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 5 (Thread 0xb1591b70 (LWP 31300)):
#0  0xb51a57a1 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0xb51a6637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb51a6c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb606cb37 in QEventDispatcherGlib::processEvents (this=0x9b37c50, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0xb603d1dd in QEventLoop::processEvents (this=0xb15912b0, flags=...) at kernel/qeventloop.cpp:149
#5  0xb603d421 in QEventLoop::exec (this=0xb15912b0, flags=...) at kernel/qeventloop.cpp:201
#6  0xb5f4090b in QThread::exec (this=0x9b4fd10) at thread/qthread.cpp:498
#7  0xb601de2d in QInotifyFileSystemWatcherEngine::run (this=0x9b4fd10) at io/qfilesystemwatcher_inotify.cpp:248
#8  0xb5f437b3 in QThreadPrivate::start (arg=0x9b4fd10) at thread/qthread_unix.cpp:331
#9  0xb5300d31 in start_thread (arg=0xb1591b70) at pthread_create.c:304
#10 0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 4 (Thread 0xb0d90b70 (LWP 31301)):
#0  0xb7896424 in __kernel_vsyscall ()
#1  0xb5304a5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb5d08cfc in __pthread_cond_wait (cond=0x9622788, mutex=0x9622770) at forward.c:139
#3  0xb5f43cc0 in wait (time=4294967295, this=0x9622770) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x9622690, mutex=0x96211a8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0xb7061406 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x9622678, th=0x9b60278) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0xb7063ecb in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x9621340, th=0x9b60278) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0xb706103a in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x9622678, th=0x9b60278) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0xb7063fcc in ThreadWeaver::WorkingHardState::applyForWork (this=0x9621340, th=0x9b60278) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0xb7060f93 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9622678, th=0x9b60278, previous=0xa237f28) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0xb7062b14 in ThreadWeaver::ThreadRunHelper::run (this=0xb0d90314, parent=0x9622678, th=0x9b60278) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0xb7062bca in ThreadWeaver::Thread::run (this=0x9b60278) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0xb5f437b3 in QThreadPrivate::start (arg=0x9b60278) at thread/qthread_unix.cpp:331
#13 0xb5300d31 in start_thread (arg=0xb0d90b70) at pthread_create.c:304
#14 0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 3 (Thread 0xafaa7b70 (LWP 31302)):
#0  0xb7896424 in __kernel_vsyscall ()
#1  0xb5304a5c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb5d08cfc in __pthread_cond_wait (cond=0x9643f60, mutex=0x9643f48) at forward.c:139
#3  0xb5f43cc0 in wait (time=4294967295, this=0x9643f48) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0x9643e68, mutex=0x96440c8, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0xb7061406 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x9643e50, th=0x96fe098) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#6  0xb7063ecb in ThreadWeaver::WorkingHardState::waitForAvailableJob (this=0x9644188, th=0x96fe098) at ../../../threadweaver/Weaver/WorkingHardState.cpp:80
#7  0xb706103a in ThreadWeaver::WeaverImpl::waitForAvailableJob (this=0x9643e50, th=0x96fe098) at ../../../threadweaver/Weaver/WeaverImpl.cpp:356
#8  0xb7063fcc in ThreadWeaver::WorkingHardState::applyForWork (this=0x9644188, th=0x96fe098) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#9  0xb7060f93 in ThreadWeaver::WeaverImpl::applyForWork (this=0x9643e50, th=0x96fe098, previous=0xa0a01a8) at ../../../threadweaver/Weaver/WeaverImpl.cpp:351
#10 0xb7062b14 in ThreadWeaver::ThreadRunHelper::run (this=0xafaa7314, parent=0x9643e50, th=0x96fe098) at ../../../threadweaver/Weaver/Thread.cpp:87
#11 0xb7062bca in ThreadWeaver::Thread::run (this=0x96fe098) at ../../../threadweaver/Weaver/Thread.cpp:142
#12 0xb5f437b3 in QThreadPrivate::start (arg=0x96fe098) at thread/qthread_unix.cpp:331
#13 0xb5300d31 in start_thread (arg=0xafaa7b70) at pthread_create.c:304
#14 0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 2 (Thread 0xaf0ffb70 (LWP 31303)):
#0  0xb501dd10 in __GI_clock_gettime (clock_id=1, tp=0xaf0ff028) at ../sysdeps/unix/clock_gettime.c:116
#1  0xb5f9a7d5 in do_gettime (frac=0xaf0ff020, sec=0xaf0ff018) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0xb606d4b6 in QTimerInfoList::updateCurrentTime (this=0x9b30f9c) at kernel/qeventdispatcher_unix.cpp:339
#4  0xb606d80a in QTimerInfoList::timerWait (this=0x9b30f9c, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0xb606c053 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xaf0ff12c) at kernel/qeventdispatcher_glib.cpp:136
#6  0xb606c0ed in timerSourcePrepare (source=0x9b30f68, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#7  0xb51a588c in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb51a6637 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb51a6c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb606cb37 in QEventDispatcherGlib::processEvents (this=0x9b0a570, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#11 0xb603d1dd in QEventLoop::processEvents (this=0xaf0ff2b0, flags=...) at kernel/qeventloop.cpp:149
#12 0xb603d421 in QEventLoop::exec (this=0xaf0ff2b0, flags=...) at kernel/qeventloop.cpp:201
#13 0xb5f4090b in QThread::exec (this=0x9d2ee18) at thread/qthread.cpp:498
#14 0xb601de2d in QInotifyFileSystemWatcherEngine::run (this=0x9d2ee18) at io/qfilesystemwatcher_inotify.cpp:248
#15 0xb5f437b3 in QThreadPrivate::start (arg=0x9d2ee18) at thread/qthread_unix.cpp:331
#16 0xb5300d31 in start_thread (arg=0xaf0ffb70) at pthread_create.c:304
#17 0xb5cfb0ce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Backtrace stopped: Not enough registers or memory available to unwind further

Thread 1 (Thread 0xb4bf2710 (LWP 31296)):
[KCrash Handler]
#7  InlineTag (this=0xbfa9575c) at /home/amason/projects/kdesdk/lokalize/src/catalog/catalogstring.h:44
#8  insertCatalogString (catalog=0x9b1c030, pos=..., catStr=..., start=0) at /home/amason/projects/kdesdk/lokalize/src/catalog/cmd.cpp:436
#9  0x080e77ba in TM::TMView::slotUseSuggestion (this=0x9f91c98, i=0) at /home/amason/projects/kdesdk/lokalize/src/tm/tmview.cpp:1004
#10 0x080eb63d in TM::TMView::qt_metacall (this=0x9f91c98, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0xbfa95968) at /home/amason/projects/kdesdk/build/lokalize/src/tmview.moc:105
#11 0xb6044b7d in metacall (argv=0xbfa95968, idx=40, cl=QMetaObject::InvokeMetaMethod, object=0x9f91c98) at kernel/qmetaobject.cpp:237
#12 QMetaObject::metacall (object=0x9f91c98, cl=QMetaObject::InvokeMetaMethod, idx=40, argv=0xbfa95968) at kernel/qmetaobject.cpp:232
#13 0xb6053a6a in QMetaObject::activate (sender=0x9e61530, m=0xb61741b8, local_signal_index=0, argv=0xbfa95968) at kernel/qobject.cpp:3278
#14 0xb6059b15 in QSignalMapper::mapped (this=0x9e61530, _t1=0) at .moc/release-shared/moc_qsignalmapper.cpp:101
#15 0xb6059c62 in QSignalMapper::map (this=0x9e61530, sender=0x9e489c8) at kernel/qsignalmapper.cpp:266
#16 0xb6059e1e in QSignalMapper::map (this=0x9e61530) at kernel/qsignalmapper.cpp:257
#17 0xb6059f50 in QSignalMapper::qt_metacall (this=0x9e61530, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfa95af8) at .moc/release-shared/moc_qsignalmapper.cpp:87
#18 0xb6044b7d in metacall (argv=0xbfa95af8, idx=8, cl=QMetaObject::InvokeMetaMethod, object=0x9e61530) at kernel/qmetaobject.cpp:237
#19 QMetaObject::metacall (object=0x9e61530, cl=QMetaObject::InvokeMetaMethod, idx=8, argv=0xbfa95af8) at kernel/qmetaobject.cpp:232
#20 0xb6053a6a in QMetaObject::activate (sender=0x9e489c8, m=0xb6c1a458, local_signal_index=1, argv=0xbfa95af8) at kernel/qobject.cpp:3278
#21 0xb62ca83d in QAction::triggered (this=0x9e489c8, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#22 0xb62caadb in QAction::activate (this=0x9e489c8, event=QAction::Trigger) at kernel/qaction.cpp:1257
#23 0xb62cac70 in QAction::event (this=0x818a5e8, e=0x0) at kernel/qaction.cpp:1183
#24 0xb715320f in KAction::event (this=0x9e489c8, event=0xbfa95ec8) at ../../kdeui/actions/kaction.cpp:131
#25 0xb62d1d54 in notify_helper (e=0xbfa95ec8, receiver=0x9e489c8, this=0x9520c10) at kernel/qapplication.cpp:4486
#26 QApplicationPrivate::notify_helper (this=0x9520c10, receiver=0x9e489c8, e=0xbfa95ec8) at kernel/qapplication.cpp:4458
#27 0xb62d7103 in QApplication::notify (this=0xbfa95ec8, receiver=0x9e489c8, e=0xbfa95ec8) at kernel/qapplication.cpp:3886
#28 0xb7255681 in KApplication::notify (this=0xbfa96b84, receiver=0x9e489c8, event=0xbfa95ec8) at ../../kdeui/kernel/kapplication.cpp:311
#29 0xb603e19e in QCoreApplication::notifyInternal (this=0xbfa96b84, receiver=0x9e489c8, event=0xbfa95ec8) at kernel/qcoreapplication.cpp:787
#30 0xb630a597 in sendEvent (event=0xbfa95ec8, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#31 QShortcutMap::dispatchEvent (this=0x9520cbc, e=0xbfa961f4) at kernel/qshortcutmap.cpp:879
#32 0xb630bb75 in QShortcutMap::tryShortcutEvent (this=0x9520cbc, o=0x9fd63b0, e=0xbfa961f4) at kernel/qshortcutmap.cpp:364
#33 0xb62d90ea in QApplication::notify (this=0x9fd63b0, receiver=0x9fd63b0, e=0xbfa961f4) at kernel/qapplication.cpp:3928
#34 0xb7255681 in KApplication::notify (this=0xbfa96b84, receiver=0x9fd63b0, event=0xbfa961f4) at ../../kdeui/kernel/kapplication.cpp:311
#35 0xb603e19e in QCoreApplication::notifyInternal (this=0xbfa96b84, receiver=0x9fd63b0, event=0xbfa961f4) at kernel/qcoreapplication.cpp:787
#36 0xb62cfb6d in sendSpontaneousEvent (event=0xbfa961f4, receiver=0x9fd63b0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#37 qt_sendSpontaneousEvent (receiver=0x9fd63b0, event=0xbfa961f4) at kernel/qapplication.cpp:5480
#38 0xb63858b1 in QKeyMapper::sendKeyEvent (keyWidget=0x9fd63b0, grab=false, type=QEvent::KeyPress, code=49, modifiers=..., text=..., autorepeat=false, count=-1079418380, nativeScanCode=135833064, nativeVirtualKey=135833064, nativeModifiers=135833064) at kernel/qkeymapper_x11.cpp:1866
#39 0xb6385d55 in QKeyMapperPrivate::translateKeyEvent (this=0x954bdf0, keyWidget=0x9fd63b0, event=0xbfa967dc, grab=false) at kernel/qkeymapper_x11.cpp:1836
#40 0xb635d9f5 in QApplication::x11ProcessEvent (this=0xbfa96b84, event=0xbfa967dc) at kernel/qapplication_x11.cpp:3583
#41 0xb638a24c in x11EventSourceDispatch (s=0x9521ca8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#42 0xb51a625f in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#43 0xb51a6990 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#44 0xb51a6c2a in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#45 0xb606cada in QEventDispatcherGlib::processEvents (this=0x94ff248, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#46 0xb6389e3a in QGuiEventDispatcherGlib::processEvents (this=0x94ff248, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#47 0xb603d1dd in QEventLoop::processEvents (this=0xbfa96ae4, flags=...) at kernel/qeventloop.cpp:149
#48 0xb603d421 in QEventLoop::exec (this=0xbfa96ae4, flags=...) at kernel/qeventloop.cpp:201
#49 0xb604219d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#50 0xb62cf8f4 in QApplication::exec () at kernel/qapplication.cpp:3760
#51 0x08071f6b in main (argc=) at /home/amason/projects/kdesdk/lokalize/src/main.cpp:123

Reported using DrKonqi
Comment 1 Nick Shaforostoff 2011-11-25 21:53:16 UTC
SVN commit 1265781 by shaforo:

BUG: 285611 

add a check for cases when markup elemets in TM suggestion and <source> differ.

thank you for reporting the crash, Andrew!
Please fell free to reopen this bug or fill another ones if new issues are coming ;)



 M  +3 -0      cmd.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1265781