L1L1 / cardpeek

Automatically exported from code.google.com/p/cardpeek
Other
448 stars 116 forks source link

Segfault while downloading updates #111

Closed DBarthe closed 4 years ago

DBarthe commented 4 years ago

Hello,

I got a segfault when starting the app the first time, based on the current master branch : de8cee209b870f3d7aa1c6bd55e84738765dc1e6.

I did :

autoreconf --install
./configure
make 
sudo make install

After starting the app, when I accept to download the updates, I got this: (gdb stack trace)

Thread 1 "cardpeek" received signal SIGSEGV, Segmentation fault.
__GI__IO_fwrite (buf=0x555555cbc123, size=1, count=1157, fp=0x0) at iofwrite.c:37
37  iofwrite.c: No such file or directory.
(gdb) backtrace
#0  0x00007ffff4d708be in __GI__IO_fwrite (buf=0x555555cbc123, size=1, count=1157, fp=0x0) at iofwrite.c:37
#1  0x00007ffff5a9bb12 in  () at /usr/lib/x86_64-linux-gnu/libcurl.so.4
#2  0x00007ffff5aaddeb in  () at /usr/lib/x86_64-linux-gnu/libcurl.so.4
#3  0x00007ffff5ab7e8b in  () at /usr/lib/x86_64-linux-gnu/libcurl.so.4
#4  0x00007ffff5ab93e4 in curl_multi_perform () at /usr/lib/x86_64-linux-gnu/libcurl.so.4
#5  0x00007ffff5aaf224 in curl_easy_perform () at /usr/lib/x86_64-linux-gnu/libcurl.so.4
#6  0x0000555555575581 in http_download (src_url=0x555555c5a070 "http://downloads.pannetrat.com/updates/0.8.4/files/scripts/etc/smartcard_list.txt", dst_filename=dst_filename@entry=0x55555585d800 "/home/*******/.cardpeek/scripts/etc/smartcard_list.txt.download") at http_download.c:55
#7  0x000055555557686c in cardpeek_update_perform () at cardpeek_update.c:639
#8  0x000055555556df67 in update_cardpeek () at main.c:54
#9  0x000055555556df67 in cardpeek_main (argc=<optimized out>, argv=<optimized out>) at main.c:474
#10 0x00007ffff4d12b97 in __libc_start_main (main=
    0x55555555f820 <main>, argc=1, argv=0x7fffffffdae8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdad8) at ../csu/libc-start.c:310
#11 0x000055555555f86a in _start ()

Which is solved by creating the missing folders :

make -p $HOME/.cardpeek/scripts/etc

Not sure if I'm using it wrong or if it a bug though.

DBarthe commented 4 years ago

Sorry I haven't noticed the dot_cardpeek_dir/. After having it copied to ~/.cardpeek, everything seems to work well :+1: