supplierdeeply

DNG and JPG files are corrupted (filled with zeros)

  • 13 Replies
  • 362 Views
DNG and JPG files are corrupted (filled with zeros)
« on: 19 / May / 2017, 06:56:53 »
Advertisements
I am using CHDK unstable 1.5
on a ixus 220hs

I am running a LUA script to shot, sometimes I got bad DNGs and JPGs, they are the correct? size (eg: the JPG size are between 1.5MB 2.3MB) but the files are all filled with zeros ( 0x00 )

I usually turn off the camera and start again the script to recover.
I cannot see any pattern here.

Could anyone comment this issue or give some suggestions?
Any more info I can give?

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #1 on: 19 / May / 2017, 07:11:54 »
What script?  (link?) What camera mode are you using? (Auto, P, Sports,M ?) Are you using a Canon scene mode? Are you using a Canon multiple shot mode? Does the script sometimes produce good JPG & DNG  images? If you disable DNG, are the JPG images still spmetimes bad?
Ported : A1200  SD940  G10  Powershot N  G16*

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #2 on: 19 / May / 2017, 07:15:47 »
It is my own LUA script (I am setting the shot parameters by commands)
It works with no problems for most of the times. I can take several shots but sometimes after I start the camera again (turn ON) they get corrupted.

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #3 on: 19 / May / 2017, 08:51:46 »
Please post the script as an attachment.   Also, it would be good if you would answer the other questions I posted about camera setting.   That information could be quite important.
Ported : A1200  SD940  G10  Powershot N  G16*


Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #4 on: 19 / May / 2017, 08:59:54 »
I don't know about the other camera settings. I guess they are all the default. The camera it self is on AUTO mode.
In any case I would like to setup every possible parameters using the script.

It happened to me today that while I was working with the SD card on the computer, while editing the script file, for some reason it also got filled with zeros when I opened it on the camera. I am not sure if it was the computer or the camera that reset/filled the file.

The script is not that big so I place it here.
Code: [Select]
--[[
@title USB Triggered
@chdk_version 1.3
--]]

set_config_value(121, 1)

focus_distance = 65535

props = require("propcase")

set_config_value(106, 1)
set_config_value(105, 100)

set_raw(1)
set_raw_nr("2")

set_zoom(0)

repeat
sleep(100)
until (get_zoom() == 0)

set_mf(1)
set_aflock(1)
set_prop(props.AF_LOCK,1)

sleep(100)

press("shoot_half")
repeat
sleep(100)
until get_shooting() == true
release("shoot_half")

repeat
if ( get_usb_power(1) > 0 ) then

set_focus(focus_distance)
sleep(1000)


ecnt = get_exp_count()

set_tv96_direct(192)
set_nd_filter(2)

press("shoot_full_only")

repeat
      sleep(100)
    until(get_exp_count()~=ecnt)

release("shoot_full_only")

    repeat
    sleep(100)
    until ( get_usb_power(1) == 0 )

else
sleep(100)
end
until is_pressed("menu")

set_config_value(121, 0)

set_aflock(0)
set_mf(0)

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #5 on: 19 / May / 2017, 09:27:49 »
I found another possible related issue,
it looks that for some reason it cannot correctly write to the card or something gets corrupted on the card while using CHDK.
The reason I said that is because the script settings (auto load script) stop work (i.e it will not auto start the script and is falling back to the default script).

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #6 on: 19 / May / 2017, 09:39:43 »
You might have a corrupted card?  Try a low level reformat and then reinstall CHDK. Or use a different SD card?
Ported : A1200  SD940  G10  Powershot N  G16*

*

Offline reyalp

  • ******
  • 10416
Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #7 on: 19 / May / 2017, 17:38:23 »
I am using CHDK unstable 1.5
on a ixus 220hs

I am running a LUA script to shot, sometimes I got bad DNGs and JPGs, they are the correct? size (eg: the JPG size are between 1.5MB 2.3MB) but the files are all filled with zeros ( 0x00 )

I usually turn off the camera and start again the script to recover.
I cannot see any pattern here.

Could anyone comment this issue or give some suggestions?
Any more info I can give?
What script are you using?
Is the value actually 0 in the raw, or just (roughly) black level?

One possibility is the the mechanical shutter is failing, or the script is interfering with it opening.

Edit: Oops, for some reason I only saw the first post  ???

The sx230 has unresolved issues with raw in continuous and fast shooting "hold half, click full"
See https://chdk.setepontos.com/index.php?topic=6397.msg113180#msg113180 and other threads by Razor512.

However, this hasn't been reported to cause black images.

edit: Oops again, I see you are using an ixus not an SX, so this likely doesn't apply.
« Last Edit: 19 / May / 2017, 23:04:00 by reyalp »
Don't forget what the H stands for.


Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #8 on: 19 / May / 2017, 19:06:58 »
the images are not black, the files are all binary filled with zero, the whole file.

I am new to chdk, how can I debug asserts or when the camera crash? to check the error logs?

Re: DNG and JPG files are corrupted (filled with zeros)
« Reply #9 on: 19 / May / 2017, 19:21:29 »
the images are not black, the files are all binary filled with zero, the whole file.
I am new to chdk, how can I debug asserts or when the camera crash? to check the error logs?
Did you try reformatting your SD card?
Ported : A1200  SD940  G10  Powershot N  G16*

 

Related Topics