Abort trap 6
Posted: 2016-02-11T06:37:39-07:00
Hi,
I am a novice user attempting to evaluate the mean of randomly selected sequences with ImageMagick. My library is about 400 jpgs, the largest of which is 2.6mb, and the average is about 1.2mb. They're all the same dimensions. I have a small bash script for evaluating 2-8 images at a time, resulting in a usage like this - convert ${files[*]} -evaluate-sequence mean -normalize $names.jpg
For the most part this has been effective and I have generated thousands of images, however, a large portion (ranging from 2% to 50%) of my attempts fail with an "abort trap 6". I've tried freeing up memory, restarting terminal, restarting my computer, and removing the -normalize from the command, but to no avail. While this isn't critical for me I thought that there is probably something simple I am doing wrong and that you might be able to help resolve the problem.
Many Thanks!
Terminal output:
./random.sh: line 5: 64723 Abort trap: 6 convert ${files[*]} -evaluate-sequence mean -normalize $names.jpg
Version:
ImageMagick 6.9.2-10 Q16 x86_64 2016-02-09
System Info:
ProductName: Mac OS X
ProductVersion: 10.9.5
BuildVersion: 13F34
Professor: 2.3GHZ Intel Core 5
Memory: 16gb 1333 MHz DDR3
Script
Diagnostic Report -
I am a novice user attempting to evaluate the mean of randomly selected sequences with ImageMagick. My library is about 400 jpgs, the largest of which is 2.6mb, and the average is about 1.2mb. They're all the same dimensions. I have a small bash script for evaluating 2-8 images at a time, resulting in a usage like this - convert ${files[*]} -evaluate-sequence mean -normalize $names.jpg
For the most part this has been effective and I have generated thousands of images, however, a large portion (ranging from 2% to 50%) of my attempts fail with an "abort trap 6". I've tried freeing up memory, restarting terminal, restarting my computer, and removing the -normalize from the command, but to no avail. While this isn't critical for me I thought that there is probably something simple I am doing wrong and that you might be able to help resolve the problem.
Many Thanks!
Terminal output:
./random.sh: line 5: 64723 Abort trap: 6 convert ${files[*]} -evaluate-sequence mean -normalize $names.jpg
Version:
ImageMagick 6.9.2-10 Q16 x86_64 2016-02-09
System Info:
ProductName: Mac OS X
ProductVersion: 10.9.5
BuildVersion: 13F34
Professor: 2.3GHZ Intel Core 5
Memory: 16gb 1333 MHz DDR3
Script
Code: Select all
!/bin/bash
# FINDING THE MEAN IMAGE OF RANDOM IMAGES, must be named '#.jpg'
for run in {1..200} #set the number of runs
do
totnum=403 #total number of files, check file names in directory
avenum=6 #number of files to average
names=$avenum
names+=r_pages_
declare -a list #make a variable go hold the random numbers for this run
list=($(gshuf -i 1-$totnum -n $avenum)) #generate n random numbers between 1 and totnum
files=( "${list[@]/%/.jpg}" ) #add .jpg to the files list
#printf "${list[*]}" #display the generated list
for i in "${list[@]}" #loop the list to generate a filename for the output
do
names+=$i #add the current file number to the filename
names+=_
done
convert ${files[*]} -evaluate-sequence mean $names.jpg #execute, -rotate 270 -normalize
printf $run #mark the run number in terminal, add above -rotate 270 to rotate
printf '\n'
done
Code: Select all
Process: convert [64685]
Path: /opt/local/bin/convert
Identifier: convert
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [64290]
Responsible: Terminal [64283]
User ID: 501
Date/Time: 2016-02-11 13:59:52.761 +0100
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000010433e028
VM Regions Near 0x10433e028:
MALLOC_LARGE 000000010431c000-000000010433e000 [ 136K] rw-/rwx SM=PRV
-->
MALLOC_LARGE 00000001043fd000-0000000108662000 [ 66.4M] rw-/rwx SM=PRV
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8cdaf866 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff93b3135c pthread_kill + 92
2 libsystem_c.dylib 0x00007fff8fad2b1a abort + 125
3 libMagickCore-6.Q16.2.dylib 0x0000000103b38db5 MagickSignalHandler + 105
4 libsystem_platform.dylib 0x00007fff8b6c15aa _sigtramp + 26
5 ??? 000000000000000000 0 + 0
6 libsystem_c.dylib 0x00007fff8fad2b1a abort + 125
7 libMagickCore-6.Q16.2.dylib 0x0000000103b38db5 MagickSignalHandler + 105
8 libsystem_platform.dylib 0x00007fff8b6c15aa _sigtramp + 26
9 libMagickCore-6.Q16.2.dylib 0x0000000103b3a7a2 RelinquishMagickMemory + 15
10 libMagickWand-6.Q16.2.dylib 0x0000000103db1d51 MogrifyImageList + 3604
11 libMagickWand-6.Q16.2.dylib 0x0000000103db0e4f MogrifyImages + 557
12 libMagickWand-6.Q16.2.dylib 0x0000000103cf1f10 ConvertImageCommand + 20820
13 libMagickWand-6.Q16.2.dylib 0x0000000103d74b2e MagickCommandGenesis + 426
14 convert 0x0000000103a5eef4 main + 73
15 libdyld.dylib 0x00007fff9238d5fd start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff7ba4c310 rcx: 0x00007fff5c19f1e8 rdx: 0x0000000000000000
rdi: 0x0000000000000507 rsi: 0x0000000000000006 rbp: 0x00007fff5c19f210 rsp: 0x00007fff5c19f1e8
r8: 0x00007fff5c19f700 r9: 0x00000000000009f6 r10: 0x0000000008000000 r11: 0x0000000000000206
r12: 0x000000000000001b r13: 0x00007fcecbd01d40 r14: 0x0000000000000006 r15: 0x000000010433e038
rip: 0x00007fff8cdaf866 rfl: 0x0000000000000206 cr2: 0x000000010f8e6000
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x103a5a000 - 0x103a5efff +convert (0) <90D3ACF7-1926-386C-99F6-03878EC07389> /opt/local/bin/convert
0x103a63000 - 0x103c1ffff +libMagickCore-6.Q16.2.dylib (0) <345FE126-A766-342A-A19E-950FCCBA1CE9> /opt/local/lib/libMagickCore-6.Q16.2.dylib
0x103cb6000 - 0x103de9ff7 +libMagickWand-6.Q16.2.dylib (0) <A3E749ED-1DB0-34D0-AA18-560A058211B8> /opt/local/lib/libMagickWand-6.Q16.2.dylib
0x103e09000 - 0x103e40fff +liblcms2.2.dylib (0) <8F0AA1D2-5FB0-3BC5-99DC-7D377AEA0204> /opt/local/lib/liblcms2.2.dylib
0x103e56000 - 0x103f31fff +libfftw3.3.dylib (0) <BD8ADF23-08C1-38F8-8020-59AC60A5790A> /opt/local/lib/libfftw3.3.dylib
0x103f4b000 - 0x103f77fff +libfontconfig.1.dylib (0) <BF6722D4-19CC-324A-8ED1-283CCD929C7C> /opt/local/lib/libfontconfig.1.dylib
0x103f87000 - 0x103ffdfff +libfreetype.6.dylib (0) <700D873D-C148-3C23-B465-55FC2B3AB053> /opt/local/lib/libfreetype.6.dylib
0x104016000 - 0x104020ff7 +libXext.6.dylib (0) <EDFED030-45A8-384C-B548-A1FE00DE0896> /opt/local/lib/libXext.6.dylib
0x10402b000 - 0x104066ff7 +libXt.6.dylib (0) <4AB89071-4072-378B-A424-7D77D419E2FE> /opt/local/lib/libXt.6.dylib
0x104083000 - 0x1040a0ff7 +liblzma.5.dylib (0) <9CEBD507-6E9D-376F-A4A2-79C4E7E6495F> /opt/local/lib/liblzma.5.dylib
0x1040ac000 - 0x1040bafff +libbz2.1.0.dylib (0) <57564CB0-AD8D-35AD-A8BE-EAF844A6005C> /opt/local/lib/libbz2.1.0.dylib
0x1040c3000 - 0x1040d2ff7 +libz.1.dylib (0) <EE52BDB8-6083-3F10-A193-2E52AAF555E7> /opt/local/lib/libz.1.dylib
0x1040d6000 - 0x1040dbff7 +libltdl.7.dylib (0) <BB8FEDE8-50A1-3951-8E2D-61F3BB39D3B0> /opt/local/lib/libltdl.7.dylib
0x1040e0000 - 0x1040e5ff7 +libSM.6.dylib (0) <8432B9C0-3913-315D-9FDF-8937EB85857D> /opt/local/lib/libSM.6.dylib
0x1040ea000 - 0x1040f9fff +libICE.6.dylib (0) <DA3939F8-0829-3B84-9E51-B36E9A0F1321> /opt/local/lib/libICE.6.dylib
0x104108000 - 0x1041fdfff +libX11.6.dylib (0) <33028A20-6F70-36B9-BB0D-50DEA4BC72D5> /opt/local/lib/libX11.6.dylib
0x104222000 - 0x10423bff7 +libexpat.1.dylib (0) <FC0B6E54-ED80-3460-B2AC-C8B5041957F3> /opt/local/lib/libexpat.1.dylib
0x104247000 - 0x104269fff +libpng16.16.dylib (0) <1AC789B4-1D7F-318F-AA11-B10EDFA39746> /opt/local/lib/libpng16.16.dylib
0x104275000 - 0x104284fff +libxcb.1.dylib (0) <C7546AB5-D8E8-3E1B-B5CD-027BE7517659> /opt/local/lib/libxcb.1.dylib
0x10429a000 - 0x10429bfff +libXau.6.dylib (0) <935C8321-AAF2-3DED-AC86-293C2FAB97EC> /opt/local/lib/libXau.6.dylib
0x1042a4000 - 0x1042a7ff7 +libXdmcp.6.dylib (0) <A669F1F9-DC0E-38F6-B782-97A43C0A88C4> /opt/local/lib/libXdmcp.6.dylib
0x1042d8000 - 0x1042e3fff +jpeg.so (0) <C4728936-1FBB-3F81-B70B-DEC492E260B4> /opt/local/lib/*/jpeg.so
0x1042e8000 - 0x104315ff7 +libjpeg.9.dylib (0) <08C3C5E3-8C99-3CCB-9A9E-15BF05CBB9F3> /opt/local/lib/libjpeg.9.dylib
0x7fff6ca3f000 - 0x7fff6ca72817 dyld (239.4) <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld
0x7fff8a380000 - 0x7fff8a387fff libcompiler_rt.dylib (35) <4CD916B2-1B17-362A-B403-EF24A1DAC141> /usr/lib/system/libcompiler_rt.dylib
0x7fff8a388000 - 0x7fff8a389ffb libremovefile.dylib (33) <3543F917-928E-3DB2-A2F4-7AB73B4970EF> /usr/lib/system/libremovefile.dylib
0x7fff8a826000 - 0x7fff8a827ff7 libSystem.B.dylib (1197.1.1) <E6BCC031-4342-318C-A1AD-A8E9AEAE716F> /usr/lib/libSystem.B.dylib
0x7fff8af40000 - 0x7fff8af45ff7 libunwind.dylib (35.3) <78DCC358-2FC1-302E-B395-0155B47CB547> /usr/lib/system/libunwind.dylib
0x7fff8b1aa000 - 0x7fff8b1abfff libsystem_sandbox.dylib (278.11.1) <0D0B13EA-6B7A-3AC8-BE60-B548543BEB77> /usr/lib/system/libsystem_sandbox.dylib
0x7fff8b6be000 - 0x7fff8b6c4ff7 libsystem_platform.dylib (24.90.1) <3C3D3DA8-32B9-3243-98EC-D89B9A1670B3> /usr/lib/system/libsystem_platform.dylib
0x7fff8c239000 - 0x7fff8c268fd2 libsystem_m.dylib (3047.16) <B7F0E2E4-2777-33FC-A787-D6430B630D54> /usr/lib/system/libsystem_m.dylib
0x7fff8cd9a000 - 0x7fff8cdb6ff7 libsystem_kernel.dylib (2422.115.4) <9EDE872E-2A9E-3A78-8E1D-AB790794A098> /usr/lib/system/libsystem_kernel.dylib
0x7fff8e92d000 - 0x7fff8e92efff libunc.dylib (28) <62682455-1862-36FE-8A04-7A6B91256438> /usr/lib/system/libunc.dylib
0x7fff8fa76000 - 0x7fff8faffff7 libsystem_c.dylib (997.90.3) <6FD3A400-4BB2-3B95-B90C-BE6E9D0D78FA> /usr/lib/system/libsystem_c.dylib
0x7fff8ffee000 - 0x7fff9003cfff libcorecrypto.dylib (161.1) <F3973C28-14B6-3006-BB2B-00DD7F09ABC7> /usr/lib/system/libcorecrypto.dylib
0x7fff91200000 - 0x7fff91252fff libc++.1.dylib (120) <4F68DFC5-2077-39A8-A449-CAC5FDEE7BDE> /usr/lib/libc++.1.dylib
0x7fff91873000 - 0x7fff9188eff7 libsystem_malloc.dylib (23.10.1) <A695B4E4-38E9-332E-A772-29D31E3F1385> /usr/lib/system/libsystem_malloc.dylib
0x7fff918c0000 - 0x7fff918dafff libdispatch.dylib (339.92.1) <C4E4A18D-3C3B-3C9C-8709-A4270D998DE7> /usr/lib/system/libdispatch.dylib
0x7fff9238a000 - 0x7fff9238dff7 libdyld.dylib (239.4) <A1273A02-4928-3BAC-A846-6C069DC1A0A6> /usr/lib/system/libdyld.dylib
0x7fff92e6e000 - 0x7fff92e72ff7 libsystem_stats.dylib (93.90.3) <337946FC-B2E1-3DFA-A8B5-30DA8D584D75> /usr/lib/system/libsystem_stats.dylib
0x7fff93657000 - 0x7fff9365effb libcopyfile.dylib (103.92.1) <CF29DFF6-0589-3590-834C-82E2316612E8> /usr/lib/system/libcopyfile.dylib
0x7fff9365f000 - 0x7fff93668ffb libsystem_notify.dylib (121.20.1) <9B34B4FE-F5AD-3F09-A5F0-46AFF3571323> /usr/lib/system/libsystem_notify.dylib
0x7fff936a8000 - 0x7fff936a8ff7 libkeymgr.dylib (28) <3AA8D85D-CF00-3BD3-A5A0-E28E1A32A6D8> /usr/lib/system/libkeymgr.dylib
0x7fff938d7000 - 0x7fff938deff8 liblaunch.dylib (842.92.1) <A40A0C7B-3216-39B4-8AE0-B5D3BAF1DA8A> /usr/lib/system/liblaunch.dylib
0x7fff93b2f000 - 0x7fff93b36ff7 libsystem_pthread.dylib (53.1.4) <AB498556-B555-310E-9041-F67EC9E00E2C> /usr/lib/system/libsystem_pthread.dylib
0x7fff93c54000 - 0x7fff93c7bffb libsystem_info.dylib (449.1.3) <7D41A156-D285-3849-A2C3-C04ADE797D98> /usr/lib/system/libsystem_info.dylib
0x7fff943ee000 - 0x7fff9459bf27 libobjc.A.dylib (551.1) <AD7FD984-271E-30F4-A361-6B20319EC73B> /usr/lib/libobjc.A.dylib
0x7fff94e09000 - 0x7fff94e4bff7 libauto.dylib (185.5) <F45C36E8-B606-3886-B5B1-B6745E757CA8> /usr/lib/libauto.dylib
0x7fff94e4c000 - 0x7fff94e54fff libsystem_dnssd.dylib (522.92.1) <17B03FFD-92C5-3282-9981-EBB28B456207> /usr/lib/system/libsystem_dnssd.dylib
0x7fff9527c000 - 0x7fff9527dff7 libDiagnosticMessagesClient.dylib (100) <4CDB0F7B-C0AF-3424-BC39-495696F0DB1E> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff95e17000 - 0x7fff95e1bff7 libcache.dylib (62) <BDC1E65B-72A1-3DA3-A57C-B23159CAAD0B> /usr/lib/system/libcache.dylib
0x7fff95e8c000 - 0x7fff95eb0fff libxpc.dylib (300.90.2) <AB40CD57-F454-3FD4-B415-63B3C0D5C624> /usr/lib/system/libxpc.dylib
0x7fff95f90000 - 0x7fff95f92ff7 libquarantine.dylib (71) <7A1A2BCB-C03D-3A25-BFA4-3E569B2D2C38> /usr/lib/system/libquarantine.dylib
0x7fff96178000 - 0x7fff96182fff libcommonCrypto.dylib (60049) <8C4F0CA0-389C-3EDC-B155-E62DD2187E1D> /usr/lib/system/libcommonCrypto.dylib
0x7fff968df000 - 0x7fff968e0ff7 libsystem_blocks.dylib (63) <FB856CD1-2AEA-3907-8E9B-1E54B6827F82> /usr/lib/system/libsystem_blocks.dylib
0x7fff968f2000 - 0x7fff96919ff7 libsystem_network.dylib (241.3) <8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364> /usr/lib/system/libsystem_network.dylib
0x7fff970f2000 - 0x7fff970f7fff libmacho.dylib (845) <1D2910DF-C036-3A82-A3FD-44FF73B5FF9B> /usr/lib/system/libmacho.dylib
0x7fff975cd000 - 0x7fff975deff7 libsystem_asl.dylib (217.1.4) <655FB343-52CF-3E2F-B14D-BEBF5AAEF94D> /usr/lib/system/libsystem_asl.dylib
0x7fff97844000 - 0x7fff97846ff3 libsystem_configuration.dylib (596.15) <4998CB6A-9D54-390A-9F57-5D1AC53C135C> /usr/lib/system/libsystem_configuration.dylib
0x7fff978a7000 - 0x7fff978d0ff7 libc++abi.dylib (49.1) <21A807D3-6732-3455-B77F-743E9F916DF0> /usr/lib/libc++abi.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 3606915
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=78.7M resident=19.3M(25%) swapped_out_or_unallocated=59.4M(75%)
Writable regions: Total=507.5M written=397.7M(78%) resident=397.9M(78%) swapped_out=0K(0%) unallocated=109.6M(22%)
REGION TYPE VIRTUAL
=========== =======
Kernel Alloc Once 4K
MALLOC 432.5M
MALLOC (admin) 16K
MALLOC_LARGE (reserved) 66.4M reserved VM address space (unallocated)
STACK GUARD 56.0M
Stack 8192K
VM_ALLOCATE 12K
__DATA 1268K
__LINKEDIT 66.9M
__TEXT 11.8M
shared memory 4K
=========== =======
TOTAL 642.9M
TOTAL, minus reserved VM space 576.5M