0x09 / resdet

Detect source resolution of upscaled images
GNU Lesser General Public License v2.1
234 stars 10 forks source link

git error thrown by configure script #4

Closed eadmaster closed 7 years ago

eadmaster commented 7 years ago

The configure script ends with this error:

...
Generating lib/resdet.pc
fatal: Not a git repository (or any of the parent directories): .git

If i proceed with the make command the executables are built, but resdet crashes with any image i've tried:

*** Error in `./resdet': free(): invalid pointer: 0x099a2050 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x67377)[0xb757c377]
/lib/i386-linux-gnu/libc.so.6(+0x6d2f7)[0xb75822f7]
/lib/i386-linux-gnu/libc.so.6(+0x6dbb1)[0xb7582bb1]
./resdet[0x804c22e]
./resdet[0x8049657]
./resdet[0x804a443]
./resdet[0x8048fa0]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0xb752d637]
./resdet[0x804938c]
======= Memory map: ========
...
0x09 commented 7 years ago

Hi, thanks for reporting this. The git message occurs when configuring outside of a cloned repo, but is only related to version string generation for the pkg-config file and not critical. I've updated the pkg-config template to handle this until I add stable versioning.

The latter looks to have been a bug in the built in transform that was being masked on x86-64 -- can you confirm you are not using FFTW (it would appear as Testing for fftw3f... in the configure ouptut), and if so pull the latest changes and rebuild? Should be fixed now.

eadmaster commented 7 years ago

Ok, i am not using fftw3f and i am building on an x86 system (not x86-64). With the latest updates it works fine, but i've found an image that throws segfault: Neko_animationsteps-_falling_asleep.png

My configure log:

Testing for cc... ok
Testing for ar... ok
Testing for pkg-config... ok

CC is "/usr/bin/cc"
AR is "/usr/bin/ar"
CFLAGS is "-Ofast -march=native -mtune=native -std=gnu99 "
PREFIX is "/usr/local"
BINPREFIX is "/usr/local/bin"
LIBPREFIX is "/usr/local/lib"
INCPREFIX is "/usr/local/include"
SHAREPREFIX is "/usr/local/share/resdet"
PCPREFIX is "/usr/local/lib/pkgconfig"

Testing for fftw3f... not found
Testing for jpeglib.h... not found
Testing for magic.h... not found
Testing for libpng... ok
Testing for mjpegtools... not found
Testing for MagickWand... not found
Testing for m... ok

Generating lib/resdet.pc
0x09 commented 7 years ago

That's odd -- libpng seems to be reading in data beyond the size of the image dimensions here. I'll try to figure out why. This image does work with the ImageMagick reader, so if your distro provides a libmagickwand package that may be an alternative (just re-configure with --disable-libpng).

Edit: turns out the alpha channel was not being correctly stripped in this case; this image now works with the libpng reader as well with the most recent commit.

0x09 commented 7 years ago

Thanks again for reporting these!