No subject
Wed Oct 5 12:28:58 EDT 2011
Qt is not supported on 10.7 yet, so you might want to wait for the next
release...
On 10.5, only work with the carbon build...
You could also work with static libraries if you don't need the shared.
Do you know if the OSX 10.7 installation is a "clean" one (installed from
scratch) or an update from 10.6?
My 2 cts,
Nicolas
On Tue, Oct 18, 2011 at 9:14 AM, Christian Lackas <lackas at invicro.com>wrote:
> * Sean McBride <sean at rogue-research.com> [111014 23:46]:
>
> Hi Sean, Everybody,
>
> > If you're dying in free() it's probably because of a memory error.
> > You could try enabling MallocScribble and friends (see 'man malloc')
> > and/or guard malloc (see 'man libgmalloc').
>
> thanks for your suggestions. They gave me a few more ideas on how to
> look at the problem.
>
> > Does it work if you build in 10.6 and run that executable in 10.7? If
> > so, it could be related to SDK and deployment target choice.
>
> It does not matter where it is build.
> However, thanks to MallocScribble, I now also get it to crash on Snow
> Leopard (which makes development much easier for me, since I have not
> upgraded yet).
>
> > Is there nothing in the console? Failures in malloc/free often log
> something.
>
> Nothing on the console.
>
> When trying to understand the source of memory issue, I reduced the
> example to a minimum, basically just a main() with a call like this:
>
> PreviewFilterCurvatureType *p = PreviewFilterCurvatureType::New();
>
> An complete project is available here (just set ITK_DIR env variable to
> your ITK build directory):
>
> http://www.invicro.com/vtk/itkcrash.tgz
>
> If I do (see run.sh):
>
> qmake && make clean && make && MallocScribble=1
> ./crash.app/Contents/MacOS/crash
>
> I get this crash:
>
> #0 0x000000010000afb6 in
> itk::SmartPointer<itk::CurvatureFlowFunction<itk::Image<float, 2u> >
> >::Register (this=0x7fff5fbff040) at itkSmartPointer.h:142
> #1 0x000000010000b004 in
> itk::SmartPointer<itk::CurvatureFlowFunction<itk::Image<float, 2u> >
> >::operator= (this=0x7fff5fbff040, r=0x101510a80) at itkSmartPointer.h:122
> #2 0x000000010000b04b in
> itk::SmartPointer<itk::CurvatureFlowFunction<itk::Image<float, 2u> >
> >::operator= (this=0x7fff5fbff040, r=@0x7fff5fbff050) at
> itkSmartPointer.h:113
> #3 0x000000010002114a in
> itk::CurvatureFlowImageFilter<itk::Image<float, 2u>, itk::Image<float, 2u>
> >::CurvatureFlowImageFilter (this=0x101510540) at
> itkCurvatureFlowImageFilter.txx:38
> #4 0x0000000100021208 in
> itk::CurvatureFlowImageFilter<itk::Image<float, 2u>, itk::Image<float, 2u>
> >::New () at itkCurvatureFlowImageFilter.h:100 #5 0x000000010000aa20 in
> main (argc=1, argv=0x7fff5fbff158) at crash.cxx:15
>
> Attached below is the output for the LightObject on which it tries to call
> Register(), which seems to be uninitialized.
>
> Interestingly, it only crashed when using qmake, not when building a
> similar cmake build script. In the end I found that the problem was a
>
> export MACOSX_DEPLOYMENT_TARGET = 10.4
>
> in the qmake produced makefile, and setting this to 10.5 fixed it for
> the small example.
> Can anybody please tell me why it crashes with the 10.4 setting? I was
> not able to figure that part out. I could not figure out how to use
> malloc_history(1), yet.
>
> Unfortunately, our main application still crashes in the
> PreviewFilterCurvatureType::New(), even with the 10.5 setting, and since
> I believe this is related (although not exactly the same) as the minimal
> example above, I wonder if anybody can give me another pointer on how to
> debug this.
>
> Sean, could you please try the minimal example and give me a hint on how
> I would debug the actual cause of the problem there?
>
> Is this a compiler issue? An ITK issue? Or what else?
>
> Thanks,
> Christian
>
>
> (gdb) p *m_Pointer
> $2 = {
> <itk::FiniteDifferenceFunction<itk::Image<float, 2u> >> = {
> <itk::LightObject> = {
> _vptr$LightObject = 0x5555555555555555,
> m_ReferenceCount = 1431655765,
> m_ReferenceCountLock = {
> m_FastMutexLock = {
> __sig = 6148914691236517205,
> __opaque = 'U' <repeats 56 times>
> }
> }
> },
> members of itk::FiniteDifferenceFunction<itk::Image<float, 2u> >:
> m_Radius = {
> m_Size = {6148914691236517205, 6148914691236517205}
> },
> m_ScaleCoefficients = {1.1945305291614955e+103, 1.1945305291614955e+103}
> },
> members of itk::CurvatureFlowFunction<itk::Image<float, 2u> >:
> m_TimeStep = 1.1945305291614955e+103
> }
>
>
> --
> Dr. Christian Lackas, Managing Partner
> inviCRO, LLC -- In Imaging Yours
> P: +1 617 933 8733, F: +49 2203 9034722, E: lackas at invicro.com
> http://www.invicro.com/ http://www.spect-ct.com/
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
--20cf307f3400a9a38b04af932062
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi Christian,<div><br></div><div>We had a similar issue.</div><div>In share=
d mode, ITK-related code was crashing in our application on 10.5 cocoa and =
10.7.</div><div>10.5 carbon was working.</div><div>10.6 was working.</div>
<div><br></div><div>We didn't figure out what is wrong yet but:</div><d=
iv>From your experience, it sounds like it is related to Qt and CMake.</div=
><div>Qt is not supported on 10.7 yet, so you might want to wait for the ne=
xt release...</div>
<div>On 10.5, only work with the carbon build...</div><div>You could also w=
ork with static libraries if you don't need the shared.</div><div><br><=
/div><div>Do you know if the OSX 10.7 installation is a "clean" o=
ne (installed from scratch) or an update from 10.6?</div>
<div><br></div><div>My 2 cts,</div><div>Nicolas</div><div><br></div><div><b=
r><div class=3D"gmail_quote">On Tue, Oct 18, 2011 at 9:14 AM, Christian Lac=
kas <span dir=3D"ltr"><<a href=3D"mailto:lackas at invicro.com">lackas at invi=
cro.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">* Sean McBride <<a href=3D"mailto:sean at r=
ogue-research.com">sean at rogue-research.com</a>> [111014 23:46]:<br>
<br>
Hi Sean, Everybody,<br>
<div class=3D"im"><br>
> If you're dying in free() it's probably because of a memory er=
ror.<br>
> You could try enabling MallocScribble and friends (see 'man malloc=
')<br>
> and/or guard malloc (see 'man libgmalloc').<br>
<br>
</div>thanks for your suggestions. They gave me a few more ideas on how to<=
br>
look at the problem.<br>
<div class=3D"im"><br>
> Does it work if you build in 10.6 and run that executable in 10.7? =A0=
If<br>
> so, it could be related to SDK and deployment target choice.<br>
<br>
</div>It does not matter where it is build.<br>
However, thanks to MallocScribble, I now also get it to crash on Snow<br>
Leopard (which makes development much easier for me, since I have not<br>
upgraded yet).<br>
<div class=3D"im"><br>
> Is there nothing in the console? =A0Failures in malloc/free often log =
something.<br>
<br>
</div>Nothing on the console.<br>
<br>
When trying to understand the source of memory issue, I reduced the<br>
example to a minimum, basically just a main() with a call like this:<br>
<div class=3D"im"><br>
=A0 =A0PreviewFilterCurvatureType *p =3D PreviewFilterCurvatureType::New()=
;<br>
<br>
</div>An complete project is available here (just set ITK_DIR env variable =
to<br>
your ITK build directory):<br>
<br>
=A0 =A0<a href=3D"http://www.invicro.com/vtk/itkcrash.tgz" target=3D"_blan=
k">http://www.invicro.com/vtk/itkcrash.tgz</a><br>
<br>
If I do (see run.sh):<br>
<br>
=A0 =A0qmake && make clean && make && MallocScribb=
le=3D1 ./crash.app/Contents/MacOS/crash<br>
<br>
I get this crash:<br>
<br>
=A0 =A0#0 =A00x000000010000afb6 in itk::SmartPointer<itk::CurvatureFlow=
Function<itk::Image<float, 2u> > >::Register (this=3D0x7fff5=
fbff040) at itkSmartPointer.h:142<br>
=A0 =A0#1 =A00x000000010000b004 in itk::SmartPointer<itk::CurvatureFlow=
Function<itk::Image<float, 2u> > >::operator=3D (this=3D0x7f=
ff5fbff040, r=3D0x101510a80) at itkSmartPointer.h:122<br>
=A0 =A0#2 =A00x000000010000b04b in itk::SmartPointer<itk::CurvatureFlow=
Function<itk::Image<float, 2u> > >::operator=3D (this=3D0x7f=
ff5fbff040, r=3D at 0x7fff5fbff050) at itkSmartPointer.h:113<br>
=A0 =A0#3 =A00x000000010002114a in itk::CurvatureFlowImageFilter<itk::I=
mage<float, 2u>, itk::Image<float, 2u> >::CurvatureFlowImage=
Filter (this=3D0x101510540) at itkCurvatureFlowImageFilter.txx:38<br>
=A0 =A0#4 =A00x0000000100021208 in itk::CurvatureFlowImageFilter<itk::I=
mage<float, 2u>, itk::Image<float, 2u> >::New () at itkCurva=
tureFlowImageFilter.h:100 #5 =A00x000000010000aa20 in main (argc=3D1, argv=
=3D0x7fff5fbff158) at crash.cxx:15<br>
<br>
Attached below is the output for the LightObject on which it tries to call<=
br>
Register(), which seems to be uninitialized.<br>
<br>
Interestingly, it only crashed when using qmake, not when building a<br>
similar cmake build script. In the end I found that the problem was a<br>
<br>
=A0 =A0export MACOSX_DEPLOYMENT_TARGET =3D 10.4<br>
<br>
in the qmake produced makefile, and setting this to 10.5 fixed it for<br>
the small example.<br>
Can anybody please tell me why it crashes with the 10.4 setting? I was<br>
not able to figure that part out. I could not figure out how to use<br>
malloc_history(1), yet.<br>
<br>
Unfortunately, our main application still crashes in the<br>
PreviewFilterCurvatureType::New(), even with the 10.5 setting, and since<br=
>
I believe this is related (although not exactly the same) as the minimal<br=
>
example above, I wonder if anybody can give me another pointer on how to<br=
>
debug this.<br>
<br>
Sean, could you please try the minimal example and give me a hint on how<br=
>
I would debug the actual cause of the problem there?<br>
<br>
Is this a compiler issue? An ITK issue? Or what else?<br>
<br>
Thanks,<br>
=A0Christian<br>
<br>
<br>
(gdb) p *m_Pointer<br>
$2 =3D {<br>
=A0<itk::FiniteDifferenceFunction<itk::Image<float, 2u> >&g=
t; =3D {<br>
=A0 =A0<itk::LightObject> =3D {<br>
=A0 =A0 =A0_vptr$LightObject =3D 0x5555555555555555,<br>
=A0 =A0 =A0m_ReferenceCount =3D 1431655765,<br>
=A0 =A0 =A0m_ReferenceCountLock =3D {<br>
=A0 =A0 =A0 =A0m_FastMutexLock =3D {<br>
=A0 =A0 =A0 =A0 =A0__sig =3D 6148914691236517205,<br>
=A0 =A0 =A0 =A0 =A0__opaque =3D 'U' <repeats 56 times><br>
=A0 =A0 =A0 =A0}<br>
=A0 =A0 =A0}<br>
=A0 =A0},<br>
=A0 =A0members of itk::FiniteDifferenceFunction<itk::Image<float, 2u=
> >:<br>
=A0 =A0m_Radius =3D {<br>
=A0 =A0 =A0m_Size =3D {6148914691236517205, 6148914691236517205}<br>
=A0 =A0},<br>
=A0 =A0m_ScaleCoefficients =3D {1.1945305291614955e+103, 1.194530529161495=
5e+103}<br>
=A0},<br>
=A0members of itk::CurvatureFlowFunction<itk::Image<float, 2u> &g=
t;:<br>
=A0m_TimeStep =3D 1.1945305291614955e+103<br>
<div class=3D"im">}<br>
<br>
<br>
--<br>
Dr. Christian Lackas, Managing Partner<br>
inviCRO, LLC -- In Imaging Yours<br>
P: <a href=3D"tel:%2B1%20617%20933%208733" value=3D"+16179338733">+1 617 93=
3 8733</a>, F: <a href=3D"tel:%2B49%202203%209034722" value=3D"+49220390347=
22">+49 2203 9034722</a>, E: <a href=3D"mailto:lackas at invicro.com">lackas at i=
nvicro.com</a><br>
<a href=3D"http://www.invicro.com/" target=3D"_blank">http://www.invicro.co=
m/</a> =A0<a href=3D"http://www.spect-ct.com/" target=3D"_blank">http://www=
.spect-ct.com/</a><br>
</div><div><div></div><div class=3D"h5">___________________________________=
__<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href=3D"http://www.kitware.com/opensource/opensource.html" target=3D"_bl=
ank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href=3D"http://www.kitware.com/products/protraining.html" target=3D"_bla=
nk">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href=3D"http://www.itk.org/Wiki/ITK_FAQ" target=3D"_blank">http://www.it=
k.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.itk.org/mailman/listinfo/insight-users" target=3D"_bl=
ank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div>
--20cf307f3400a9a38b04af932062--
More information about the Insight-users
mailing list