Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noproj bug when running from GUI without specifying a match cube #5381

Closed
kledmundson opened this issue Dec 18, 2023 · 0 comments · Fixed by #5429
Closed

Noproj bug when running from GUI without specifying a match cube #5381

kledmundson opened this issue Dec 18, 2023 · 0 comments · Fixed by #5429
Assignees
Labels
bug Something isn't working

Comments

@kledmundson
Copy link
Contributor

ISIS version(s) affected: Latest

Description

When running noproj from the GUI, if a match cube is not explicitly specified, the program fails with the following error...
noprojBug
How to reproduce

Run noproj from GUI with no match cube.

Possible Solution

This was likely introduced when noproj was converted to a callable function.

In the method void noproj(UserInterface &ui), a cube object is constructed and passed to the programmatic noproj interface, even if it has not been entered in the GUI.

    Cube mcube;
    if((ui.WasEntered("MATCH"))) {
      mcube.open(ui.GetCubeName("MATCH"));
    }

    noproj(&icube, &mcube, ui);

Then, in the programmatic interface, mcube is never NULL so an attempt to open is made, and fails...

    if (mcube != NULL) {
      p.SetInputCube(mcube);
      p.SetInputCube(icube);
    }
    else {
      p.SetInputCube(icube);
      mcube = icube;
    }

This could be fixed by changing mcube to a default parameter in the programmatic interface...

xtern void noproj(Cube *icube,  UserInterface &ui,
                                  Cube *mcube=null);

Additional context

Encountered on Intel MacBook Pro running macOS Monterey 12.7.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants