Skip to content

SIGABRT in utf-8_decode() #1690

Description

@ljfogelstrom

Hi, really like this program but having issues opening this specific document. On my laptop I can view the same document without issues however...

Running in console throws an exception "invalid utf-8"

gdb output below

Thread 1 "sioyek" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 in __pthread_kill_internal (threadid=, signo=6) at ./nptl/pthread_kill.c:89
#2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 in __GI_abort () at ./stdlib/abort.c:77
#4 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 in utf8::next<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > (it=-64 '\300', end=..., end@entry=0 '\000') at pdf_viewer/utf8/checked.h:149
#9 in utf8::utf8to32<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::back_insert_iterator<std::_cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > (start=-64 '\300', end=..., result=...) at pdf_viewer/utf8/checked.h:261
#10 utf8_decode (encoded_str="Part 1 ELECTRICAL CIRCUITS AND COMPONENTS\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200\300\200") at pdf_viewer/utils.cpp:235
#11 in Document::convert_toc_tree (this=this@entry= root=, root@entry= output=std::vector of length 9, capacity 16 = {...}) at /usr/include/c++/16/bits/basic_string.tcc:248
#12 in Document::create_toc_tree (this=this@entry= toc=std::vector of length 9, capacity 16 = {...}) at pdf_viewer/document.cpp:471
#13 in Document::open (this= invalid_flag=invalid_flag@entry= force_load_dimensions=force_load_dimensions@entry=false, password="", temp=temp@entry=false) at pdf_viewer/document.cpp:619
#14 in DocumentView::open_document (this=this@entry= doc_path=L"/home/lj/Dokument/elektronik1/Electronics
A Systems Approach -- Neil Storey -- 6th Edition, 2017 -- Pearson.pdf", invalid_flag=invalid_flag@entry= load_prev_state=load_prev_state@entry=true, prev_state=std::optional [no contained value], force_load_dimensions=force_load_dimensions@entry=false) at /usr/include/c++/16/bits/basic_string.tcc:248
#15 in MainWidget::open_document (this= path=..., offset_x=std::optional [no contained value], offset_y=std::optional [no contained value], zoom_level=std::optional [no contained value]) at pdf_viewer/main_widget.cpp:1091
#16 in handle_args (arguments=...) at pdf_viewer/main.cpp:646
#17 in main (argc=, args=) at pdf_viewer/main.cpp:811

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions