Problem with variable  [SOLVED]

https://www.dacm-logiciels.fr/tracewin
United States of Americawtam
Skilled
Skilled
Posts: 111
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Problem with variable

Post by United States of Americawtam »

Dear Didier,

I believe there is a bug in the variable command. Please see attached model for an example. In the model, when both "xa1" and "xa10" are declared, "xa10" will have a wrong value. If you comment out "xa1", then "xa10" will be correct.

Best regards,
Wai-Ming
Attachments
bug.dat
(247 Bytes) Downloaded 234 times
bug.ini
(43.77 KiB) Downloaded 225 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 982
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Problem with variable

Post by FranceDidier »

Dear wtam,

Exact, it's fixed, you can upgrade your code.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 111
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: Problem with variable

Post by United States of Americawtam »

Dear Didier,

That fixes the problem.
But it created another problem. I don't know exactly what it is. A model that I can run without problem with the last version now cannot run with the new version. The complain is related to variable:

drift 30-(xa11-40) 10

I guess it is related to the "11" in the variable.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 982
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Problem with variable

Post by FranceDidier »

Dear Wai-Ming,

Yes you're rigth, as usual I broke someting by fixing something else.
Ok, it's fixed (I hope), be carreful I didn't change code version number

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 111
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: Problem with variable

Post by United States of Americawtam »

Dear Didier,

Thanks a lot.

In general, when you upgrade TraceWin.exe, is TraceWin_noGUI.exe also being upgraded?
I use a script to run batch using TraceWin_noGUI.exe through cmd, and then copy two files: tracewin.out and partran1.out. Sometimes that two files are not available for some parameter values. But I am pretty sure that those parameter values are fine, i.e. no singularity etc. I am not sure if it is that running TraceWin_noGUI through cmd is not stable, or something else... do you have any comment?

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 982
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Problem with variable

Post by FranceDidier »

Dear Wai-Ming,

Yes of course both codes are always upgraded at the same time.
I suggest you check to replace in your batch file "TraceWin_noGUI.exe ...." by "TraceWin.exe hide ...." to see if you have the same issue
or directly "TraceW64.exe" file but here, all input files are to be located in executable directory.

Otherwise, you should have found the particular problematic case and sent it to me

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 111
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: Problem with variable

Post by United States of Americawtam »

Dear Didier,

It seems that the codes still randomly breaks when I have variables running from xa1 to xa10 and above. The codes is perfectly fine with variables up to xa9. I believe the codes don't break randomly, but I cannot find the pattern.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 982
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Problem with variable

Post by FranceDidier »

Dear Wai-ming,


Could you send me an example, because I'm not sure I understand your concern.

Regards,

Didier
United States of Americawtam
Skilled
Skilled
Posts: 111
Joined: Mon 7 Dec 2020 06:17
Location: Boston
Country:
United States of America (us)
United States of America

Re: Problem with variable

Post by United States of Americawtam »

Dear Didier,

Please refer to the previous conversation in this post. The problem was solved at some point of time. But it appears to be problematic again. For example, TraceWin would randomly quit (GUI disappeared) if I use the following variables naming:

variable pa1 1
variable pa2 1
variable pa3 1
variable pa4 1
variable pa5 1
variable pa6 1
variable pa7 1
variable pa8 1
variable pa9 1
variable pa10 1
variable pa11 1

Note that variable declaration alone would not cause problem. In the beamline if I only use up to pa9, it would cause no problem at all. But if pa10 or pa11 is used in the beamline simulation, TraceWin would quit randomly. It is random because the last progress statement in the Output tab could be different before the GUI disappear, or sometimes it wouldn't quit, even if the codes are exactly the same.

As a side note, referring to the previous conversation in this post, the problem we had was that pa10 or pa11 would give an incorrect value. This time, TraceWin would quit / crash.

Best regards,
Wai-Ming
User avatar
FranceDidier
Administrator
Administrator
Posts: 982
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: Problem with variable

Post by FranceDidier »

Dear Wai-Ming,

I have tried to reproduce your problem without success. I need a complete example that will allow me to visualise your problem without having to build the project and its associated files myself.

Regards,

Didier
Post Reply