Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after toggling video movie recording mode using gphoto command line, C++, or Python wrapper #1080

Open
hytel opened this issue Jan 20, 2025 · 0 comments

Comments

@hytel
Copy link

hytel commented Jan 20, 2025

I'm creating an app that is commanding a Sony A7RIII extensively. Nearly everything works. However, I do want to start/stop recording a video at one point, and no matter how I code it, I get a crash. To be clear, it DOES toggle the recording correctly, but crashes in the gp_camera_set_config. This means my application exits before performing other tasks. Of all the the examples I see online, there are actually very few that I see that toggle on/off video recording (lots for preview or still capture though!). This even happens in gphoto2 on the command line simply with:

gphoto2 --set-config movie=1

which does the task but gives:

Segmentation fault (core dumped)

A simple C++ program showing the same thing:

#include <stdio.h>

#include <gphoto2/gphoto2-camera.h>

#define CHECK(f) {int res = f; if (res < 0) {printf ("ERROR: %s\n", gp_result_as_string (res)); return (1);}}

int main() {

Camera *camera;
CameraWidget *root_widget;
GPContext *context;
CameraWidget *movie_child;

CHECK (gp_camera_new (&camera));
int ret = gp_camera_get_config (camera, &root_widget, context);
printf("%d\n", ret);

ret = gp_widget_get_child_by_name(root_widget, "movie", &movie_child);
printf("Child by Name: %d\n", ret);

int val = 1;

ret = gp_widget_set_value(movie_child, &val);
printf("Set Value: %d\n", ret);

ret = gp_camera_set_config(camera, root_widget, context);
printf("Set Config: %d\n", ret);

ret = gp_camera_exit(camera, context);
printf("Exit: %d\n", ret);

return 0;
}

Name the camera
Model Port

Sony Alpha-A7r III (PC Control) usb:001,018

libgphoto2 and gphoto2 version
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.28 gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2 2.5.31 standard camlibs, gcc, no ltdl, EXIF
libgphoto2_port 0.12.2 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking

To Reproduce
Same crash on the command line as above with gphoto2, or with the C++ code above, or even using the python wrapper. It's a pity because is this is the LAST function I need for my controlling app :-(

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant