supplierdeeply

chdkptp - alternative ptp client

  • 1034 Replies
  • 187165 Views
*

Offline mphx

  • ***
  • 208
Re: alternative ptp client
« Reply #930 on: 22 / December / 2016, 15:22:23 »
Advertisements
@reyalp


Did some testing , not much though.Being on real physical machine or in a VM apparently doesn't affect anything.


1.Manjaro XFCE4 - NO
2.Ubuntu 16.10 Unity - NO
3.Ubuntu 17.04 Unity - NO
4.Opensuse Tumbleweed KDE (rolling branch of opensuse , quite bleeding edge) - NO
5.Fedora 25 Gnome - NO


Every case was producing the same segfault :
Code: [Select]
[ 6378.654711] chdkptp_gui[4240]: segfault at 544e4f46 ip 00007fb5fe871946 sp 00007ffe80dd0770 error 4 in libgobject-2.0.so.0.5000.0[7fb5fe83d000+52000]Every time the same file , only different version.
Here is a backtrace (from gdb) of chdkptp_gui trying to run on a ubuntu 16.10 installation.


http://pastebin.com/GVbtLTu3 -Don't know if that will help at all..
« Last Edit: 22 / December / 2016, 15:32:42 by mphx »

Re: alternative ptp client
« Reply #931 on: 22 / December / 2016, 16:16:10 »
Doubt this is helpful but I've
attached  ldd chdkptp for my ubuntu studio installation, which is working fine.
I believe I ended up not building iup, and just downloading their library.

lsb_release -a
No LSB modules are available.
Distributor ID:   Ubuntu
Description:   Ubuntu 15.04
Release:   15.04
Codename:   vivid

*

Offline mphx

  • ***
  • 208
Re: alternative ptp client
« Reply #932 on: 22 / December / 2016, 17:35:31 »
@62ndidiot


This installation is like 2 versions back.So we are talking about old version libraries.
Can you please check the version of glib2 package?This one provides libgobject library that is mentioned in segfaults.


@reyalp

Some of the essentials libraries are getting hard to be found in newer distros.
E.g. readline6 , libusb 0.1-4 .
So put in your TODO list at some point to compile iup/cd with newer libraries.They compile just fine as i found out lately.
Because even the latest versions of cd/iup , are not compiled with the latest readline and libusb libraries.

Re: alternative ptp client
« Reply #933 on: 22 / December / 2016, 18:47:35 »
Quote
Can you please check the version of glib2 package?This one provides libgobject library that is mentioned in segfaults.
pkg-config --modversion glib-2.0
2.44.1

locate libgobject
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.4400.1
/usr/lib/x86_64-linux-gnu/libgobject-2.0.a
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1

I'm pretty sure I dynamically link to these when I run the gui version, because I need to issue ldconfig /usr/lib64, and locate libiup only returns stuff in /usr/lib64
Code: [Select]

 ls -l /usr/lib64
total 13424
-rwxr-xr-x 1 root root   71154 Mar 23  2016 libcdcairo.so
-rwxr-xr-x 1 root root   30022 Mar 23  2016 libcdcontextplus.so
-rwxr-xr-x 1 root root   35087 Mar 23  2016 libcdgl.so
-rwxr-xr-x 1 root root  202772 Mar 23  2016 libcdlua51.so
-rwxr-xr-x 1 root root  258670 Mar 23  2016 libcdlua52.a
-rwxr-xr-x 1 root root  202774 Mar 23  2016 libcdlua52.so
-rwxr-xr-x 1 root root    9284 Mar 23  2016 libcdluacairo51.so
-rwxr-xr-x 1 root root    9283 Mar 23  2016 libcdluacairo52.so
-rwxr-xr-x 1 root root    8485 Mar 23  2016 libcdluacontextplus51.so
-rwxr-xr-x 1 root root    2628 Mar 23  2016 libcdluacontextplus52.a
-rwxr-xr-x 1 root root    8484 Mar 23  2016 libcdluacontextplus52.so
-rwxr-xr-x 1 root root    8571 Mar 23  2016 libcdluagl51.so
-rwxr-xr-x 1 root root    2754 Mar 23  2016 libcdluagl52.a
-rwxr-xr-x 1 root root    8531 Mar 23  2016 libcdluagl52.so
-rwxr-xr-x 1 root root   18460 Mar 23  2016 libcdluaim51.so
-rwxr-xr-x 1 root root   17274 Mar 23  2016 libcdluaim52.a
-rwxr-xr-x 1 root root   18459 Mar 23  2016 libcdluaim52.so
-rwxr-xr-x 1 root root    8577 Mar 23  2016 libcdluapdf51.so
-rwxr-xr-x 1 root root    2764 Mar 23  2016 libcdluapdf52.a
-rwxr-xr-x 1 root root    8537 Mar 23  2016 libcdluapdf52.so
-rwxr-xr-x 1 root root   43387 Mar 23  2016 libcdpdf.so
-rwxr-xr-x 1 root root  799283 Mar 23  2016 libcd.so
-rwxr-xr-x 1 root root  752182 Mar 23  2016 libcdx11.so
-rwxr-xr-x 1 root root  710646 Mar 23  2016 libfreetype.so
-rwxr-xr-x 1 root root  217922 Mar 23  2016 libftgl.so
-rwxr-xr-x 1 root root    8617 Mar 23  2016 libiupcd.so
-rwxr-xr-x 1 root root  249421 Mar 23  2016 libiupcontrols.so
-rwxr-xr-x 1 root root   18926 Mar 23  2016 libiupgl.so
-rwxr-xr-x 1 root root  536609 Mar 23  2016 libiupimglib.so
-rwxr-xr-x 1 root root   18701 Mar 23  2016 libiupim.so
-rwxr-xr-x 1 root root  168042 Mar 23  2016 libiuplua51.so
-rwxr-xr-x 1 root root  172251 Mar 23  2016 libiuplua52.so
-rwxr-xr-x 1 root root    8578 Mar 23  2016 libiupluacd51.so
-rwxr-xr-x 1 root root    8539 Mar 23  2016 libiupluacd52.so
-rwxr-xr-x 1 root root   43660 Mar 23  2016 libiupluacontrols51.so
-rwxr-xr-x 1 root root   43663 Mar 23  2016 libiupluacontrols52.so
-rwxr-xr-x 1 root root   13903 Mar 23  2016 libiupluagl51.so
-rwxr-xr-x 1 root root   13905 Mar 23  2016 libiupluagl52.so
-rwxr-xr-x 1 root root   28467 Mar 23  2016 libiupluaglcontrols52.so
-rwxr-xr-x 1 root root   13183 Mar 23  2016 libiupluaim51.so
-rwxr-xr-x 1 root root   13183 Mar 23  2016 libiupluaim52.so
-rwxr-xr-x 1 root root    8279 Mar 23  2016 libiupluaimglib51.so
-rwxr-xr-x 1 root root    8279 Mar 23  2016 libiupluaimglib52.so
-rwxr-xr-x 1 root root   13725 Mar 23  2016 libiupluamatrixex51.so
-rwxr-xr-x 1 root root   13727 Mar 23  2016 libiupluamatrixex52.so
-rwxr-xr-x 1 root root   23822 Mar 23  2016 libiuplua_mglplot51.so
-rwxr-xr-x 1 root root   23824 Mar 23  2016 libiuplua_mglplot52.so
-rwxr-xr-x 1 root root   33970 Mar 23  2016 libiuplua_plot52.so
-rwxr-xr-x 1 root root   23695 Mar 23  2016 libiuplua_pplot51.so
-rwxr-xr-x 1 root root   23699 Mar 23  2016 libiuplua_pplot52.so
-rwxr-xr-x 1 root root   13396 Mar 23  2016 libiuplua_scintilla51.so
-rwxr-xr-x 1 root root   13398 Mar 23  2016 libiuplua_scintilla52.so
-rwxr-xr-x 1 root root   12846 Mar 23  2016 libiupluatuio51.so
-rwxr-xr-x 1 root root   12848 Mar 23  2016 libiupluatuio52.so
-rwxr-xr-x 1 root root   13181 Mar 23  2016 libiupluaweb51.so
-rwxr-xr-x 1 root root   13183 Mar 23  2016 libiupluaweb52.so
-rwxr-xr-x 1 root root  127694 Mar 23  2016 libiupmatrixex.so
-rwxr-xr-x 1 root root 2233105 Mar 23  2016 libiup_mglplot.so
-rwxr-xr-x 1 root root  714563 Mar 23  2016 libiupmot.so
-rwxr-xr-x 1 root root  249138 Mar 23  2016 libiup_pplot.so
-rwxr-xr-x 1 root root 2756612 Mar 23  2016 libiup_scintilla.so
-rwxr-xr-x 1 root root  773930 Mar 23  2016 libiup.so
-rwxr-xr-x 1 root root  168829 Mar 23  2016 libiuptuio.so
-rwxr-xr-x 1 root root   20644 Mar 23  2016 libiupweb.so
-rwxr-xr-x 1 root root 1461133 Mar 23  2016 libpdflib.so
drwxr-xr-x 2 root root    4096 Jul 30  2015 sane


Quote
Some of the essentials libraries are getting hard to be found in newer distros.
E.g. readline6 , libusb 0.1-4 .
So put in your TODO list at some point to compile iup/cd with newer libraries.They compile just fine as i found out lately.
Because even the latest versions of cd/iup , are not compiled with the latest readline and libusb libraries.
Advice for me? :( I've almost bit the bullet and done an upgrade a couple of times this year.  Both times I talked myself out of it, mainly because it might disrupt my CHDK efforts and gain me little or nothing in the way of functionality.

When I do upgrade, I will leave my current distro intact and bootable just in case.
« Last Edit: 22 / December / 2016, 18:57:35 by 62ndidiot »


*

Offline reyalp

  • ******
  • 11392
Re: alternative ptp client
« Reply #934 on: 22 / December / 2016, 20:43:27 »
http://pastebin.com/GVbtLTu3 -Don't know if that will help at all..
Not really obvious. AFAIK iupMap is what creates/displays the actual windows and controls. So maybe there is some specific control that is doing something weird that was ignored in older version but is now a problem.

One way to debug this would be to disable everything except the basic window, and if that works, start re-enabling stuff until it crashes again. That would take some understanding of the code to do effectively though.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 11392
Re: alternative ptp client
« Reply #935 on: 22 / December / 2016, 20:46:09 »
I'm pretty sure I dynamically link to these when I run the gui version, because I need to issue ldconfig /usr/lib64, and locate libiup only returns stuff in /usr/lib64
Assuming you start using the .sh file, the current pre-built packages should be self contained and not require you to install anything in the system /lib directories.

edit:
Of course, you should be able to use a similar script with your own builds as long as you point LD_LIBRARY_PATH at wherever you put the libs
« Last Edit: 22 / December / 2016, 20:56:45 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 11392
Re: alternative ptp client
« Reply #936 on: 22 / December / 2016, 20:52:25 »
Some of the essentials libraries are getting hard to be found in newer distros.
E.g. readline6 , libusb 0.1-4 .
So put in your TODO list at some point to compile iup/cd with newer libraries.They compile just fine as i found out lately.
Because even the latest versions of cd/iup , are not compiled with the latest readline and libusb libraries.
I don't understand. chdkptp is linked to libusb and readline, but that should have nothing to do with CD and IUP.
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 208
Re: alternative ptp client
« Reply #937 on: 22 / December / 2016, 21:46:24 »
@reyalp

Ye my bad with readline.I saw it a lot during compiles and thought its iup/cd dependency.Now i am reading that its lua dependency , thats explains the whole connection to it.
Bottom line is that these versions are getting old and some -not all- , some distros just keep them for compatibility purposes only.


*

Offline reyalp

  • ******
  • 11392
Re: alternative ptp client
« Reply #938 on: 23 / December / 2016, 14:26:02 »
Ye my bad with readline.I saw it a lot during compiles and thought its iup/cd dependency.Now i am reading that its lua dependency , thats explains the whole connection to it.
chdkptp uses readline to provide command history in CLI mode. This is a compile time option you can turn off by setting READLINE_SUPPORT=0 in config.mk. I'm not aware that it specifically requires readline 6 rather than 7, but I haven't looked into it.

The Lua standalone interpreter can also use readline, but this shouldn't be relevant to chdkptp

libusb-0.1 is the USB API chdkptp uses to communicate with the camera. It's a legacy API, but changing to a different one would require a significant amount of work. AFAIK on linux versions it's just a compatibility wrapper over more recent APIs anyway. On windows, libusb-win32 only supports the 0.1 API, so a different library would need to be used.

There are good reasons to update the USB API, but it's not likely to be a simple project.

Quote
Bottom line is that these versions are getting old and some -not all- , some distros just keep them for compatibility purposes only.
As long as they are available and compatible, I don't see much reason to change. I'd much rather figure out why it's crashing.

edit:
OK, set up an ubuntu 16.10 VM. I understand the point about readline/libusb is that users will get load errors if the corresponding packages aren't installed. This is what you get trying to run pre-compiled binaries in linux.

I also get the segfault you described on on startup using the prebuilt build.
« Last Edit: 23 / December / 2016, 18:20:28 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 11392
Re: alternative ptp client
« Reply #939 on: 23 / December / 2016, 19:16:44 »
I tracked the segfault down to the mode dropdown.

Running the IUP example http://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/list.lua also segfaults, unless I comment out the dropdown, so I'm guessing this is an IUP bug (though I suppose it could be triggered by some aspect of how chdkptp is built, I haven't tried running it in a non-chdkptp executable).

You can make chdkptp work by commenting out the line that adds the dropdown in gui.lua, like

Code: [Select]
iup.hbox{
-- gui.mode_dropdown,
},

Obviously, you will no longer be able to set the shooting mode with this control.

edit:
I confirmed the crash happens running their examples + precompiled binaries.
« Last Edit: 23 / December / 2016, 19:57:14 by reyalp »
Don't forget what the H stands for.

 

Related Topics