Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Floating point exception" when install prefix is used #23

Open
hills opened this issue Sep 9, 2016 · 3 comments
Open

"Floating point exception" when install prefix is used #23

hills opened this issue Sep 9, 2016 · 3 comments

Comments

@hills
Copy link

hills commented Sep 9, 2016

Linux, Slackware. Use ccmake to set CMAKE_INSTALL_PREFIX; eg. /opt/museek

When running museeq I get:

Floating point exception

The cuplrit is the IMG() function. If it can't find a file, it returns QPixmap(), an image measuring 0x0 pixels. Some of the code divides by the image width, which causes the crash.

Why it can't find the file is in museeq/images.cpp:

QString file (QString(DATADIR) + "/museek/museeq/themes/default/" + icon + ".png");

But DATADIR is returning the string 'share' only, and not a full path. So it can only find the images if I

cd /opt/museek
./bin/museeq

Eventually I found an alternative implementation of DATADIR which I enabled by building with

cmake -DBINRELOC=1 -DCMAKE_INSTALL_PREFIX=/opt/museek

Is this really the best solution here or is something broken? And if it is the correct fix, should it be more intuitive (eg. on by default?)

@drlight-code
Copy link
Contributor

There is something broken, it was introduced by my recent changes to the cmake build system. the DATADIR define in the config header contained the full path before, now it's relative to the CMAKE_INSTALL_PREFIX. I'll submit a fix later to put the full datadir path in there again, would be great if you can test it then.

@drlight-code
Copy link
Contributor

I pushed a fix to the cmake-fixes branch of my repo and made a PR: #24. I'm having an unrelated build error on Arch right now so I cannot test. Could you see if that fixes it? Thanks!

@hills
Copy link
Author

hills commented Dec 2, 2016

Thanks -- apologies, I didn't get notification of this fix. I'll do my best to test when I can. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants