gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
1.05k stars 325 forks source link

Removed bitmask from devicepropchanged call that crashed using Nikon Z9 #988

Closed Noxet closed 3 months ago

Noxet commented 3 months ago

Analysis shows that when the camera failed was when a DevicePropCode > 16bit was being used. In this particular case it is the MovieTVLockSetting in the Z9, with the propcode 0x1D00F. The event.Param1 variable is a uint32, and the function ptp_generic_getdevicepropdesc expects a uint32, so the bitmask is a bit strange here, also causing the program to crash since it will result in a non-existing propcode.

I also updated the prints to show the full 32bit values, instead of only 16 bits. My test program now runs without issue on the Z9.

For issue #987

msmeissn commented 3 months ago

can you provide logfiles?

properties are 16 bit.

msmeissn commented 3 months ago

hmm, checked the Z9 SDK just now ... and you are right actually. Nikon started 32bit propcodes.