[Gammaray-interest] Gui missing half of the tools
Volker Krause
volker.krause at kdab.com
Wed May 8 09:05:07 CEST 2019
On Wednesday, 8 May 2019 05:42:55 CEST Christian Gagneraud wrote:
> Hi Volker,
>
> Thanks for all the tips, they were all very helpful indeed. I had to
> use "strace -eopen" to fully understand the problem.
>
> My problem was that
> /usr/bin/..//lib/gammaray/2.10/qt5_12-arm/gammaray_probe.so was a link
> to /usr/lib/gammaray_probe.so (as required b/c of caps).
> We use link b/c we do not want wasting the NAND flash.
> This prevented the plugin loading, linking the 2 the other way around
> did the trick.
> This works for a simple app (now the probes find and load the plugins)
> and it seems to work as well for our setcap binary too (weird, i
> thought ld required that the preload is not a link...).
>
> Might have to update the docs.
Ah, that might explain why the plugins aren't found (but not why this broke
due to an update). Locating any needed files is done relative to the location
of GammaRay (not sure from the top of my head whether that's the probe or one
of the DLLs), see selflocator.cpp. By linking files to other locations, this
very likely can get confused and therefore looks in the wrong place for the
plugins.
Should reversing the link direction not be an option, this is not
straightforward to solve I think, maybe we need to follow links and add all
locations to the search paths for plugins?
And obviously all the checks suggested below will not be of much use if we
never actually try to load the plugins...
Regards,
Volker
> On Tue, 7 May 2019 at 20:37, Volker Krause <volker.krause at kdab.com> wrote:
> > On Tuesday, 7 May 2019 06:14:38 CEST Christian Gagneraud wrote:
> > > On Tue, 7 May 2019 at 02:49, Volker Krause <volker.krause at kdab.com>
wrote:
> > > > Hi,
> > > >
> > > > that sounds like missing (or incompatible) tool plugins, either on the
> > > > target side (and thus really only the built-in tools existing), or on
> > > > the
> > > > host side so that the tools exist on target but there is just no UI
> > > > for
> > > > them.
> > > >
> > > > Other reasons like issues with the build configuration as you
> > > > mentioned
> > > > could cause this too, but I'd start by checking the tool plugins on
> > > > both
> > > > the target and the host.
> > >
> > > The target looks OK:
> > > root at NSS3-0a-b6-d9:~# find /usr/lib/gammaray/ -name '*.so' | sort
> > > /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_3dinspector.so
> >
> > [...]
> >
> > yep, that looks correct. Possible things to verify there:
> > - check with qtplugininfo that the plugins have the right Qt version baked
> > in, otherwise the Qt plugin loader will reject them
> > - check with ldd (does that exist on QNX?) if the plugins find their
> > dependencies
>
> root at NSS3-0a-b6-d9:~# for f in /usr/lib/gammaray/2.10/qt5_12-arm/*.so;
> do echo $f; ldd $f | grep -i found; done
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_3dinspector.so
> libQt53DInput.so.5 => not found
> libQt53DAnimation.so.5 => not found
> libQt53DRender.so.5 => not found
> libQt53DCore.so.5 => not found
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_actioninspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_bluetooth.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_codecbrowser_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_fontbrowser_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_guisupport.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_localeinspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_mimetypes.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_modelinspector.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_network.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_objectvisualizer_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_positioning.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_probe.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_qmlsupport.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_quickinspector.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_quickwidgetsupport.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_sceneinspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_scriptenginedebugger_plugin.so
> libQt5Script.so.5 => not found
> libQt5ScriptTools.so.5 => not found
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_signalmonitor.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_statemachineviewer_plugin.so
> libQt5Scxml.so.5 => not found
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_styleinspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_sysinfo_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_textdocumentinspector.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_timertop_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_translatorinspector.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_webinspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_widgetinspector_plugin.so
> /usr/lib/gammaray/2.10/qt5_12-arm/gammaray_wlcompositorinspector.so
> /usr/lib/gammaray/2.10/qt5_12-arm/libgammaray_widget_export_actions.so
>
> Looks OK, apart from 3D Script and Scxml. Shouldn't be a blocker.
>
> > - run the target with QT_DEBUG_PLUGINS=1 set, that should show if the Qt
> > plugin loader is finding the plugins and if so, if they fail to load for
> > some reason.
>
> This shows that all Qt plugins are found and loaded, but no traces
> about gammaray...
> using "strace -open" tell me the same the plugins are not even searched for.
> I guess the plugins are loaded by the probe in the injected process, right?
>
> Only ouput from gammaray is:
> Detected ABI qt5_12-arm, using ABI qt5_12-arm.
> HACK: /tmp/gammaray-2.10.0/launcher/core/injector/preloadinjector.cpp:93
> PreloadInjector::launch(): basename only for preloaded libs:
> LD_PRELOAD=gammaray_probe.so
> GammaRay server listening on:
> interface xyz: xxxxx:1234
> ...
>
> The hack above as per previous emails (and yes i haven't forgotten
> this opened PR :))
>
> I have tried reset the capabilities, no change, i have tried to run a
> simple Qt app, same issues....
> Only these 3 libs are opend, both for gammaray binary, and later for the
> probe libgammaray_launcher.so.2.10.0
> libgammaray_common-qt5_12-arm.so.2.10.0
> libgammaray_kitemmodels-qt5_12-arm.so.2.10.0
>
> > > The host as well:
> > > chgans at chgans-workstation:~/Projects/GammaRay$ find
> > > build/lib/gammaray/ -name '*.so' | sort
> > > build/lib/gammaray/2.11/qt5_9-x86_64/gammaray_3dinspector.so
> > > build/lib/gammaray/2.11/qt5_9-x86_64/gammaray_3dinspector_ui.so
> >
> > [...]
> >
> > This also looks correct. The mixing of GammaRay versions isn't well
> > tested,
> > it's always possible we missed a subtle protocol change, but that would
> > usually result in other kinds of misbehavior.
> >
> > Besides the general Qt plugin loading checks mentioned for the target, an
> > additional check is to run the client with GAMMARAY_DEVELOPERMODE=1, that
> > gives you an additional 'Diagnostics' sub-menu in the 'Help' menu. The
> > entry 'Plugins' there should show a list of plugins the target sees (ie.
> > this should not be empty), and the "Message Statistics" view shows on the
> > left all GammaRay objects present in the server, if you see anything
> > there beyond QtCore (e.g. widget or qtquick related things), that would
> > indicate the plugins are actually loaded.
>
> This shows that there's no plugin loaded, and none have failed to load.
>
> > > './bin/gammaray --connect tcp://mfd:1234' only shows:
> > > - Messages
> > > - Meta Objects
> > > - Meta Types
> > > - Objects
> > > - Problems
> > > - Resources
> >
> > That is exactly the list of built-in tools, which suggests there's indeed
> > a
> > problem with the plugins.
> >
> > Regards,
> > Volker
> >
> > > Other devs had the same problem with gammaray-2.10 on Linux and Windows.
> > >
> > > Chris
> > >
> > > > Regards,
> > > > Volker
> > > >
> > > > On Saturday, 4 May 2019 01:13:10 CEST Christian Gagneraud wrote:
> > > > > Hi there,
> > > > >
> > > > > Probe is arm-linux 2.10
> > > > > GUI is x86_64 Linux and Windows (master or 2.10).
> > > > > When the GUI connects to the remote device, it's missing half (at
> > > > > least) of the tools.
> > > > > Only QObject related tools are available (and a couple of others).
> > > > >
> > > > > I haven't investigated yet, Could that come from gammaray probe
> > > > > build
> > > > > time? Is there any known issues?
> > > > >
> > > > > AFAIR, it use to work correctly, the only thing i can think of is
> > > > > that
> > > > > we've recently switched our embedded platforms from Qt-5.6 to
> > > > > Qt-5.12.
> > > > >
> > > > > Thanks,
> > > > > Chris
> > > > > _______________________________________________
> > > > > Gammaray-interest mailing list
> > > > > Gammaray-interest at mail.kdab.com
> > > > > https://mail.kdab.com/mailman/listinfo/gammaray-interest
--
Volker Krause | volker.krause at kdab.com | Director of Engineering
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4664 bytes
Desc: not available
URL: <http://mail.kdab.com/pipermail/gammaray-interest/attachments/20190508/642f0dda/attachment.p7s>
More information about the Gammaray-interest
mailing list