﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1153	ppStack dies in a Bus Error: pmReadoutWriteSubtractionKernels	Michael Wood-Vasey	Paul Price	"ppStack compiled from CVS HEAD (2008/11/07, 19:00 EST) gives a Bus Error.  I obtained the same Bus Error last week, but at least the new version in CVS HEAD gets there much faster now.  I figured I was doing something wrong before, but I finally decided that maybe there was a bug.

----
(gdb) run test3.mdc test3
Starting program: /Users/mwv/local/PS1/code/ipp/default.darwin_x86/bin/ppStack test3.mdc test3
Reading symbols for shared libraries +++++++++++++++++++++..... done
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |4|psModules.config
    merged camera recipes with system recipes
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |W|ppStackCamera (ppStackCamera.c:211)
    SOURCES provided without PSF --- ignoring.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |W|ppStackCamera (ppStackCamera.c:211)
    SOURCES provided without PSF --- ignoring.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |I|psModules.config.format
    Camera _MEGACAM-SKYCELL, format SKYCELL matches header.
2008-11-08 00:34:25Z|Peace.local         |W|ppStackCamera (ppStackCamera.c:211)
    SOURCES provided without PSF --- ignoring.
 Done parsing arguments
 Determining target PSF....
     Temporary files: /tmp/test3.0.conv.im.fits /tmp/test3.0.conv.mk.fits /tmp/test3.0.conv.wt.fits
     Temporary files: /tmp/test3.1.conv.im.fits /tmp/test3.1.conv.mk.fits /tmp/test3.1.conv.wt.fits
     Temporary files: /tmp/test3.2.conv.im.fits /tmp/test3.2.conv.mk.fits /tmp/test3.2.conv.wt.fits
 Convolving inputs to target PSF....
2008-11-08 00:34:25Z|Peace.local         |I|p_psRandomGetSystemSeed
    System random seed value used = 49da9346cdd66fab
  Convolving input 0 of 3 to target PSF....
2008-11-08 00:34:28Z|Peace.local         |I|psModules.imcombine
    POIS kernel: 1,0 --> 8 elements

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x0021c4df in pmReadoutWriteSubtractionKernels ()
(gdb) bt
#0  0x0021c4df in pmReadoutWriteSubtractionKernels ()
#1  0x000100c0 in ppStackMatch (readout=0x2741194, regions=0xbfffe7d4, kernels=0xbfffe7d0, chi2=0x2740da4, sources=0x0, psf=0x0, rng=0x2740334, config=0xe06b14) at ppStackMatch.c:297
#2  0x00008a2f in ppStackLoop (config=0xe06b14) at ppStackLoop.c:484
#3  0x000027e0 in main (argc=3, argv=0xbfffea7c) at ppStack.c:59
----

Here's the test3.mdc file

----
[mwv@peace skycell.0198755.new] cat test3.mdc
INPUT0   METADATA
    IMAGE      STR   905092.fits
    MASK       STR   905092.mk.fits
    WEIGHT     STR   905092.wt.fits
#    PSF        STR   905092.psf
    SOURCES    STR   905092.cmf
    WEIGHTING  F32   1.0
    SCALE      F32   1.0
END

INPUT1   METADATA
    IMAGE      STR   906046.fits
    MASK       STR   906046.mk.fits
    WEIGHT     STR   906046.wt.fits
#    PSF        STR   906046.psf
    SOURCES    STR   906046.cmf
    WEIGHTING  F32   1.0
    SCALE      F32   1.0
END

INPUT2   METADATA
# 906046.fits 906287.fits 906450.fits 906747.fits
    IMAGE      STR   906287.fits
    MASK       STR   906287.mk.fits
    WEIGHT     STR   906287.wt.fits
#    PSF        STR   906287.psf
    SOURCES    STR   906287.cmf
    WEIGHTING  F32   1.0
    SCALE      F32   1.0
END
----"	enhancement	closed	high		ppStack	2.6	minor	fixed		
