aferrero2707 / PhotoFlow

A fully non-destructive photo retouching program providing a complete layer-based workflow including RAW image development.
http://aferrero2707.github.io/PhotoFlow
GNU General Public License v3.0
315 stars 36 forks source link

Photoflow appimage issue opening pfi file #142

Open phweyland opened 7 years ago

phweyland commented 7 years ago

Last (2) PhotFlow appimage opens nef or jpg files, but crashes when I open a pfi file. I have used the ppa distrib without having this issue on the same system. Ubuntu 16.10 on windows 10 vmware.

aferrero2707 commented 7 years ago

Could you try with the latest AppImage? I just did a test and had no issues opening .pfi files... if the problem persists, could you attach a copy of the console messages?

Thanks!

phweyland commented 7 years ago

I've tried the today PF appimage on both VirtualBox and Vmware Ubuntu, and Debian native as well. It does not open neither pfi, not nef. The only one it opens is jpg. The PF window just closes.

20170506_Ipoema_018.pfi.txt

aferrero2707 commented 7 years ago

I will try on the same Ubuntu system as yours, and see if I can reproduce the crash.

abertelmann commented 7 years ago

Hello. Same here when opening arw-Files - PF loads jpg / tif / png just fine, but opening an arw or an pfi pointing to an arw crashes PF. Last test today on Ubuntu 16.10 on Dell Latitude 830, photoflow-git build as of 20170611. Camera is Sony a99v or a6000. Problem exists since about 3 weeks. I have tried all AppImages in the repository as well, starting with the image 20170430 till 20170611 - seems to be all the same. I've given an example in the below console output - opened 3 different file types, then the .arw crash-messages.txt Hope you can fix it - i love PF:)

aferrero2707 commented 7 years ago

@abertelmann I wonder if you would be able to compile photoflow from sources, and run it through GDB to get a proper stack trace...

You will need to install a number of development packages, starting from libvips-dev

Then get photoflow from git and compile it:

git clone -b stable https://github.com/aferrero2707/PhotoFlow.git
cd PhotoFlow/build
cmake -DBUNDLED_LENSFUN=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/inst -DINSTALL_PREFIX=$(pwd)/inst ..
make && make install

Then run photoflow through gdb:

gdb inst/bin/photoflow
abertelmann commented 7 years ago

OK, will try it - may take some days.

abertelmann commented 7 years ago

Hello. I tried to compile - cmake gives an error:

cmake -DBUNDLED_LENSFUN=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$(pwd)/inst -DINSTALL_PREFIX=$(pwd)/inst ..
-- Check for LCMS2 availability...
-- Checking for module 'exiv2>=0.26'
--   
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
  CMakeLists.txt:49 (pkg_check_modules)
-- Configuring incomplete, errors occurred!

Seems that Ubuntu is still at exiv2-0.25-3 for now, see https://repology.org/metapackage/exiv2/versions When opening an in-camera jpg the exiv-data is not read according to my console output.

Another observation: when trying to reopen an arw, which was tried to open before, i get different behavior when asked for "Crash Recovery": "No" crashes immediately. "Yes" opens an empty layer menu on the left, without immediate crash. Even say "updating" See screen shot and console output. output-reopeneing.txt

screenshot at 2017-06-13 20-26-09

aferrero2707 commented 7 years ago

I might have found a solution that does not require the latest EXIV2 version, so that dependencies can be satisfied again on most distributions (at the moment, the Exiv2 0.26 dependency is blocking the packaging in many places...). Testing the code right now, if it works I'll let you know.

Concerning the crash recovery, if the crash occurred immediately then I am not surprised that the crash recovery is empty. The recovery is a fallback solution, and is not guaranteed to work 100% of the time... Moreover, the behaviour of the program when the layer stack is empty is basically undefined (I should put a check of this specific condition somewhere, that simply prevents opening the image).

aferrero2707 commented 7 years ago

@abertelmann Quick update: the current stable branch does not require Exiv2 v0.26 anymore, and works fine with older versions. Therefore you should be able to compile the code on your system after a git pull...

Thanks!

abertelmann commented 7 years ago

Thanks back - for your work. I hope i can help a bit.

Will try compiling as soon as possible and report back.

abertelmann commented 7 years ago

Well, i tried it and it seems to work - don't know why. I had small troubles because build make did not find the exiv2 paths (i think, sorry, did not make a copy of the output), i installed exiv2-debug and -dev libs, and it went through.... dbg runs it ok, no crash, opens arw from arw.file directly and from pfi.

Sorry i could not find anything. I will try the git-version next. Greets and thanks again for your great program. I really like it.

aferrero2707 commented 7 years ago

Thanks for checking!

I suspect some mismatch in VIPS libraries, but I have no exact idea... anyhow, I am trying to provide an AppImage package exactly to avoid this kind of troubles. The AppImage is supposed to run the same way on all Linux systems, and independently of the system libraries that are installed. Still working to make all this robust, but experimental AppImages are already available from the continuous release page.

abertelmann commented 7 years ago

Well, i tried the git-build of 20170613 now - it crashes. I can see the Raw Loader and Raw Developer tabs shortly before the crash.

Same for the last AppImage PhotoFlow-20170613-git-stable-f5c55a7dd818f5fc749f2ca3aece9e06e222a750.glibc2.14-dbg.glibc2.14-x86_64.AppImage - here it crashes before really starting.

I have appended the console output for both - maybe it helps.

By the way - where does the core dump go? I think you may need it?

20170613-git-output.txt 20170616-AppImage-output.txt

aferrero2707 commented 7 years ago

No ideas for the moment regarding the PPA version... for the AppImage case, it is an issue of mismatch between system and bundled libraries, something I have already fixed for the GIMP and I need to fix for PhF as well.

aferrero2707 commented 7 years ago

@phweyland @abertelmann I recently discovered a mis-configuration in the building process of the bundled RawSpeed library, which affected all photoflow versions from June until about a week ago. The build architecture for RawSpeed was wrongly set to "native", leading to illegal instructions on some systems.

I also have hopefully fixed the bundled library problem in the AppImage.

Would you have the possibility to test again both the latest AppImage from here and the latest photoflow-git from the PPA (for this one, please make sure you are installing the version from today or later)?

Thanks!

abertelmann commented 7 years ago

Hello. I tried the AppImage - still does not work for me. I cannot open either arw nor jpg, see appended shell output. 170731-test-appimage-arw.txt 170731-test-appimage-jpg.txt Where can i find the core dump? Maybe this would help further.

I could not try the git-repository version yet, will try further and give results.

Can my machine be the reason? It is not top notch: Core2Duo T7500@2.2 GHz, 2 GiB Ram (plus loads of swap) and Ubuntu 10.10 64 bit, with Mate 1.16.0.

I am still using my self-compiled version of PF, as of June 14. Works fine...

Greets

aferrero2707 commented 7 years ago

Could you eventually try to compile the current stable branch, and see if it works?

If your compiled version works fine, then it means there is still some mistake in the way the CPU architecture is set when building the AppImage (this is done automatically with Travis CI).

The system resources should not be a problem, as photoflow is not using a large amount of RAM.

There is not core dump for the AppImage, and it is also quite difficult to debug it with GDB...

abertelmann commented 7 years ago

Hello. I tried to compile the stable branch, see output-file 170801-test-compile.txt build_all.sh failed when trying to build VIPS. build.sh worked, but still needs libexiv2-dev to run through. The programm runs ok, loads ARW, tif, jpg, png. Some minor problem. Do i have the actual version - it still has the "old" GUI with 2 columns for layer stack and settings? My self-compiled version of June 14 has the new GUI with only one column, but i do not know which version (stabler or dev) i compiled.

Next i tried to compile the unstable version. build_all.sh failed as well, build.sh also. With build.sh i think it is a minor typo, see 170801-test-compile-2.txt

For exiv2 / libexiv2 there still is a problem when trying to install the git-version with apt.get. Install breaks with an error, see 170801-test-install.txt

I will try further and keep you informed about my results - still waiting for the actual package in Highly explosive - Darius seems to have trouble with the version of 0730 as well, for Yakkety it is still the version of 0718.

Greetings

abertelmann commented 7 years ago

Addendum: Of course building from source needs exiv2 - i had it uninstalled to install via apt because of the install problem. Greets

aferrero2707 commented 7 years ago

Sorry, there is a bit of confusion with branches... you need to compile the stable branch in order to get the latest development version. I should delete the development branch as it is not used any more and only brings confusion. When you clone the repository without specifying a branch you get the master one, which corresponds to the last official release (0.2.7 at the time of writing).

In the stable branch, a bundled version of EXIV2 v0.2.6 is automatically compiled if no or too old development libraries are found on the system.

abertelmann commented 7 years ago

Update: I tried the stable branch yetsreday, but could not build. Ubuntu 16.10 seems still to be with libvips 8.4.x, 8.5.x does not install. build_all still not working for me.

Tried the actual AppImages stable of today and yesterday, still getting /tmp/.mount_OkT6GY/usr/bin/photoflow: line 31: 3641 Illegal instruction (core dumped) $HERE/photoflow.real "$@" I suspect my system is broken somewhere, considering to reinstall...

Greets

aferrero2707 commented 7 years ago

Meanwhile, could you send me the full.output and error messages from running build_all.sh on your system? It should work, so I'd like to fix errors if present...

Thanks!

abertelmann commented 7 years ago

Sorry, maybe it is outdated now. I tried to answer via E-Mail last Friday (Aug 4) and did not realize that a got an error "mail too large". I copy my mail here anyway: Hello.

Spent a long afternoon compiling.

First: your build seems to be sane, all errors i encountered resulted from missing libs on my machine:

I had to install gdk-doc-tools and swig - these i figured out from the errors messages while configuring.

Next i ran into problems with GOBJECT_INTROSPECTION_CHECK. Same problem here, but i could not see in the errror messages that there was something missing. Googling guided me to install gobject-introspection and libgirepository1.0-dev. I think have seen some error messages for this case in config.ac, but these were not shown on output - maybe there is something wrong with some check there.

Last was (again) missing libexiv2-dev and exiv2 - I had them purged, because apt install photoflow-git stops with something like "trying to install over... part of exiv2" (when trying to do a normal install from repository).

After that the build process ran through with return code 0.

Starting run_photoflow.sh went ok, i got a running prog with the input screen.

But opening a picture still does not work for me, neither ARW nor jpg. Both end with an "illegal instruction" error.

I have appended the files with the output. The build-output is large, i have included the first runs with the missing libs as well.

Greets build-output.txt runtime-errors.txt

Further comment: I downgraded to Ubuntu 16.04-3 (new install). The actual 0.2.8 AppImage works like a charm - great job!