GithubHelp home page GithubHelp logo

Segfault on Arch Linux about maim HOT 3 CLOSED

naelstrof avatar naelstrof commented on July 28, 2024
Segfault on Arch Linux

from maim.

Comments (3)

naelstrof avatar naelstrof commented on July 28, 2024

Could you run it through valgrind for me? Oh and with debugging symbols?
Probably need to do something like this:

sudo pacman -S valgrind
cd ~
git clone [email protected]:naelstrof/maim.git
cd maim
cmake -DCMAKE_BUILD_TYPE=Debug ./
make
valgrind ./maim foobar.png

There's a possibility that arch linux compiles with debug symbols by default, and that you already have valgrind. In which case just run valgrind maim foobar.png.

from maim.

pgalkin avatar pgalkin commented on July 28, 2024

It works properly if I compile it like you showed.
Here is the output of valgrind for maim installed with pacman:

==6363== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==6363== Command: maim screen.png
==6363== 
==6363== Jump to the invalid address stated on the next line
==6363==    at 0x0: ???
==6363==    by 0x6400631: ??? (in /usr/lib/libdl-2.21.so)
==6363==    by 0x6400060: dlopen (in /usr/lib/libdl-2.21.so)
==6363==    by 0x4E598B1: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E59CFF: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E59DC6: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E5A4BA: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E44E5F: imlib_save_image_with_error_return (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x405F24: maim::IMEngine::save(std::string) (in /usr/bin/maim)
==6363==    by 0x408563: app(int, char**) (in /usr/bin/maim)
==6363==    by 0x403935: main (in /usr/bin/maim)
==6363==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==6363== 
==6363== 
==6363== Process terminating with default action of signal 11 (SIGSEGV)
==6363==  Bad permissions for mapped region at address 0x0
==6363==    at 0x0: ???
==6363==    by 0x6400631: ??? (in /usr/lib/libdl-2.21.so)
==6363==    by 0x6400060: dlopen (in /usr/lib/libdl-2.21.so)
==6363==    by 0x4E598B1: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E59CFF: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E59DC6: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E5A4BA: ??? (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x4E44E5F: imlib_save_image_with_error_return (in /usr/lib/libImlib2.so.1.4.7)
==6363==    by 0x405F24: maim::IMEngine::save(std::string) (in /usr/bin/maim)
==6363==    by 0x408563: app(int, char**) (in /usr/bin/maim)
==6363==    by 0x403935: main (in /usr/bin/maim)
==6363== 
==6363== HEAP SUMMARY:
==6363==     in use at exit: 5,382,730 bytes in 74 blocks
==6363==   total heap usage: 303 allocs, 229 frees, 5,431,280 bytes allocated
==6363== 
==6363== 35 bytes in 1 blocks are possibly lost in loss record 30 of 61
==6363==    at 0x4C2A4F0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6363==    by 0x58D4248: allocate (new_allocator.h:104)
==6363==    by 0x58D4248: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (basic_string.tcc:1051)
==6363==    by 0x58D455A: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (basic_string.tcc:923)
==6363==    by 0x58D4B7D: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (basic_string.tcc:1128)
==6363==    by 0x408403: app(int, char**) (in /usr/bin/maim)
==6363==    by 0x403935: main (in /usr/bin/maim)
==6363== 
==6363== LEAK SUMMARY:
==6363==    definitely lost: 0 bytes in 0 blocks
==6363==    indirectly lost: 0 bytes in 0 blocks
==6363==      possibly lost: 35 bytes in 1 blocks
==6363==    still reachable: 5,382,695 bytes in 73 blocks
==6363==         suppressed: 0 bytes in 0 blocks
==6363== Reachable blocks (those to which a pointer was found) are not shown.
==6363== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==6363== 
==6363== For counts of detected and suppressed errors, rerun with: -v
==6363== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
[1]    6363 segmentation fault (core dumped)  valgrind --leak-check=full maim screen.png

from maim.

naelstrof avatar naelstrof commented on July 28, 2024

It's crashing in libdl-2.21.so, I doubt it's due to maim. libdl-2.21.so is part of glibc, you could try reinstalling it and updating your system.

Otherwise to fix your problem you can keep maim-git installed from the AUR.

from maim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.