Re: FILE_ADDED events getting lost

Marcus Meissner <[email protected]> Tue, 6 Oct 2020 07:54:48 +0200
Newsgroups gmane.comp.multimedia.gphoto.user
Organization SUSE Software Solutions Ger many GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany , GF: Felix Imendörffer, HRB 36809, AG Nürnber g
Message-ID <[email protected]>
Hi,

- Is this libgphoto2 using libusb1 or libusb0?

  If you are using libusb0, it is possible to lose USB interrupts if you are not
  waiting for events actively.

- just to check, you are polling with gp_camera_wait_for_event until GP_EVENT_TIMEOUT
  is returned?

  There might be multiple events buffered.

I am also curious about the timing difference when using gp_camera_wait_for_event,
this is something I would need to fix.

When did you see this change of reliability happen? When you passed
longer times to gp_camera_wait_for_event?

Ciao, Marcus

On Mon, Oct 05, 2020 at 07:06:17PM -0700, Dave Taylor wrote:
> FYI, I just tried linking against a build from the master branch on
> the libgphoto2 git repo today (as of commit 72c0ff69e1), and I'm
> seeing the same GP_EVENT_UNKNOWN behaviour.
> 
>         =-ddt->
> 
> 
> 
> On Mon, Oct 5, 2020 at 2:48 PM Dave Taylor <[email protected]> wrote:
> >
> > I'm using a mix of Nikon D5300s and D5600s, and we're triggering the
> > focus and shutter externally using hardware (through the MC-DC2 port),
> > and then I'm using gp_camera_wait_for_event() to spot a
> > GP_EVENT_FILE_ADDED event, so I can know when to grab it.
> >
> > I was using the timeout support in that call, but I wasn't seeing a
> > correlation between real time and the stated milliseconds I was
> > passing to gp_camera_wait_for_event(), so I tried passing 0ms, 1ms,
> > and 10ms timeouts, and then I just polled that for 10 real seconds by
> > checking clock_gettime(CLOCK_REALTIME) until I got 10 real seconds
> > passed since the start of the loop.
> >
> > I'm not sure if it was that change or something else, but I am
> > definitely no longer getting reliable GP_EVENT_FILE_ADDED events, even
> > when I confirm that the file did show up on the internal SD card.
> >
> > For some reason, instead, I'll get three GP_EVENT_UNKNOWN's, and
> > sometimes, oddly, the next time I restart my code using
> > gp_camera_init() and friends, when I go through and discard any events
> > that might have been queued up by initialization, I'll sometimes see a
> > GP_EVENT_FILE_ADDED, but even more maddeningly, not always.
> >
> > Resetting the camera power will usually allow it to work for one shot
> > with the GP_EVENT_FILE_ADDED event showing up properly, and then on
> > subsequent shots, it'll get back in that state where it gives me those
> > GP_EVENT_UNKNOWN's, never to return until the camera is power-cycled.
> > Note that restarting my process using libgphoto2 has no bearing on
> > recovering from this state.
> >
> > Also, does the fact that the timeouts don't seem to track real-time
> > sound familiar to you?  Or am I a weirdo for seeing that?
> >
> > What I'm really hoping is that these symptoms sound familiar to you,
> > and you suggest what I might next try to further isolate what's
> > happening.
> >
> > I'm on the Debian package libgphoto2-dev 2.5.22-3 on a Raspberry Pi 3
> > running Raspbian Buster.
> >
> > I'm kind of at my wit's end how to further isolate this.  If you could
> > suggest any strategies to help track this down, I'd love suggestions!
> > Thank you!
> >
> >        =-ddt->
> 
> 
> _______________________________________________
> Gphoto-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gphoto-user
> 

-- 
Marcus Meissner,SUSE LINUX GmbH; Maxfeldstrasse 5; D-90409 Nuernberg; Zi. 3.1-33,+49-911-740 53-432,,serv=loki,mail=wotan,type=real <[email protected]>