I'd guess a semaphore protecting suba would probably fix this.
!mc:delete_images_list(mc:imglist(),{verbose=true})
___> !mc=require('multicam')___> !mc:connect({list='C:/CHDKPTP/listfile'})+ 1:Canon PowerShot SX150 IS b=\\.\libusb0-0001--0x04a9-0x3234 d=bus-0 s=D10AC15E25614FEBB5AF36C058AE46E1___> !mc:start()___> !return mc:cmdwait('rec')rec=true,{ [10]={ done=true, status={ status=true, cmd="rec", }, failed=false, },}___> !mc:delete_images_list(mc:imglist(),{verbose=true})os.remove("A/DCIM/156___10/IMG_0001.JPG")os.remove("A/DCIM/156___10/IMG_0002.JPG")os.remove("A/DCIM/156___10/IMG_0003.JPG")os.remove("A/DCIM/156___10/IMG_0004.JPG")os.remove("A/DCIM/156___10/IMG_0005.JPG")os.remove("A/DCIM/156___10/IMG_0006.JPG")os.remove("A/DCIM/156___10/IMG_0007.JPG")os.remove("A/DCIM/156___10/IMG_0008.JPG")os.remove("A/DCIM/156___10/IMG_0009.JPG")os.remove("A/DCIM/156___10/IMG_0010.JPG")os.remove("A/DCIM/156___10/IMG_0011.JPG")os.remove("A/DCIM/156___10/IMG_0012.JPG")os.remove("A/DCIM/156___10/IMG_0013.JPG")os.remove("A/DCIM/156___10/IMG_0014.JPG")os.remove("A/DCIM/156___10/IMG_0015.JPG")os.remove("A/DCIM/156___10/IMG_0016.JPG")os.remove("A/DCIM/156___10/IMG_0017.JPG")os.remove("A/DCIM/156___10/IMG_0018.JPG")os.remove("A/DCIM/156___10/IMG_0019.JPG")os.remove("A/DCIM/156___10/IMG_0020.JPG")os.remove("A/DCIM/156___10/IMG_0021.JPG")os.remove("A/DCIM/156___10/IMG_0022.JPG")os.remove("A/DCIM/156___10/IMG_0023.JPG")os.remove("A/DCIM/156___10/IMG_0024.JPG")os.remove("A/DCIM/156___10/IMG_0025.JPG")os.remove("A/DCIM/156___10/IMG_0026.JPG")os.remove("A/DCIM/156___10/IMG_0027.JPG")os.remove("A/DCIM/156___10/IMG_0028.JPG")os.remove("A/DCIM/156___10/IMG_0029.JPG")os.remove("A/DCIM/156___10/IMG_0030.JPG")os.remove("A/DCIM/156___10/IMG_0031.JPG")os.remove("A/DCIM/156___10/IMG_0032.JPG")os.remove("A/DCIM/156___10/IMG_0033.JPG")os.remove("A/DCIM/156___10/IMG_0034.JPG")os.remove("A/DCIM/156___10/IMG_0035.JPG")os.remove("A/DCIM/156___10/IMG_0036.JPG")os.remove("A/DCIM/156___10/IMG_0037.JPG")os.remove("A/DCIM/156___10/IMG_0038.JPG")os.remove("A/DCIM/156___10/IMG_0039.JPG")os.remove("A/DCIM/156___10/IMG_0040.JPG")os.remove("A/DCIM/156___10/IMG_0041.JPG")os.remove("A/DCIM/156___10/IMG_0042.JPG")os.remove("A/DCIM/156___10/IMG_0043.JPG")os.remove("A/DCIM/156___10/IMG_0044.JPG")os.remove("A/DCIM/156___10/IMG_0045.JPG")os.remove("A/DCIM/156___10/IMG_0046.JPG")os.remove("A/DCIM/156___10/IMG_0047.JPG")os.remove("A/DCIM/156___10/IMG_0048.JPG")os.remove("A/DCIM/156___10/IMG_0049.JPG")os.remove("A/DCIM/156___10/IMG_0050.JPG")os.remove("A/DCIM/156___10/IMG_0051.JPG")os.remove("A/DCIM/156___10/IMG_0052.JPG")os.remove("A/DCIM/156___10/IMG_0053.JPG")os.remove("A/DCIM/156___10/IMG_0054.JPG")os.remove("A/DCIM/156___10/IMG_0055.JPG")os.remove("A/DCIM/156___10/IMG_0056.JPG")os.remove("A/DCIM/156___10/IMG_0057.JPG")os.remove("A/DCIM/156___10/IMG_0058.JPG")os.remove("A/DCIM/156___10/IMG_0059.JPG")os.remove("A/DCIM/156___10/IMG_0060.JPG")os.remove("A/DCIM/156___10/IMG_0061.JPG")os.remove("A/DCIM/156___10/IMG_0062.JPG")os.remove("A/DCIM/156___10/IMG_0063.JPG")os.remove("A/DCIM/156___10/IMG_0064.JPG")os.remove("A/DCIM/156___10/IMG_0065.JPG")os.remove("A/DCIM/156___10/IMG_0066.JPG")os.remove("A/DCIM/156___10/IMG_0067.JPG")os.remove("A/DCIM/156___10/IMG_0068.JPG")os.remove("A/DCIM/156___10/IMG_0069.JPG")os.remove("A/DCIM/156___10/IMG_0070.JPG")os.remove("A/DCIM/156___10/IMG_0071.JPG")os.remove("A/DCIM/156___10/IMG_0072.JPG")os.remove("A/DCIM/156___10/IMG_0073.JPG")os.remove("A/DCIM/156___10/IMG_0074.JPG")os.remove("A/DCIM/156___10/IMG_0075.JPG")os.remove("A/DCIM/156___10/IMG_0076.JPG")os.remove("A/DCIM/156___10/IMG_0077.JPG")os.remove("A/DCIM/156___10/IMG_0078.JPG")os.remove("A/DCIM/156___10/IMG_0079.JPG")os.remove("A/DCIM/156___10/IMG_0080.JPG")os.remove("A/DCIM/156___10/IMG_0081.JPG")os.remove("A/DCIM/156___10/IMG_0082.JPG")os.remove("A/DCIM/156___10/IMG_0083.JPG")os.remove("A/DCIM/156___10/IMG_0084.JPG")os.remove("A/DCIM/156___10/IMG_0085.JPG")os.remove("A/DCIM/156___10/IMG_0086.JPG")os.remove("A/DCIM/156___10/IMG_0087.JPG")os.remove("A/DCIM/156___10/IMG_0088.JPG")os.remove("A/DCIM/156___10/IMG_0089.JPG")os.remove("A/DCIM/156___10/IMG_0090.JPG")os.remove("A/DCIM/156___10/IMG_0091.JPG")os.remove("A/DCIM/156___10/IMG_0092.JPG")os.remove("A/DCIM/156___10/IMG_0093.JPG")os.remove("A/DCIM/156___10/IMG_0094.JPG")os.remove("A/DCIM/156___10/IMG_0095.JPG")os.remove("A/DCIM/156___10/IMG_0096.JPG")ERROR: call failed:I/O error___> !mc:camstatus()#1 NOT connectedSummary: 1 cameras (0 connected, 1 disconnected)___>
On my G12 the original code takes 3.2usec per loop iteration.Adding the semaphore increases this to 7.7usec per iteration, with the additional safety checks on the free list it jumps to 9usec.
Since the problem doesn't see to be related to memory corruption I think the safety checks can be left out (although I would probably make them conditionally compilable into the code).
Purely out of curiosity, it might be interesting to know how OS malloc compares.
QuoteSince the problem doesn't see to be related to memory corruption I think the safety checks can be left out (although I would probably make them conditionally compilable into the code).Having them conditionally compilable at least seems like a good idea. I wouldn't be averse to having them enabled all the time either.
did the crash while deleting generate a romlog?
Quote from: reyalp on 07 / October / 2017, 16:02:34did the crash while deleting generate a romlog?Yes, i'm almost entirely sure the attached was it.
Of some slight interest, perhaps, prior to this test (with Phil's V2 build) I had manually copied 500 images (copies of the same file) to a single camera (I had used http://www.bulkrenameutility.co.uk/Main_Intro.php to name them as IMG_0001.JPG through IMG_0500.JPG).On executing: Code: [Select]!mc:delete_images_list(mc:imglist(),{verbose=true})nothing was returned to the CLI but there was no apparent crash.
Because this is a significant code rewrite, I want to do some more testing on the suba code before committing this to SVN.Any additional review/testing/comments would be welcome (my time is limited these days).
I did not get any crashes doing this on my G12 with the new suba code.
Started by superfly Feature Requests
Started by artanim Creative Uses of CHDK
Started by indian22 « 1 2 3 4 5 » General Discussion and Assistance
Started by ghust10 RAW Shooting and Processing
Started by amavroidis « 1 2 ... 5 6 » General Discussion and Assistance