Bug 254092 - Translatoid widget doesn't work since either KDE 4.5 or QT 4.7 (json_parser - syntax error found, forcing abort )
Summary: Translatoid widget doesn't work since either KDE 4.5 or QT 4.7 (json_parser -...
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 21:38 UTC by mps
Modified: 2010-11-27 13:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
plasma-windowed dict (37.14 KB, image/png)
2010-10-14 14:42 UTC, Hans-Rudi Denzler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mps 2010-10-13 21:38:51 UTC
Version:           unspecified (using KDE 4.5.2) 
OS:                Linux

Using KDE 4.5.2 (and I think since 4.5 beta, though I updated to QT 4.7 at the same time, so could be that) translatoid widget does not work. Type in word in English, press 'Translate', the 'waiting' symbol appears, then nothing. No error, nothing. Google translate via my web browser works fine.

No idea how to debug this (how do you run a widget from the command line?)

Reproducible: Always
Comment 1 mps 2010-10-13 21:39:43 UTC
PS No 'widget-translatoid' option on BZ, so putting in plasma-general, sorry.
Comment 2 Hans-Rudi Denzler 2010-10-14 14:42:20 UTC
Created attachment 52508 [details]
plasma-windowed dict

plasmoidviewer --list | grep dict
Comment 3 Anne-Marie Mahfouf 2010-10-14 15:56:22 UTC
(In reply to comment #2)
> Created an attachment (id=52508) [details]
> plasma-windowed dict
> 
> plasmoidviewer --list | grep dict

Hans-Rudi, this has nothing to do with current bug report. Please do not pollute bug reports with other problems. Open a new bug report instead.
Comment 4 mps 2010-10-14 17:29:07 UTC
Thanks for the tip. Below is the command line out put when I run it windowed. The last line appears after I type in a word and press enter.

[user@localhost ~]$ plasma-windowed translatoid
QMetaObject::invokeMethod: No such method PlasmaApp::loadCommandLineOptionsForNewInstance()
plasma-windowed(14572)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasma-windowed(14572)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
Couldn't find node center. Skipping rendering.
plasma-windowed(14572)/libplasma Plasma::AppletPrivate::mainConfigGroup: requesting config for "Translator" without a containment! 
plasma-windowed(14572)/libplasma Plasma::Applet::itemChange: Configuration object was requested prior to init(), which is too early. Please fix this item: QGraphicsItem(0) Plasma::Containment (this = 0x16c6010 , parent = 0x0 , pos = QPointF(0, 0) , z = 0 , flags =  ( ItemIsFocusable | ItemUsesExtendedStyleOption | ItemSendsGeometryChanges ) ) "Translator" 
Couldn't find node center. Skipping rendering.
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
json_parser - syntax error found,  forcing abort
Comment 5 Anne-Marie Mahfouf 2010-10-18 13:04:22 UTC
mps: what QJson version do you have installed?
Comment 6 mps 2010-10-18 13:11:32 UTC
[root@localhost ~]# yum -C list installed | grep -i json
json-glib.x86_64                    0.10.4-1.fc13              @fedora          
python-simplejson.x86_64            2.1.1-1.fc13               @updates         
qjson.x86_64                        0.7.1-2.fc13               @updates
Comment 7 Anne-Marie Mahfouf 2010-10-18 13:36:48 UTC
It works for me on trunk (32 bit installation, git master QJson self-compiled and translatoid applet self-compiled) using Qt 4.7
It seems that either you have a QJson installation problem (indicated by the error
"json_parser - syntax error found,  forcing abort"
Does the above error appear before you enter any word?
Comment 8 mps 2010-10-18 13:55:43 UTC
No, it only appears after typing something and pressing 'translate' or 'Enter'.
Comment 9 Anne-Marie Mahfouf 2010-10-18 14:03:36 UTC
From what language to what language?

Can you type
plasmoidviewer translatoid
in a terminal, set the first language to French, the second to English, enter the word "chien" in the French field then press "Translate" and paste the whole terminal output from there.

Thanks in advance.
Comment 10 mps 2010-10-18 14:26:32 UTC
This is what I get when doing exactly as you request. However if I switch languages and try to translate 'chien' from english to french, I get the json error. I don't get that (I just get nothing) if I try to translate 'dog' from english to french.

[user@localhost ~]$ plasmoidviewer translatoid
plasmoidviewer(8738)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(8738)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(8738)/libplasma Plasma::AppletPrivate::mainConfigGroup: requesting config for "Translator" without a containment! 
plasmoidviewer(8738)/libplasma Plasma::Applet::itemChange: Configuration object was requested prior to init(), which is too early. Please fix this item: QGraphicsItem(0) Plasma::Containment (this = 0x1075cc0 , parent = 0x0 , pos = QPointF(0, 0) , z = 0 , flags =  ( ItemIsFocusable | ItemUsesExtendedStyleOption | ItemSendsGeometryChanges ) ) "Translator" 
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
Comment 11 Anne-Marie Mahfouf 2010-10-18 14:50:26 UTC
Can you run
kdebugdialog
and click on select all?

You will need kdelibs debug package installed to get more info. You need to see something like
"plasmoidviewer(13104) KTranslatoid::translate: Starting translation."
in the terminal. Stick with French to English at first. 

Last question: does the Dictionary plasmoid works (enter the word "flower" for example)?
Comment 12 mps 2010-10-18 15:02:48 UTC
The dictionary works fine. Below is the debug output from translatoid. Many thanks for your help.
M.


$ plasmoidviewer translatoid

plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Opening cache "/var/tmp/kdecache-malc/icon-cache.kcache" page size is 4096
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Attached to cache, determining if it must be initialized
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Cache fully initialized -- attached to memory mapping
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: 4194304 bytes available out of 10485760
plasmoidviewer(9188)/plasma main: setting FormFactor to "planar"
plasmoidviewer(9188)/plasma main: setting Location to "floating"
plasmoidviewer(9188)/plasma main: setting containment to "null"
plasmoidviewer(9188)/plasma main: setting auth policy
plasmoidviewer(9188)/libplasma Plasma::Corona::Corona: !!{} STARTUP TIME 50337852 Corona ctor start
plasmoidviewer(9188)/plasma main: just load applet
plasmoidviewer(9188)/plasma FullView::addApplet: adding applet "translatoid" in "null"
plasmoidviewer(9188)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from  "/var/tmp/kdecache-malc/ksycoca4"
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Opening cache "/var/tmp/kdecache-malc/plasma_theme_Fragile.kcache" page size is 4096
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Attached to cache, determining if it must be initialized
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Cache fully initialized -- attached to memory mapping
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: 83419136 bytes available out of 83886080
plasmoidviewer(9188)/kio (KDirWatch) KDirWatchPrivate::KDirWatchPrivate: Available methods:  ("Stat", "FAM", "INotify")
plasmoidviewer(9188)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/home/malc/.kde/share/config/plasmarc" for "" ["KDirWatch-1"]
plasmoidviewer(9188)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(9188)/libplasma Plasma::AppletPrivate::init: Check your constructor!  You probably want to be passing in a Service::Ptr  or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(9188)/libplasma Plasma::Containment::restore: ()
plasmoidviewer(9188)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0) 
plasmoidviewer(9188)/libplasma Plasma::AppletPrivate::mainConfigGroup: requesting config for "Translator" without a containment! 
plasmoidviewer(9188)/libplasma Plasma::ExtenderItemPrivate::themeChanged:
plasmoidviewer(9188)/libplasma Plasma::ExtenderItemPrivate::themeChanged:
plasmoidviewer(9188)/libplasma Plasma::ExtenderItemPrivate::themeChanged:
plasmoidviewer(9188)/libplasma Plasma::ExtenderItemPrivate::themeChanged:
plasmoidviewer(9188)/libplasma Plasma::Applet::itemChange: Configuration object was requested prior to init(), which is too early. Please fix this item: QGraphicsItem(0) Plasma::Containment (this = 0x23388d0 , parent = 0x0 , pos = QPointF(0, 0) , z = 0 , flags =  ( ItemIsFocusable | ItemUsesExtendedStyleOption | ItemSendsGeometryChanges ) ) "Translator" 
plasmoidviewer(9188)/libplasma Plasma::ContainmentPrivate::appletAppeared: 127 0
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
plasmoidviewer(9188)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x26a3b10)
plasmoidviewer(9188)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "http"
plasmoidviewer(9188)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 20 m_maxConnectionsPerHost: 5
plasmoidviewer(9188)/kio (Slave) KIO::Slave::createSlave: createSlave "http" for KUrl("http://www.google.com/translate_a/t")
plasmoidviewer(9188)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-malc/plasmoidviewerdu9188.slave-socket"
plasmoidviewer(9188)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9188)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("http://www.google.com/translate_a/t")
plasmoidviewer(9188)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x26a3b10) KIO::Slave(0x252fb60)
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipAboutToShow()
plasmoidviewer(9188)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x25e6700)
plasmoidviewer(9188)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("http://www.google.com/translate_a/t")
plasmoidviewer(9188)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x25e6700) KIO::Slave(0x252fb60)
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()

FYI the debugs I have installed:

akonadi-debuginfo.x86_64            1.4.0-0.2.fc13             @kde-testing     
amarok-debuginfo.x86_64             2.3.2-3.fc13               @kde-testing     
attica-debuginfo.x86_64             0.1.4-1.fc13               @kde-unstable    
dbusmenu-qt-debuginfo.x86_64        0.6.3-1.fc13               @kde-testing     
kdebase-debuginfo.x86_64            6:4.5.2-1.fc13.2           @kde-testing     
kdebase-runtime-debuginfo.x86_64    4.5.2-0.1.fc13             @kde-testing     
kdebase-workspace-debuginfo.x86_64  4.5.2-0.1.fc13             @kde-testing     
kdeedu-debuginfo.x86_64             4.5.2-0.2.fc13             @kde-testing     
kdegraphics-debuginfo.x86_64        7:4.5.2-0.2.fc13           @kde-testing     
kdelibs-debuginfo.x86_64            6:4.5.2-0.5.fc13           @kde-testing     
kdepim-debuginfo.x86_64             6:4.4.6-3.fc13             @updates-testing-debuginfo
kdepimlibs-debuginfo.x86_64         4.5.2-0.1.fc13             @kde-testing     
kdeutils-debuginfo.x86_64           6:4.5.2-0.1.fc13           @kde-testing     
phonon-backend-vlc-debuginfo.x86_64 0.2.0-2.20100909.fc13      @kde-unstable    
phonon-debuginfo.x86_64             4.4.3-0.1.20100909.fc13    @kde-unstable    
qt-debuginfo.x86_64                 1:4.7.0-5.fc13             @kde-unstable    
soprano-debuginfo.x86_64            2.5.2-0.1.fc13             @kde-testing     
strigi-debuginfo.x86_64             0.7.2-5.fc13               @kde-testing     
webkitkde-debuginfo.x86_64          0.0.5-0.2.svn1088283.fc13  @fedora-debuginfo
Comment 13 Anne-Marie Mahfouf 2010-10-18 15:22:58 UTC
You also need translatoid-debuginfo as there seems nothing wrong from connecting to the Google website.
Comment 14 mps 2010-10-18 15:38:52 UTC
Ah yes, that would help...

Here you go. Seems to be getting the response ok...

plasmoidviewer(9890) KTranslatoid::translate: Starting translation.
plasmoidviewer(9890)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x16c9160)
plasmoidviewer(9890)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "http"
plasmoidviewer(9890)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 20 m_maxConnectionsPerHost: 5
plasmoidviewer(9890) KTranslatoid::translate: Request started
plasmoidviewer(9890) KTranslatoid::translate: "text=chien&client=t&sl=fr&tl=en"
plasmoidviewer(9890)/kio (Slave) KIO::Slave::createSlave: createSlave "http" for KUrl("http://www.google.com/translate_a/t")
plasmoidviewer(9890)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-malc/plasmoidvieweroO9890.slave-socket"
QMetaObject::invokeMethod: No such method KTranslatoid::toolTipHidden()
plasmoidviewer(9890)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
plasmoidviewer(9890) KTranslatoid::httpDataReceived: got data for KIO::TransferJob(0x16c9160) KIO::TransferJob(0x16c9160) "[[["dog","chien",""]],[["noun",["dog","hound","cock","hanger"]]],"fr"]"
plasmoidviewer(9890) KTranslatoid::httpDataReceived: got data for KIO::TransferJob(0x16c9160) KIO::TransferJob(0x16c9160) ""
plasmoidviewer(9890)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("http://www.google.com/translate_a/t")
plasmoidviewer(9890)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x16c9160) KIO::Slave(0x12ed7f0)
Comment 15 Anne-Marie Mahfouf 2010-10-18 17:33:48 UTC
Then for some reason this data is not displayed, the applet is not refreshed. I don't think I can debug further...
Comment 16 mps 2010-11-27 13:55:07 UTC
Works again in 4.6 beta 1