CHDKPTP gui freezing (linux)

  • 5 Replies
  • 1400 Views
CHDKPTP gui freezing (linux)
« on: 05 / January / 2017, 17:56:06 »
Advertisements
The cli is connecting to the camera and working fine; but in the gui, it freezes a few seconds after connecting. Where should I start looking for the cause?

*

Offline srsa_4c

  • ******
  • 3689
Re: CHDKPTP gui freezing (linux)
« Reply #1 on: 05 / January / 2017, 20:33:20 »
The cli is connecting to the camera and working fine; but in the gui, it freezes a few seconds after connecting. Where should I start looking for the cause?
Start it from a GUI console and look for console messages. If that's not enough, use gdb.

Re: CHDKPTP gui freezing (linux)
« Reply #2 on: 06 / January / 2017, 02:57:56 »
Start it from a GUI console

I'm not sure I understand what this means... Is it running
    $ bash -x chdkptp_gui.sh
from terminal?
« Last Edit: 06 / January / 2017, 04:15:30 by allclay1993 »

*

Offline reyalp

  • ******
  • 11496
Re: CHDKPTP gui freezing (linux)
« Reply #3 on: 06 / January / 2017, 16:46:39 »
The cli is connecting to the camera and working fine; but in the gui, it freezes a few seconds after connecting. Where should I start looking for the cause?
It would be helpful to know a few more details:

Does the it run fine if you don't connect to a camera?
Do you have live view enabled when it freezes, or is just connecting enough to trigger the problem.
What distro, computer platform and camera is involved?

Two cases I've seen freezing in the GUI on linux before
1) Live view is enabled, frame rate set higher than the system can manage. The current builds of chdkptp should start dropping frames and not freeze completely in this situation, but it's possible the workaround doesn't work in some case. You should be able to avoid this by setting the target frame rate to something very low before connecting. If the freeze happens without live view, it isn't this.
2) A system with a hardware failure which caused USB access to take a very long time. By default, chdkptp polls the USB periodically to populate the camera dropdown. This behavior can be controlled using the gui_dev_check_interval console variable. It's possible that some other USB device (not necessarily the camera) could trigger behavior like this.

Additionally, if you run code from the GUI that blocks, the GUI will freeze until it completes. So for example, large file downloads will freeze for the duration of the download.

Quote
I'm not sure I understand what this means... Is it running
You should be able to just run ./chdkptp_gui.sh in a terminal window.

edit:
From the other thread, I gather
camera sx20
platform is Linux Mint running in a virtualbox on Mac.

I have successfully used the chdkptp GUI in virtualbox on windows, but not for more than a few quick tests. I did experience at least one case where the VM USB stopped working until the VM was rebooted.

The VM likely has pretty low display performance, so I would not expect to get good framerates in live view.

Also, on windows at least you need a (free for non-commercial use) virutalbox add-on pack to get USB2.0 support in the VM. If you don't have this, USB operations would likely be very slow and perhaps cause the GUI to appear to hang.
« Last Edit: 06 / January / 2017, 16:53:29 by reyalp »
Don't forget what the H stands for.


Re: CHDKPTP gui freezing (linux)
« Reply #4 on: 06 / January / 2017, 19:48:02 »
Ok, that narrowed it down quite a bit.

1. No problems until a camera is connected, I'm on the 'Live' tab, and 'Viewfinder' is checked.

2. It's definitely related to the target framerate, but I don't believe that's the whole story. Lowering this from 10 down to 1 allows the view to stream for much longer, but it still appears to freeze eventually.

I'll check into that USB 2.0 add-on, and consider giving the VM more memory to work with (currently giving it 1GB); and report back.

*

Offline reyalp

  • ******
  • 11496
Re: CHDKPTP gui freezing (linux)
« Reply #5 on: 06 / January / 2017, 21:19:44 »
Ok, that narrowed it down quite a bit.

1. No problems until a camera is connected, I'm on the 'Live' tab, and 'Viewfinder' is checked.
2. It's definitely related to the target framerate, but I don't believe that's the whole story. Lowering this from 10 down to 1 allows the view to stream for much longer, but it still appears to freeze eventually.
A screenshot of the statistics tab after it's been running a while but before it freezes could be informative.
Quote
I'll check into that USB 2.0 add-on, and consider giving the VM more memory to work with (currently giving it 1GB); and report back.
I'd expect 1GB to be fine. If your VM USB is running at USB 1 speed, that could very well explain the problem, even 1 FPS might be too much. In the current chdkptp code, the frame rate is limited by the total of the USB transfer time and the rendering time.

USB 2 support is available in the "extension pack" from https://www.virtualbox.org/wiki/Downloads
Don't forget what the H stands for.

 

Related Topics