Hi Thorsten,
first of all, thanks for using JSBSim-Python. Ralf was quicker in answering. ;-)
Two additional comments:
- Contributions to JSBSim-Python are more than welcome, so once your implementation is ready, we (or at least I) would be happy to include your code into the SVN repository.
- I established an e-mail distribution list (jsbsim-python-devel) to make the JSBSim-Python discussions a bit more easier. You're welcome to join.
Best Regards,
Petr
______________________________________________________________
> Od: "Ralf Pfrogner" <ral...@gm...>
> Komu: Thorsten Schroeteler <tho...@go...>
> CC: c-...@us..., en...@us..., got...@us...
> Datum: 25.01.2010 22:04
> Předmět: Re: jsbsim-python - segmentation fault in FGInput
>
>Hello,
>
>and though I have not been working on this project for two years or so I think I can answer your question.
>Have a look at the file JSBSim_FGFDMExec.cpp, line 561:
>
> PyObject* _o = PyObject_CallObject( (PyObject*) &FGInputType, NULL );
> ((FGInputObject*) _o)->m_ptr = self->m_ptr->GetInput( );
> return _o;
>
>This is the method "FGFDMExec.GetInput". It creates a new Python FGInput object, and assign the C++ pointer to it's member m_ptr.
>You should not create a new instance of FGInput yourself, but use the getter.
>Now, I admit that there should be a check if "self->m_ptr->GetInput() == NULL" before assign the C++ pointer to (FGInputObject*)_o->m_ptr.
>
>Kind regards
>Ralf
>
>
>Thorsten Schroeteler wrote:
>> Hello jsbsim-python Team,
>>
>> first of all thanks for developing a python wrapper for JSBSim !
>>
>> I am currently trying to use it to construct a multi-aircraft batch > simulation.
>> For this I have added a JSBSim_FGOutput class / wrapper similar to > JSBSim_FGInput, only to discover that if used it produces a > segmentation fault, because the this pointer in FGOutput is zero. I > then tried to use JSBSim_FGInput, which also fails with a > non-initialized this pointer in FGInput.
>> A I am no expert in python extensions, I was wondering that I did not > find any direct use of any of the JSBSim constructors.
>>
>> Has any of you experienced something like this ? Has anybody an idea > what might go wrong ?
>>
>> Thanks in advance,
>> Thorsten
>>
>
>
|