Author Topic: [1.8] Does not seem to read back settings  (Read 4518 times)

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
[1.8] Does not seem to read back settings
« on: 2012 December 28 09:08:20 »
Hello,

It seesm that there is a change in reading back settings from an application, the script does not read back the parameters it used to in 1.7.

Here is a test script, run on 1.7 and 1.8:

Code: [Select]
"use strict";

#include <pjsr/DataType.jsh>

console.writeln( #__DATE__ );        // Date of execution start
console.writeln( #__TIME__ );        // Local time of execution start
console.writeln( #__JS_VERSION__ );  // 100 * version of the JavaScript engine (185 in PI 1.7; 187 in PI 1.8)
console.writeln( #__PI_VERSION__ );  // Full PI Core version. Example: 01.08.00.0853
console.writeln( #__PI_MAJOR__ );    // PI Core version: major version number
console.writeln( #__PI_MINOR__ );    // PI Core version: minor version number
console.writeln( #__PI_RELEASE__ );  // PI Core version: release version number
console.writeln( #__PI_BUILD__ );    // PI Core version: build number
#ifdef __PI_BETA__
console.writeln( "Beta ", #__PI_BETA__ ); // PI Core version: beta version number, or undefined
#endif
#ifdef __PI_LE__
console.writeln( "Limited Edition" );     // Defined if this is a LE version
#endif
console.writeln( #__PI_LANG__ );     // PI Core version: language code, ISO 639.2
//console.writeln( #__PI_CODENAME__ ); // PI Core version: Codename (1.7: Starbuck, 1.8: Ripley)
console.writeln( #__PI_PLATFORM__ ); // One of: LINUX, FREEBSD, MACOSX, MSWINDOWS
#ifgteq __PI_MINOR__ 8
console.writeln( #__PI_ARCH__ );     // *** New in 1.8: One of: x86, x86_64
#endif


var value = Settings.read( "BitliTest/toto", DataType_Double );
console.writeln( "toto is "+ value + ", ok: " + Settings.lastReadOK);

Settings.write("BitliTest/toto", DataType_Double, 1.0 );

Run twice on a 1.7 with fresh 'ini' (the first time  the parameter is not present, second time it is present, which is correct)
Code: [Select]
2012/12/28
17:55:40
185
01.07.06.0793
1
7
6
793
eng
MSWINDOWS
toto is null, ok: false

Code: [Select]
2012/12/28
17:55:49
185
01.07.06.0793
1
7
6
793
eng
MSWINDOWS
toto is 1, ok: true

Run on version 1.8, on a fresh ini. It does not read back the settings on the second execution:

Code: [Select]
2012/12/28
17:57:10
185
01.08.00.0932
1
8
0
932
eng
MSWINDOWS
x86_64
toto is null, ok: false

Code: [Select]
2012/12/28
17:57:19
185
01.08.00.0932
1
8
0
932
eng
MSWINDOWS
x86_64
toto is null, ok: false

They appear in the ini file of both 1.7 and 1.8 as
Code: [Select]
ScriptData\BitliTest\toto=1
Is this a bug or something I missed ?

-- bitli


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: [1.8] Does not seem to read back settings
« Reply #1 on: 2012 December 29 03:11:53 »
Looks like a bug. Thank you for reporting; let me investigate it first.

An update to the PI 1.8.0 RC1 core application is on the way. Be sure this will be fixed very soon.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: [1.8] Does not seem to read back settings
« Reply #2 on: 2012 December 29 03:26:08 »
Thanks.
But you are supposed to be on holiday or something like that.  Enjoy your time  - I can wait for 1.8 a couple more months weeks.

By the way, may be you could send a pre-release to a small set of volunteers before making it generally available. I am sure that you test it as well as possible, but with such a complex piece of software, you are bound to have different usage patterns with different users, and this could highlight problems you did not see. I think it is important that the beginners are not impacted by the (quite normal) issues when a new version is released.

-- bitli

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: [1.8] Does not seem to read back settings
« Reply #3 on: 2012 December 29 03:36:50 »
Quote
But you are supposed to be on holiday or something like that

Since you ask... actually, I returned back home yesterday. I have aborted my Xmas vacation, which should end on January 7th. There are a few things I cannot live with; one of them is making a fool of myself. And with this 1.8.0 RC1 release I have made a complete full of myself.

Quote
By the way, may be you could send a pre-release to a small set of volunteers before making it generally available.

You're right. For future releases I will give more time for extensive testing. In this case I obviously have forced things too much, and the result speaks for itself.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: [1.8] Does not seem to read back settings
« Reply #4 on: 2012 December 29 09:32:47 »
don't be too hard on yourself, software is hard.

i was going to suggest the private beta thing as well, i think that's a good idea with software this complex.

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: [1.8] Does not seem to read back settings
« Reply #5 on: 2012 December 29 14:04:41 »
Hi Juan
Don't be so hard with yourself ! A new version is a hard work and you cannot test by yourself all case !
I really want to be beta-tester if you need (and if you like)
Cheers


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: [1.8] Does not seem to read back settings
« Reply #6 on: 2013 January 03 09:13:38 »
Hi,

This bug is now fixed in version 1.8.0 RC2, which I'm finishing right now. Your script's output is now:

Code: [Select]
Processing script file: /home/juan/tmp/settings-bug.js
2013/01/03
18:10:38
185
01.08.00.0945
1
8
0
945
eng
LINUX
x86_64
toto is 1, ok: true

Thank you for reporting this problem.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline martin_magnan

  • Member
  • *
  • Posts: 68
    • Messager Céleste
Re: [1.8] Does not seem to read back settings
« Reply #7 on: 2013 January 03 20:34:59 »
Quote
You're right. For future releases I will give more time for extensive testing

If you ask me, I'd say that 95% of PI user would volonteer for testing because we all want to be part of this great thing of yours and contribute in some way. So that's what we are doing now. Of course not everyone is reporting bugs and glitches.

Martin

TEC140 / AP1200GTO / QSI583wsg - Astrodon LRGB 2 filters / Lodestar X2 Guider / Robofocus
http://www.messagerceleste.com

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: [1.8] Does not seem to read back settings
« Reply #8 on: 2013 January 03 22:56:57 »
Maybe this  should not be a 'closed' group (this is really up to Juan), but an an RC should be labelled as such (which is the case with RC1), easy to install AND REMOVE side by side withthe production PI without impacting it. May be there should be a temporary forum for the bug reports of an RC version so that they can be discarded after the official release.
It may help if there is an informal (or more formal) group of users doing additional testing. May be the script owner should inform Juan that they tested their script (or that they did not have the time to do it, may happen too).  May be a couple of people should confirm that they processed an entire image using their prefered tools. 
If all is fine, it is a simple matter to remove the 'RCx' from the name.
-- bitli


Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: [1.8] Does not seem to read back settings
« Reply #9 on: 2013 January 22 12:52:54 »
I can confirm that the problem seems to be corrected om 1.8RC2, at least VaryParams and FITSFileManager can restore the parameters without problem (and seems to work correctly after a very quick test, I will do more testing).
Thanks
-- bitli