aflux / neutrino

A light, expandable and full featured image analysis tool for research
10 stars 1 forks source link

crash on nPhysImage::get_origin() #13

Closed iltommi closed 10 years ago

iltommi commented 10 years ago

open image open pan "region from path" select region hit "extract" button

debugger stops at a get_origin call in the nTics.cc::paint method

aflux commented 10 years ago

The problem is not in get_origin but in nRegionPath::doIt().

The sub-image is allocated as local in nPhysImageF::sub here

nPhysD regionPath=image->sub(rectRegion.x(), rectRegion.y(), rectRegion.width(), rectRegion.height());

and sent to neutrino here

regionPhys=nparent->replacePhys(&regionPath,regionPhys);

However replacePhys does not allocate the persistent buffer

nPhysD* neutrino::replacePhys(nPhysD* newPhys, nPhysD* oldPhys, bool show) { [..] } else { addPhys(newPhys); }

[..]

}

and

void neutrino::addPhys(nPhysD* datamatrix) { [..] physList << datamatrix; [..]

}

On 02/14/2014 03:17 PM, iltommi wrote:

open image open pan "region from path" select region hit "extract" button

debugger stops at a get_origin call in the nTics.cc::paint method

— Reply to this email directly or view it on GitHub https://github.com/aflux/neutrino/issues/13.

iltommi commented 10 years ago

ok fixed