Bug 423582 - KStars is being crashed by opening a script in Script Builder
Summary: KStars is being crashed by opening a script in Script Builder
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: 3.4.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-27 13:44 UTC by Alex Fliker
Modified: 2020-07-02 18:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.4.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fliker 2020-06-27 13:44:06 UTC
STEPS TO REPRODUCE
1. Run KStars and open Tools -> Script Builder
2. Try to open a previously saved script

OBSERVED RESULT
KStars is crashing, with this output in the terminal:
$ kstars 
org.kde.kstars: Welcome to KStars 3.4.2
org.kde.kstars: Build: 2020-04-25T20:01:00Z
org.kde.kstars: OS: "neon"
org.kde.kstars: API: "x86_64-little_endian-lp64"
org.kde.kstars: Arch: "x86_64"
org.kde.kstars: Kernel Type: "linux"
org.kde.kstars: Kernel Version: "5.4.0-38-generic"
org.kde.kstars: Qt Version: 5.9.5
org.kde.kstars: KStars is started in paused state.
org.kde.kstars: Processing  "unnamedstars.dat" , HTMesh Level 3
org.kde.kstars:   Sky Mesh Size:  512
org.kde.kstars: Loaded DSO catalog file:  "unnamedstars.dat"
org.kde.kstars: "Star HD20,794 not found."
org.kde.kstars: "Star HD98,230 not found."
File opened:  "/usr/share/kstars/ngcic.dat"
org.kde.kstars: Loading NGC/IC objects
File opened:  "/home/alex/.local/share/kstars/comets.dat"
org.kde.kstars: "Object named NGC 6050A not found"
glibc >= 2.1 detected.  Using GNU extension sincos()
File opened:  "/home/alex/.local/share/kstars/comets.dat"
QFSFileEngine::open: No file name specified
"max width of column 0: 198"
"max width of column 1: 466"
"max width of column 2: 46"
File opened:  "/home/alex/.local/share/kstars/asteroids.dat"
kf5.kio.core: Invalid URL: QUrl("/home/alex")
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kstars path = /usr/bin pid = 14555
KCrash: Arguments: /usr/bin/kstars 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi

[1]+  Stopped                 kstars

EXPECTED RESULT
Script being loaded and ready for editing.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.19
KDE Plasma Version: 5.19.2
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2
Kernel Version: 5.4.0-38-generic
OS Type: 64-bit
Processors: 8 × Intel® Xeon® CPU E5450 @ 3.00GHz
Memory: 31.4 GiB of RAM
Graphics Processor: GeForce GTX 960/PCIe/SSE2

ADDITIONAL INFORMATION
Here is the script itself:
#!/bin/bash
#KStars DBus script: jup_iss_1
#by 
#last modified: 2020-06-27T02:56:06
#
dbus-send --dest=org.kde.kstars --print-reply /KStars org.kde.kstars.setGeoLocation string:"Chisinau" string:"" string:"Moldova"
dbus-send --dest=org.kde.kstars --print-reply /KStars org.kde.kstars.setLocalTime int32:2020 int32:6 int32:30 int32:4 int32:22 int32:52
dbus-send --dest=org.kde.kstars --print-reply /KStars org.kde.kstars.lookTowards string:"Jupiter"
dbus-send --dest=org.kde.kstars --print-reply /KStars org.kde.kstars.zoom double:160000.
##
Comment 1 Jasem Mutlaq 2020-06-27 17:19:28 UTC
Git commit 27c9bda0084a92306e2c532ad93d70d22be5fadd by Jasem Mutlaq.
Committed on 27/06/2020 at 17:18.
Pushed by mutlaqja into branch 'master'.

Use regex to parse DBus command to fix a crash.
FIXED-IN:3.4.3

M  +65   -68   kstars/tools/scriptbuilder.cpp
M  +1    -1    kstars/tools/scriptbuilder.h

https://invent.kde.org/education/kstars/commit/27c9bda0084a92306e2c532ad93d70d22be5fadd
Comment 2 Alex Fliker 2020-06-27 17:24:44 UTC
How soon will be 3.4.3 released? Should I go for Nightly builds?
Comment 3 Jasem Mutlaq 2020-06-27 17:28:56 UTC
Yeah it would be in nightly build.
Comment 4 Alex Fliker 2020-06-27 17:31:42 UTC
Understood, thanks! And thanks for such a quick fix! Still curious if there is a schedule for version releases :-)
Comment 5 Jasem Mutlaq 2020-06-27 19:30:25 UTC
Git commit d4b4cc2ebc738e83abc4dbed89971f221c2251bd by Jasem Mutlaq.
Committed on 27/06/2020 at 19:29.
Pushed by mutlaqja into branch 'master'.

Fix crash in image dump mode. Fix script parsing
FIXED-IN:3.4.3

M  +3    -2    kstars/kstarsdata.cpp
M  +1    -1    kstars/main.cpp

https://invent.kde.org/education/kstars/commit/d4b4cc2ebc738e83abc4dbed89971f221c2251bd
Comment 6 Alex Fliker 2020-06-27 22:45:08 UTC
Last comment should have gone here, no?
https://bugs.kde.org/show_bug.cgi?id=423586
Comment 7 Alex Fliker 2020-07-02 18:54:37 UTC
Confirming, all good!