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

Segfault when trying to display an instrument without sample set #10049

Closed
mantid-builder opened this issue Mar 19, 2014 · 2 comments
Closed
Labels
Low Priority Things that you don't ever want to be done.

Comments

@mantid-builder
Copy link
Collaborator

This issue was originally TRAC 9206

Original Reporter: Arturs Bekasovs

Save the attached file, which is a very minimal custom IDF, and run the following script, setting the right path:

idf = ".../IDF_for_locations_test.xml" # Set to the actual path
ws = CreateWorkspace([1,2,3], [1,2,3])
LoadInstrument(ws, idf)
getInstrumentView("ws")

Adding following lines to the IDF fixes the problem:

  `<component type="sample">`
    `<location/>`
  `</component>`
  `<type name="sample" is="samplePos"/>`

I don't think it's a major problem, since all the real instruments will have samples set. Seems to be a simple missing null-check somewhere in the InstrumentView code.

@mantid-builder mantid-builder added Low Priority Things that you don't ever want to be done. GUI labels Jun 3, 2015
@stuartcampbell
Copy link
Collaborator

http://trac.mantidproject.org/mantid/raw-attachment/ticket/9206/IDF_for_locations_test.xml
(uploaded by Arturs Bekasovs on 2014-03-19T16:25:02)

@NickDraper
Copy link
Contributor

A sample pos is vital to an instrument definition.
error handling could be better but very rare/unlikely - closed

wontfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Priority Things that you don't ever want to be done.
Projects
None yet
Development

No branches or pull requests

3 participants