Changes between Version 23 and Version 24 of FAQ


Ignore:
Timestamp:
Jan 13, 2011, 3:16:49 PM (10 years ago)
Author:
dtodd
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v23 v24  
    3939
    4040=== My PYGAMMA Program Is Unstable or Behaves Badly and Yet it Looks Fine? ===
    41 Under certain circumstances your pyGamma code can be written in perfectly good Python style yet give unpredictable errors (or no error at all). This is caused by the default behavior of SWIG when applied to C++ code to create Python interfaces. If you have written code that involves subroutines, like this pseudocode,
     41Under certain circumstances your pyGamma code can be written in perfectly good Python style yet give unpredictable errors (or no error at all).
     42
     43We created pyGamma by applying SWIG to GAMMA. In this treatment we did not apply any special code for handling return values that are pointers or references. This has caused non-pythonic behavior to be observed in some situations.
     44
     45If you have written code that involves subroutines, like this pseudocode,
    4246{{{
    4347import pygamma as pg
     
    6064}}}
    6165
    62 You are at risk of having one of a number of problems. This is because mxa points to a an object that is contained within another object that has been made available for deletion. So far we have see these errors:
     66then you are at risk of having one of a number of problems.
     67
     68This is because mxa points to a an object that is contained within another object that has been made available for deletion.
     69
     70So far in our research we have see this situation cause these errors:
    6371
    6472    * Segfault
     
    6977
    7078We list here a [gamma:SwigIssueSegfault detailed description of the problem and suggest some work arounds].
    71 
    72 In this example we are returning a transition table (TTable1D), which is an object that is contained within ACQ, an acquire1D object. The