Running the following command on the next branch results in a segfault: $ ./ledger -s bal Checking
The backtrace from gdb is: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001000f8720 in ledger::(anonymous namespace)::instance_t::lookup (this=0x7fff5fbfa050, kind=ledger::symbol_t::DIRECTIVE, name=@0x7fff5fbf7ba0) at src/textual.cc:1726 1726 return context.scope->lookup(kind, name); (gdb) bt #0 0x00000001000f8720 in ledger::(anonymous namespace)::instance_t::lookup (this=0x7fff5fbfa050, kind=ledger::symbol_t::DIRECTIVE, name=@0x7fff5fbf7ba0) at src/textual.cc:1726 #1 0x0000000100108ce5 in ledger::(anonymous namespace)::instance_t::general_directive (this=0x7fff5fbfa050, line=0x10301b249 "defaccount De Assets:Cash") at src/textual.cc:1194 #2 0x0000000100106aba in ledger::(anonymous namespace)::instance_t::read_next_directive (this=0x7fff5fbfa050) at src/textual.cc:341 #3 0x0000000100106e29 in ledger::(anonymous namespace)::instance_t::parse (this=0x7fff5fbfa050) at src/textual.cc:222 #4 0x00000001001084be in ledger::(anonymous namespace)::instance_t::include_directive (this=0x7fff5fbfc780, line=0x7fff5fbfa358 "./header.ldg") at src/textual.cc:743 #5 0x0000000100108be7 in ledger::(anonymous namespace)::instance_t::general_directive (this=0x7fff5fbfc780, line=0x103013649 "include ./header.ldg") at src/textual.cc:1170 #6 0x0000000100106aba in ledger::(anonymous namespace)::instance_t::read_next_directive (this=0x7fff5fbfc780) at src/textual.cc:341 #7 0x0000000100106e29 in ledger::(anonymous namespace)::instance_t::parse (this=0x7fff5fbfc780) at src/textual.cc:222 #8 0x0000000100107914 in ledger::journal_t::read_textual (this=0x10290a5c0, context_stack=@0x103010258) at src/textual.cc:1736 #9 0x0000000100117e76 in ledger::journal_t::read (this=0x10290a5c0, context=@0x103010258) at src/journal.cc:385 #10 0x00000001000d94e0 in ledger::session_t::read_data (this=0x103010200, master_account=@0x7fff5fbfede0) at src/session.cc:163 #11 0x00000001000d9b4b in ledger::session_t::read_journal_files (this=0x103010200) at src/session.cc:201 #12 0x0000000100013e82 in ledger::global_scope_t::execute_command (this=0x10300c200, args=@0x7fff5fbff0c0, at_repl=false) at src/global.cc:200 #13 0x0000000100014620 in ledger::global_scope_t::execute_command_wrapper (this=0x10300c200, args=@0x7fff5fbff190, at_repl=false) at src/global.cc:245 #14 0x0000000100001c50 in main (argc=4, argv=0x7fff5fbffa38, envp=0x7fff5fbffa60) at src/main.cc:119 (gdb) Everything was working just fine until I added a single entry. Running on just that entry doesn't give any problems, and I've yet to find a small reproduction recipe. However, the above problem is reproducible for me on my dataset, and I hope that the backtrace is of some use. This is using a debug build of the next branch on Mac OS X. -Hyrum
