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

startup crash: conversion of data to type "b" failed #546

Closed
teto opened this issue Aug 31, 2018 · 8 comments
Closed

startup crash: conversion of data to type "b" failed #546

teto opened this issue Aug 31, 2018 · 8 comments

Comments

@teto
Copy link

teto commented Aug 31, 2018

Not very important as surely updating my config would solve it but just in case:

[2018-08-31 11:50:44.807913] [0x00007f9180b15a00] [debug]   HOME: /home/teto
[2018-08-31 11:50:44.807935] [0x00007f9180b15a00] [info]    cf: loading: "/home/teto/.config/astroid/config"
[2018-08-31 11:50:44.808375] [0x00007f9180b15a00] [info]    cf: version: 11
[2018-08-31 11:50:44.808500] [0x00007f9180b15a00] [debug]   cf: check config..
[2018-08-31 11:50:44.808513] [0x00007f9180b15a00] [error]   cf: the config file is an old version (9), the current version is: 11
[2018-08-31 11:50:44.808518] [0x00007f9180b15a00] [warning] cf: missing values in config have been updated with defaults (old version: 9, new: 11)
[11:50:44] [0x00007f9180b15a00] [M] [info] welcome to astroid! - 0.13.0
[11:50:44] [0x00007f9180b15a00] [M] [info] date: init.
[11:50:44] [0x00007f9180b15a00] [M] [info] db path: /home/teto/maildir
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::ptree_bad_data> >'
  what():  conversion of data to type "b" failed

@gauteh
Copy link
Member

gauteh commented Aug 31, 2018 via email

@teto
Copy link
Author

teto commented Sep 1, 2018

I generated a new config but still get

[2018-09-01 20:23:29.990606] [0x00007fd48f18da00] [debug]   HOME: /home/teto
[2018-09-01 20:23:29.990642] [0x00007fd48f18da00] [info]    cf: loading: "/home/teto/.config/astroid/config"
[2018-09-01 20:23:29.991196] [0x00007fd48f18da00] [info]    cf: version: 11
[2018-09-01 20:23:29.991414] [0x00007fd48f18da00] [debug]   cf: check config..
[2018-09-01 20:23:29.991453] [0x00007fd48f18da00] [warning] cf: missing values in config have been updated with defaults (old version: 11, new: 11)
[20:23:29] [0x00007fd48f18da00] [M] [info] welcome to astroid! - 0.13.0
[20:23:29] [0x00007fd48f18da00] [M] [info] date: init.
[20:23:29] [0x00007fd48f18da00] [M] [info] db path: /home/teto/maildir
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::ptree_bad_data> >'
  what():  conversion of data to type "b" failed
zsh: abort      astroid

Here is my config generated via astroid. I removed some parameters but tried with a vanilla one and it generated the same error.

{
    "astroid": {
        "config": {
            "version": "11"
        },
        "notmuch_config": "\/home\/teto\/.config\/notmuch\/notmuchrc",
        "debug": {
            "dryrun_sending": "false"
        },
        "hints": {
            "level": "0"
        },
        "log": {
            "syslog": "false",
            "stdout": "true",
            "level": "info"
        }
    },
    "accounts": {
        "charlie": {
            "name": "Charlie Root",
            "email": "fake@gmail.com",
            "gpgkey": "",
            "always_gpg_sign": "false",
            "sendmail": "msmtp -t",
            "default": "true",
            "save_sent": "false",
            "additional_sent_tags": "",
            "signature_separate": "false",
            "signature_file": "",
            "signature_file_markdown": "",
            "signature_default_on": "true",
            "signature_attach": "false",
            "select_query": ""
        }
    },
    "startup": {
        "queries": {
            "inbox": "tag:inbox"
        }
    },
    "terminal": {
        "height": "10",
        "font_description": "default"
    },
    "thread_index": {
        "page_jump_rows": "6",
        "sort_order": "newest",
        "cell": {
            "font_description": "default",
            "line_spacing": "2",
            "date_length": "10",
            "message_count_length": "4",
            "authors_length": "20",
            "subject_color": "#807d74",
            "subject_color_selected": "#000000",
            "background_color_selected": "",
            "background_color_marked": "#fff584",
            "background_color_marked_selected": "#bcb559",
            "tags_length": "80",
            "tags_upper_color": "#e5e5e5",
            "tags_lower_color": "#333333",
            "tags_alpha": "0.5",
            "hidden_tags": "attachment,flagged,unread"
        }
    },
    "general": {
        "time": {
            "clock_format": "local",
            "same_year": "%b %-e",
            "diff_year": "%x"
        }
    },
    "editor": {
        "cmd": "\/nix\/store\/svbc11jg7aq9c2mdz233cadxnqnqdckx-vim-8.1.0146\/bin\/vim -g --servername %2 --socketid %3 -f -c 'set ft=mail' '+set fileencoding=utf-8' '+set ff=unix' '+set enc=utf-8' '+set fo+=w' %1",
        "external_editor": "false",
        "charset": "utf-8",
        "save_draft_on_force_quit": "true",
        "attachment_words": "attach",
        "attachment_directory": "~",
        "markdown_processor": "marked"
    },
    "mail": {
        "reply": {
            "quote_line": "Excerpts from %1's message of %2:",
            "mailinglist_reply_to_sender": "true"
        },
        "forward": {
            "quote_line": "Forwarding %1's message of %2:",
            "disposition": "inline"
        },
        "sent_tags": "sent",
        "message_id_fqdn": "",
        "message_id_user": "",
        "user_agent": "default",
        "send_delay": "2",
        "close_on_success": "false",
        "format_flowed": "false"
    },
    "poll": {
        "interval": "60",
        "always_full_refresh": "false"
    },
    "attachment": {
        "external_open_cmd": "xdg-open"
    },
    "thread_view": {
        "open_html_part_external": "false",
        "preferred_type": "plain",
        "preferred_html_only": "false",
        "allow_remote_when_encrypted": "false",
        "open_external_link": "xdg-open",
        "default_save_directory": "~",
        "indent_messages": "false",
        "gravatar": {
            "enable": "true"
        },
        "mark_unread_delay": "0.5",
        "expand_flagged": "true"
    },
    "crypto": {
        "gpg": {
            "path": "gpg2",
            "always_trust": "true",
            "enabled": "true"
        }
    },
    "saved_searches": {
        "show_on_startup": "false",
        "save_history": "true",
        "history_lines_to_show": "15",
        "history_lines": "1000"
    }
}

coredumpctl debug gives:


#0  0x00007ffa49ed6be0 in raise () from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
#1  0x00007ffa49ed7dc1 in abort () from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
#2  0x00007ffa4aab9255 in __gnu_cxx::__verbose_terminate_handler() () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#3  0x00007ffa4aab7046 in ?? () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#4  0x00007ffa4aab7091 in std::terminate() () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#5  0x00007ffa4aab72d3 in __cxa_throw () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#6  0x00000000004ea21b in void boost::throw_exception<boost::exception_detail::error_info_injector<boost::property_tree::ptree_bad_data> >(boost::exception_detail::error_info_injector<boost::property_tree::ptree_bad_data> const&) ()
#7  0x00000000004ea2e2 in void boost::exception_detail::throw_exception_<boost::property_tree::ptree_bad_data>(boost::property_tree::ptree_bad_data const&, char const*, char const*, int) ()
#8  0x00000000004ea5ae in boost::enable_if<boost::property_tree::detail::is_translator<boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool> >, bool>::type boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get_value<bool, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool> >(boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool>) const ()
#9  0x000000000050d928 in Astroid::Db::init() ()
#10 0x00000000004dbebc in Astroid::Astroid::run(int, char**) ()
#11 0x00000000004d5153 in main ()

@gauteh
Copy link
Member

gauteh commented Sep 1, 2018 via email

@teto
Copy link
Author

teto commented Sep 1, 2018

I haven't looked at the source but here it is with lines :

Reading in symbols for /build/source/src/astroid.cc...done.
Reading in symbols for /build/source/src/db.cc...done.
#0  0x00007f3604193be0 in raise () from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
#1  0x00007f3604194dc1 in abort () from /nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6
#2  0x00007f3604d76255 in __gnu_cxx::__verbose_terminate_handler() () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#3  0x00007f3604d74046 in ?? () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#4  0x00007f3604d74091 in std::terminate() () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#5  0x00007f3604d742d3 in __cxa_throw () from /nix/store/zk5zj2307zxaq7dx585yia3dn5k4qlsl-gcc-7.3.0-lib/lib/libstdc++.so.6
#6  0x0000000000507760 in boost::throw_exception<boost::exception_detail::error_info_injector<boost::property_tree::ptree_bad_data> > (e=...)
    at include/boost/throw_exception.hpp:69
#7  0x0000000000507806 in boost::exception_detail::throw_exception_<boost::property_tree::ptree_bad_data> (x=..., 
    current_function=current_function@entry=0x675da0 <boost::enable_if<boost::property_tree::detail::is_translator<boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool> >, bool>::type boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get_value<bool, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool> >(boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool>) const::__PRETTY_FUNCTION__> "typename boost::enable_if<boost::property_tree::detail::is_translator<Translator>, Type>::type boost::property_tree::basic_ptree<Key, Data, KeyCompare>::get_value(Translator) const [with Type = bool; "..., file=file@entry=0x6757c0 "include/boost/property_tree/detail/ptree_implementation.hpp", line=line@entry=672)
    at include/boost/throw_exception.hpp:86
#8  0x0000000000507af6 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get_value<bool, boost::property_tree::stream_translator<char, std::char_traits<char>, std::allocator<char>, bool> > (this=0x12d4b80, tr=...) at include/boost/property_tree/detail/ptree_implementation.hpp:670
#9  0x000000000052e227 in boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get_value<bool> (this=0x12d4b80)
    at include/boost/property_tree/detail/ptree_implementation.hpp:680
#10 boost::property_tree::basic_ptree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::get<bool> (path=..., this=<optimized out>)
    at include/boost/property_tree/detail/ptree_implementation.hpp:751
#11 Astroid::Db::init () at /build/source/src/db.cc:81
#12 0x00000000004f8dbe in Astroid::Astroid::run (this=0x114e000, argc=argc@entry=1, argv=argv@entry=0x7ffc6859a358) at /build/source/src/astroid.cc:275
#13 0x00000000004f286f in main (argc=1, argv=0x7ffc6859a358) at /build/source/src/main.cc:5

NOTE: Nixos sometimes wraps binaries so maybe that could be it,
https://github.com/teto/nixpkgs/blob/nixos-unstable/pkgs/applications/networking/mailreaders/astroid/default.nix . I believe you can see/download the result on https://hydra.nixos.org/build/80487612

@gauteh
Copy link
Member

gauteh commented Sep 1, 2018 via email

@teto
Copy link
Author

teto commented Sep 1, 2018

Yes synchronize_flags = True ! setting it to false prevents the crash (but I would prefer the setting to be true).

@gauteh
Copy link
Member

gauteh commented Sep 1, 2018 via email

teto added a commit to teto/home-manager that referenced this issue Sep 2, 2018
@gauteh
Copy link
Member

gauteh commented Sep 2, 2018

I'm guessing that solved it :) closing.

@gauteh gauteh closed this as completed Sep 2, 2018
rycee pushed a commit to nix-community/home-manager that referenced this issue Sep 7, 2018
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