[SailfishDevel] qtsvg imageformat not registered for first launch of app

Thomas Perl th.perl at gmail.com
Tue May 6 07:48:01 UTC 2014


Hi,

On 2014-05-06 08:20, Simon Persson wrote:
>
> My game submission to harbour was recently rejected, I'm bringing up 
> the issue here because I suspect the issue lies outside my app. Please 
> help me either confirm this suspicion or point me to where my app 
> could be missing something.
>
> The problem:
>
> 1. On a clean OS installation, install the game rpm.
>
> 2. Launch game from home screen menu.
>
> 3. Problem: The QML "Image" component fails to load any SVG images 
> used in the game.
>
> 4. Quit the game.
>
> 5. Restart the game from launcher again.
>
> 6. Now it works, SVG files do load. Quit the game again.
>
> 7. Uninstall both the game and the dependancies "qt5-qtsvg" and 
> "qt5-qtsvg-plugin-imageformat-svg".
>
> 8. Reinstall game, pulling in qtsvg again... this time the SVG files 
> loads successfully on first attempt.
>
> I have not been able to figure out what it is that happens on first 
> run of the game, which permanently alters the OS installation in such 
> a way that the problem never re-appears.
>

It could be due to mapplauncherd - there's a partially initialized 
process ("booster") already waiting for your application to be started 
(but it has been booted up at a time when the plugin wasn't installed, 
hence it doesn't "see" the new plugin yet). After an application is 
launched, a new booster process is started and initialized. This would 
explain why it doesn't work at first, but works after that. To verify 
this is indeed the issue, try the following:

  1. Install the app (which installs also the SVG plugin)
  2. Launch another app from the home screen menu that has the same 
launcher/booster type (e.g. silica-qt5)
  3. Now launch your game from the home screen

If it's a booster issue, then your game's first launch should work as 
expected from the launcher icon after you have started something. If 
that's the issue, then we should fix either mapplauncherd to detect the 
new installation of plugins somehow (and re-start all boosters), force 
re-loading of the plugins when the app is really launched or add some 
code to the qt5 plugins' postinst script that would also just restart 
mapplauncherd / the boosters. A less intrusive way would be to just 
pre-install the SVG plugin, but that would just hide/workaround the real 
problem, and just delay the need to do something about it.

As you correctly suspected, the issue lies outside of your app, and it's 
something we have to fix in the middleware (either mapplauncherd, 
booster or the plugin packaging). Thanks for the detailed report; I'll 
look into it.


HTH :)
Thomas


More information about the Devel mailing list