Segfault on command line generation

Umair Khan ukhan at pdx.edu
Mon Jul 6 17:12:14 BST 2020


Thanks a lot for taking the time to look into this! I had a chance to play around with the DBus interface (thanks for the intro) and I think this will actually end up being more useful than what I had planned to do with the --dump option, so it works out great.

Best,
Umair

On Jul 5 2020, at 5:26 pm, Akarsh Simha <akarshsimha at gmail.com> wrote:
> Hi
>
> The syntax `--dump --filename` is incorrect, it should instead be `--dump <filename>`, e.g.
> kstars --dump /tmp/test.png --width 600 --height 400
>
> But this doesn't work as expected at all -- it produces an image with no stars, only guide lines are shown or something of that sort. I vote for disabling the `--dump` option and instead providing DBus as the only way to generate a star map as of now. This is unfortunate, but a fully booted up KStars is less buggier than a half-booted up KStars. You can also achieve much more control through DBus than with --dump.
> Example (shell script):
> qdbus org.kde.kstars /KStars org.kde.kstars.lookTowards "M 31" # Point to M 31
> qdbus org.kde.kstars /KStars org.kde.kstars.exportImage /tmp/test.svg 1024 768 false # Write SVG graphic of size 1024x768 without legend
>
> The syntax of exportImage is exportImage(filename, width, height, includeLegend). The file format is determined from the extension. All arguments except "filename" are optional. You can see this in kstars.h:417
> If you want to control via Python, you can do that too:
> dbus = QtDBus.QDBusConnection.sessionBus()
> kstars_dbus = QtDBus.QDBusInterface(
> "org.kde.kstars",
> "/KStars",
> "org.kde.kstars",
> dbus
> )
> assert kstars_dbus is not None
> if not kstars_dbus.isValid():
> raise RuntimeError('Could not connect to KStars DBus interface!')
>
> kstars_dbus.call(
> QtDBus.QDBus.AutoDetect, "<method-name>", argument1, argument2, ...
> )
>
>
> A useful way to find out what methods KStars exposes on DBus, is to run on a terminal:
> qdbus org.kde.kstars /KStars
> It'll list the signature of all available methods. There are a few other interfaces, but /KStars is the primary one of most value. If you've set it up, qdbus has tab completion which is extremely helpful.
> Other methods of interest are:
> org.kde.kstars.setRaDecJ2000
>
> org.kde.kstars.setApproxFOV
>
> There is a bug with setRaDecJ2000 and setRaDec when atmospheric corrections are enabled.
>
> Regards
> Akarsh
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20200706/500d1834/attachment.htm>


More information about the Kstars-devel mailing list