I'm not sure if this is the right place since this topic is more than 6 years old, but it seems that I have exactly the same problem:
The camera freezes when the camera was in playback mode and the command rec is called. I'm still able to connect and disconnect to the camera but any command I call after this the camera gives the error message "ERROR: a script is already running".
If I manually delete all photos in playback mode via the Canon menu, the imaginary counter of photos stored on the SD card is back to 0 and the camera does not freeze for the next run.
How can I use the "event procedure named "PT_EraseAllFile"" for the g1x, or is that too complicated?
# allocate a buffer# 0xff00420c,mallocexec ptr=con:call_function(0xff00420c,4)# set the contents of the buffer to the address of a function that returns 0# in this case PT_ShootPicture, which is a "hook" eventproc that defaults to no-op.# 0xff077f48,PT_ShootPicture_FW# disassembly# PT_ShootPicture_FW 0xff077f48# mov r0, #0# bx lrexec con:execwait(string.format([[poke(%d,0xff077f48)]],ptr))# call PT_EraseAllFile with the buffer# 0xff077f50,PT_EraseAllFile_FWexec con:call_function(0xff077f50,ptr)# free the buffer# 0xff004264,freeexec con:call_function(0xff004264,ptr)
This doesn't sound like one of the classic remoteshoot issues previously discussed in this thread. It sounds like the rec command is hanging, which is odd since the CHDK script part should time out if the switch fails, but maybe the C function itself is hanging.
Have you tried adding -filedummy to the remoteshoot command?This creates an empty file with the appropriate name on the camera for each remoteshoot, which avoids some of the known problems. You can then delete the files after switching to play with imrm.
Another thing I noticed in your script: You turn off the LCD with luar set_lcd_display(0) at the end. I would recommend turning it on before attempting to switch to rec. Using mode switch while the display is off causes problems in some cases. I would try this before other stuff, since IMO, it's a more likely match for your description.
edit:Here's what the sequence for using PT_EraseAllFile would look like, using call_function. Note that it would be simpler if you get native calls enabled in CHDK CFG. I tested the equivalent on d10 and it appear to work, erasing all images in rec mode. However, I don't have a g1x so the below is untested.All addresses are for g1x 100eCode: [Select]# allocate a buffer# 0xff00420c,mallocexec ptr=con:call_function(0xff00420c,4)# set the contents of the buffer to the address of a function that returns 0# in this case PT_ShootPicture, which is a "hook" eventproc that defaults to no-op.# 0xff077f48,PT_ShootPicture_FW# disassembly# PT_ShootPicture_FW 0xff077f48# mov r0, #0# bx lrexec con:execwait(string.format([[poke(%d,0xff077f48)]],ptr))# call PT_EraseAllFile with the buffer# 0xff077f50,PT_EraseAllFile_FWexec con:call_function(0xff077f50,ptr)# free the buffer# 0xff004264,freeexec con:call_function(0xff004264,ptr)
It is also hanging in play mode when just trying to open the menu or clicking the left or right button.(The screen was off, I was navigating with the chdkptp GUI and in the live mode stream there was only displayed "Unidentified Image")
Yes I have tried -filedummy. Actually it isn't documented in https://github.com/tudelft/chdkptp/blob/master/USAGE.TXT
But I could not find the dummy files in the DCIM directory, I believe they have not been created?
I will also try this out and see if it brings the desired effect, But before I need someone of my family to restart the camera (I think they did it at least 30 times in the last few days... :'( )
Yes I need the native calls enabled in CHDK CFG, but I need still some more time to set up and to build my own firmware. I found out that with set_config_value I'm not able to change the native call function setting.
I tested the code snippet and it works fine in the first 5 test runs I did, no more "Unidentified Image" in paly mode, and more important no freezing's of any kind! I believe this not only alleviated symptoms but treated the source of the problem.
It is also hanging in play mode when just trying to open the menu or clicking the left or right button.(The screen was off, I was navigating with the chdkptp GUI and in the live mode stream there was only displayed "Unidentified Image")Hmm, this is odd. If you can describe the minimal steps needed to reproduce that would be helpful. Is it juststart camera with USB connectedrecremoteshootplayattempt to use menu?
FWIW, some people use a power supply controlled from a raspberry pi or microcontroller. Most cameras power on automatically if the power button is permanently held. This is how the http://escursionisticivatesi.it/webcam/ were set up. There are some additional caveats I can describe if you decide you want to go down that route.
I believe the chdkde builds (https://forum.chdk-treff.de/download_dev.php) default to native calls enabled. I can also provide you with builds if you want.
And this morning the script stopped at the "change to rec mode" message and did not reached line 9 where message "zoom set to 28%" is displayed.
Maybe I need to wake up the camera after some hours chilling in play mode?
I am not a fan of this approach as I believe it would increase complexity and error proneness.
Native calls are not per default enabled in the DE build but the setting remains enabled if the camera is rebooted, which is great!
Again the chdkptp script works without problems when little time has elapsed between the runs. I have now tested it from a few seconds to about 30 minutes. FYI:The first time I run rawopint for a test run I got an error after the first and only photo was transferred to the pc:WARNING: capture_get_data error timed outERROR: timed outERROR: error on line 30I run the chdkptp script again without any changes and it work from the second run on fine.
So, the same symptom as before, hanging in 'rec', which previously seemed to be fixed with the PT_EraseAllFile code?
I'm not aware of anything like that. The only power saving type things I'm aware of in playback mode is lens retract and the option of the camera turning off completely after some time. The CHDK "disabled LCD off" option also affects the power off behavior.Maybe try without the lens retract override? It doesn't seem like it should be, but it is poking internals that have to do with sitting in play mode.Does the computer stay on all the time, or is it powered off or in sleep in between?
Yes I will try now without retract override. Is there maybe a way to undo the retract override changes before changing to rec?
I think he doesn't use remote shoot... Maybe I could also try to shoot all the images on the sd card and then transfer them to the pc?
luar < file.lua
Also the idea of creating a dummy file as suggested from you earlier could be worth an attempt? Is it possible to use the lib (functions) directly in the rawopint code or do I have to copy the right code line into the rawopint code?
con:exec('rs_opts='..opts_s..' '..shootscript,{libs={'rs_shoot'},execinfo=execinfo})
Perhaps @c_joerg has a bit more experience with this behaviour, as he seems to be using the g1x as I would like, with Lens Retraction Override and Wait in Play Mode and perhaps also using Rawopint.
Started by cyril42e « 1 2 » General Discussion and Assistance
Started by Dr.Pat « 1 2 3 » Feature Requests
Started by Sedric General Help and Assistance on using CHDK stable releases
Started by Dave the Wave General Help and Assistance on using CHDK stable releases
Started by Hardware_Hacker General Discussion and Assistance