--startup-script option doesn't work

Bug #694489 reported by Matthew Gates
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
High
Alexander Wolf

Bug Description

The argument to the --startup-script option doesn't seem to get used.

Always there is this in the console output:

...
Creating GUI ...
"WARNING: cannot open script: "
...

The message should include the name of the file, so apparently it is not getting to the runScript function from the CLI.

Related branches

Changed in stellarium:
status: New → Confirmed
assignee: nobody → Matthew Gates (matthew-porpoisehead)
milestone: none → 1.0.0
Changed in stellarium:
importance: Undecided → High
Revision history for this message
Matthew Gates (matthew-porpoisehead) wrote :

related bug #730180

Revision history for this message
Alexander Wolf (alexwolf) wrote :

This bug NOT related with bug #730180.

First, look at code into StelMainGraphicsView.cpp since 279 and seen this lines:
QString startupScript;
if (qApp->property("onetime_startup_script").isValid())
                   qApp->property("onetime_startup_script").toString();
else
                  startupScript = conf->value("scripts/startup_script", "startup.ssc").toString();
scriptMgr->runScript(startupScript);

But this code NEVER getting script name from --startup-script attribution because need line "startupScript = qApp->property("onetime_startup_script").toString();" instead current "qApp->property("onetime_startup_script").toString();"

Second, if we add this line, then we have segmentation fault because QPainter called BEFORE init graphics mode.

I think this feature never worked. :(

Revision history for this message
Ravi Hans (billoosingh15) wrote :

I did one other thing when I could not get the script to launch propery. I modified the default startup_script (which is blank) and put my script code there. Stellarium still hung up. So the issue does not seem to be that the right script isn't getting loaded, but that something bad happens when it starts to execute.

Revision history for this message
Alexander Wolf (alexwolf) wrote :
Changed in stellarium:
assignee: Matthew Gates (matthew-porpoisehead) → Alexander Wolf (alexwolf)
milestone: 1.0.0 → 0.11.2
status: Confirmed → Fix Committed
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.