ApoorvaJ / Papaya

A GPU-powered image editor (in the making)
MIT License
373 stars 33 forks source link

Papaya segfaults on Gentoo #25

Open maffblaster opened 7 years ago

maffblaster commented 7 years ago

Hi @ApoorvaJ,

I successfully built Papaya on the current HEAD (744f658f19240a45e3f38cc9ded9780fc84e0df6), however when trying to open it I'm getting the following message:

Attribute UV not found in unlit.glsl
Uniform Texture not found in shader at unlit.glsl
Segmentation fault (core dumped)

When I check out the tagged version (v0.1) it builds and runs, however it seems functionality is quite limited. What suggestions do you have to resolve this issue on current HEAD?

One other question: does Papaya require an Nvidia graphics card in order to operate? I noticed it was dynamically linked against quite a few Nvidia .so's :)

ApoorvaJ commented 7 years ago

Thanks for the bug report. There are a few issues at play here:

The unlit.glsl errors This shader is only used for displaying the crop outline, and as such this error does not affect functioning of the shader. I do plan to fix it, but am working on other stuff at the moment.

The NVIDIA linkage Papaya does not depend on any NVIDIA-specific functionality. I'm not sure about how the NVIDIA-specific .so file dependencies got there, but they might just be the result of other libs e.g. GTK, on your machine. I have tested this on Intel and AMD machines as well, and it works.

The SegFault I'd expect the HEAD to be broken in some way for quite some time now, since I am working on the core infrastructure behind layering and effects, and this system interacts with every other component in Papaya. Until I get this in place, all the other stuff will be broken. This is one of those cases where Papaya will get worse until it gets better. :)

Your best bet is to use v0.1, or roll back to an older commit in the git history and build. To be honest, though, Papaya is not even remotely ready for real-world usage at this point. I do have a clear picture of the road ahead now, and things should improve.

Keeping this bug open until things stabilize again at HEAD.

maffblaster commented 7 years ago

@ApoorvaJ, thanks for all your hard work! I'll wait until you fix these things and try again. Do you have a specific milestone for the next tagged version?

ApoorvaJ commented 7 years ago

I'm not sure about a tagged release, but things should stabilize when I have layering working with the bitmap layer, any one effects layer (most likely hue/saturation), and when the node window is working. I'm currently working on basically all three at the same time, in order to figure out the API design.

k2t0f12d commented 7 years ago

e210fd6b04e573b47d6b781951721bc265a194a7 is the newest that builds for me

ApoorvaJ commented 7 years ago

As I said, stuff shall be broken for a while. I'm currently bringing up the node API on Linux, so builds will fail on Windows for a while. Builds should succeed on Linux, but may segfault.

I'm pushing all the instability to the master branch because multiple branches are completely unnecessary at the moment, since we don't have any external code dependencies or release schedule.

k2t0f12d commented 7 years ago

Its all good, just put that in here for someone, like myself, who might like to find a version that was still working. They can go directly to that commit and build.

ebachard commented 7 years ago

Hello,

Thanks for your interesting work !

I don't have much time, but if this can help a bit, I confirm :

Reading the code, looks like all the images path are hard coded. Is it normal ?

In fact, I think there are several mied issues:

  1. path issues

egrep -Hr define ./* | grep apoorvaj ./linux_ui.cpp:#define PAPAYA_DEFAULT_IMAGE "/home/apoorvaj/Pictures/o1.png"

( + other similar wrong path in several files)

This is very probably (one of the) segfault root ...

  1. maybe a wrong shader code in unlit.glsl

Currently : gl_FragColor = Frag_Color;

In other .glsl files, we got: gl_FragColor = Frag_Color * texture2D( Texture, Frag_UV.st);

If I find mode time, I'll investigate. Suggestions : use relative path for images, and e.g. copy all the images beside the shaders in the build/linux directory ? (just a wild suggstion, maybe I'm completely wrong)

Thanks again for sharing your code :-)

ericb

ApoorvaJ commented 7 years ago

Ericb, I know both these points of failures. As I said before, I'm working on other stuff and the master branch is very unstable at the moment. No need to look into this further.