-----Ursprüngliche Nachricht-----
Von: Lodron, Gerald
Gesendet: Freitag, 2. Juli 2010 10:52
An: 'Marco Nolden'
Betreff: AW: [mitk-users] My first MITK programm, New() method of mitk object
fails with error (NULL pointer)
Yes i can debug step 1 but as i said i get an exception on New() mehtod of
mitk::PicFileReader (also from every other mitk object i tested).
OK if the null pointer is normal, then i debuged forward to mitkBaseProcess.cpp
to line 112 which is in function
void mitk::BaseProcess::SetNthOutput(unsigned int idx, itk::DataObject *output)
{ #ifdef MITK_WEAKPOINTER_PROBLEM_WORKAROUND_ENABLED
output = dynamic_cast<mitk::BaseData*>(output);
// does this change anything?
if ( idx < GetOutputs().size() && output == GetOutputs()[idx]) //crah here
The "if ( idx < GetOutputs().size() && output == GetOutputs()[idx])" crashes, i
can see in the debugger that idx = 0 and output is initialized (not NULL!). The
exception then occours in the itkSmartPointer.h:
/** Return pointer to object. */
operator ObjectType * () const
{ return m_Pointer; } //crash here
With Access violation reading location 0xffffffffffffffff.
Any ideas?
-----Ursprüngliche Nachricht-----
Von: Marco Nolden [mailto:[email protected]]
Gesendet: Freitag, 2. Juli 2010 10:41
An: Lodron, Gerald
Cc: '[email protected]'
Betreff: Re: [mitk-users] My first MITK programm, New() method of mitk object
fails with error (NULL pointer)
Hi Gerald,
On 07/02/2010 09:27 AM, Lodron, Gerald wrote:
>
> The debugger failed on the mitk::PicFileReader::New(); statement in
> line
> 74 of itkSmartPointer.h. When i jump into the New() method in debug
> mode i can see that the line
>
> LightObject::Pointer ret =
> ObjectFactory::CreateInstance(typeid(T).name()); in itkObjectFactory.h
> (Create() function) returns a null pointer.
This is ok. The factory returns a null pointer if no overloaded class is
registered (the normal case) . The object is then created with a regular new
operator in the New() method defined in the itkNewMacro in itkMacro.h
>
> Any ideas, i am at the end of my voodo
>
Could you debug Step1? Does it work?
Best regards
Marco
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users