Athena crash on mac on import

Hello, Athena crashes upon import of the attached project file. I am using the latest release of Athena for mac (0.9.22) on OSX 10.10.5. I am able to open the file on windows. The message that is printed to the terminal when Athena crashes is pasted below. Please let me know if any further information would be helpful. Thank you, George [!!!] bkg_funnorm is not an attribute to set for Demeter::Data=HASH(0x7fe2e57967c8) at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/MooseX/SetGet.pm line 9. MooseX::SetGet::set(Demeter::Data=HASH(0x7fe2e57967c8), "bkg_spl2e", 110.195726042215, "y_offset", 0, "bft_rwindow", "hanning", "fft_kwindow", "hanning", ...) called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Data/Prj.pm line 411 Demeter::Data::Prj::_record(Demeter::Data::Prj=HASH(0x7fe2e5785c70), 5, "psmtj") called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Data/Prj.pm line 197 Demeter::Data::Prj::record(Demeter::Data::Prj=HASH(0x7fe2e5785c70), 1) called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Athena/IO.pm line 802 Demeter::UI::Athena::IO::_prj(Demeter::UI::Athena=HASH(0x7fe2dc0226a8), "/Users...sta"..., "/Users...sta"..., 1, "") called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Athena/IO.pm line 164 Demeter::UI::Athena::IO::Import(Demeter::UI::Athena=HASH(0x7fe2dc0226a8)) called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Athena.pm line 859 Demeter::UI::Athena::OnMenuClick(Wx::Frame=HASH(0x7fe2e28ff570), Wx::CommandEvent=SCALAR(0x7fe2e5781840), Demeter::UI::Athena=HASH(0x7fe2dc0226a8)) called at /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Athena.pm line 782 Demeter::UI::Athena::__ANON__(Wx::Frame=HASH(0x7fe2e28ff570), Wx::CommandEvent=SCALAR(0x7fe2e5781840)) called at /opt/local/bin/athena line 44 eval {...} called at /opt/local/bin/athena line 44

On 07/01/2016 02:29 PM, George Sterbinsky wrote:
The proximate cause of this (I think) is that you are trying to open a project file that someone wrote using a later version of Athena. The error indicates a feature from 0.9.23 that is, apparently, not backwards compatible. The best solution involves updating to the latest version of the software -- either by downloading and installing from the latest source or convincing the kind soul who made the Mac package to update to 0.9.24. There is probably a simple-ish work-around. Let me think about it and I'll get back to you. B -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 743, Room 114 Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/

On 07/01/2016 03:00 PM, Bruce Ravel wrote:
There is probably a simple-ish work-around. Let me think about it and I'll get back to you.
There's not a way to simply fix this that does not involve you upgrading Demeter. However, if you don't mind a bit of hands on effort, try this: * Open the file /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Data/Prj.pm in a text editor (not Word!). * Go to line 308. Here's what the surrounding lines lines look like: next if any { $k eq $_ } qw( bindtag deg_tol denominator detectors en_str file frozen line mu_str numerator old_group original_label peak refsame not_data bkg_switch bkg_switch2 is_xmu is_chi is_xanes is_xmudat bkg_stan_lab bkg_flatten_was bkg_fnorm ); Line 308 is the one that says "bkg_fnorm". Edit this to read "bkg_fnorm bkg_funnorm". Save. Try reading in the project file again. I tested this and I think it will work. Let me see the error message if this idea doesn't. B P.S. The Prj.pm file might be in a different location on someone else's computer. -- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 743, Room 114 Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/

Hi Bruce,
Thanks for providing a fix. The Prj.pm file on my system does not look
exactly like what you describe. Lines 260 to 268 looked like this:
next if any { $k eq $_ } qw(
bindtag deg_tol denominator detectors
en_str file frozen line mu_str
numerator old_group original_label
peak refsame not_data
bkg_switch bkg_switch2
is_xmu is_chi is_xanes is_xmudat
bkg_stan_lab bkg_flatten_was
);
After line 267, I added a new line that reads "bkg_fnorm bkg_funnorm" as
you suggested, and now I am able to open the prj file.
Thanks again,
George
On Fri, Jul 1, 2016 at 3:17 PM, Bruce Ravel

That was the right thing to do. Glad it worked. B On 07/01/2016 04:19 PM, George Sterbinsky wrote:
-- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 743, Room 114 Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/

Bruce,
I am seeing a similar issue with Artemis. Upon trying to open a .fpj file
created elsewhere, Artemis crashes and the following message is printed to
the terminal. Any suggestions as to a possible fix? I have not attached the
file since it is not mine to share, but if you need it or anything else
please let me know.
Thank you,
George
[!!!] bkg_funnorm is not an attribute to set for
Demeter::Data=HASH(0x7fdb97cd4810) at
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/MooseX/SetGet.pm
line 9.
MooseX::SetGet::set(Demeter::Data=HASH(0x7fdb97cd4810), "bkg_pre1",
-205, "multiplier", 1, "energy_string", "", "name", "merge 4", ...) called
at
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Fit.pm
line 1263
Demeter::Fit::grab(Demeter::Fit=HASH(0x7fdb79280ba0), "folder",
"/Users/.../.horae/stash/_dem_nsqtbpqj/fits/iaple", "regenerate", 0) called
at
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis/Project.pm
line 397
Demeter::UI::Artemis::Project::read_project(HASH(0x7fdb93be5ff0))
called at
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis.pm
line 990
Demeter::UI::Artemis::OnMenuClick(Wx::Frame=HASH(0x7fdb96c547c0),
Wx::CommandEvent=SCALAR(0x7fdb96c576a0)) called at
/opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/UI/Artemis.pm
line 434
Demeter::UI::Artemis::__ANON__(Wx::Frame=HASH(0x7fdb96c547c0),
Wx::CommandEvent=SCALAR(0x7fdb96c576a0)) called at /opt/local/bin/Artemis
line 47
eval {...} called at /opt/local/bin/Artemis line 47
On Fri, Jul 1, 2016 at 4:26 PM, Bruce Ravel

George, You can do a similar work-around as before. In /opt/local/lib/perl5/site_perl/5.22/darwin-thread-multi-2level/Demeter/Fit.pm, near line 1263 (as the traceback indicates) you will find this: ## correct for change in energy-dependent normalization delete $r_attributes->{bkg_fnorm}; add delete $r_attributes->{bkg_funnorm}; B On 07/05/2016 02:57 PM, George Sterbinsky wrote:
-- Bruce Ravel ------------------------------------ bravel@bnl.gov National Institute of Standards and Technology Synchrotron Science Group at NSLS-II Building 743, Room 114 Upton NY, 11973 Homepage: http://bruceravel.github.io/home/ Software: https://github.com/bruceravel Demeter: http://bruceravel.github.io/demeter/

Bruce,
I could not find that particular bit of code in the file. Instead I added
the line you suggested (delete $r_attributes->{bkg_funnorm};) at the end of
this block of code (lines 1488 to 1496)
foreach my $d (@$r_data) {
#print ">>>>>>> $d\n";
my $yaml = ($args{file}) ? $zip->contents("$d.yaml")
: $self->slurp(File::Spec->catfile($args{folder}, "$d.yaml"));
my ($r_attributes, $r_x, $r_y) = YAML::Tiny::Load($yaml);
## the current implementation of XDI support has the xdifile attribute
read-only if Xray::XDI is not available
delete $r_attributes->{xdifile} if (not $INC{'Xray/XDI.pm'});
delete $r_attributes->{fit_pcpath}; # correct an early
delete $r_attributes->{fit_do_pcpath}; # design mistake...
delete $r_attributes->{bkg_funnorm};
and this block (lines 1230 to 1239)
foreach my $which ('', '_standard') {
my $yaml = ($args{file}) ? $zip->contents("$d$which.yaml")
: $self->slurp(File::Spec->catfile($args{folder}, "$d$which.yaml"));
my ($r_attributes, $r_x, $r_y) = YAML::Tiny::Load($yaml);
## the current implementation of XDI support has the xdifile attribute
read-only if Xray::XDI is not available
delete $r_attributes->{xdifile} if (not $INC{'Xray/XDI.pm'});
delete $r_attributes->{fit_pcpath}; # correct an early
delete $r_attributes->{fit_do_pcpath}; # design mistake...
delete $r_attributes->{bkg_funnorm};
I am now able to open the project file without crashing Artemis.
Thank you again for your help.
George
On Fri, Jul 8, 2016 at 8:36 AM, Bruce Ravel
participants (2)
-
Bruce Ravel
-
George Sterbinsky