Re: Assertion failure in unistring

2023-01-26 Thread Tavis Ormandy
On 2023-01-25, Martin Michlmayr wrote:
> * Tavis Ormandy [2023-01-25 06:56]:
>> Hello! I've been hitting an assertion when experimenting with register 
>> formats:
>
> Can you please report this at https://github.com/ledger/ledger/issues
>

Done, thanks Martin!

https://github.com/ledger/ledger/issues/2174

Tavis.

-- 
 _o)$ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger tav...@sdf.org
_\_V _( ) _( )  @taviso

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/tqu8rf%2445k%242%40ciao.gmane.io.


Re: Assertion failure in unistring

2023-01-25 Thread Martin Michlmayr
* John Wiegley  [2023-01-25 14:10]:
> TO> Hello! I've been hitting an assertion when experimenting with register
> TO> formats: $ ledger --file finance.dat reg -F '%12(total)' Error: Assertion
> TO> failed in "/build/ledger-SR1_DQ/ledger-3.1.3/src/unistring.h", line
> TO> 72:ledger::unistring::unistring(const string&): len < 1024
> 
> Hi Tavis, the example data in your message doesn't abort on my machine. Do you
> have a reproducible example I could use for debugging?

Did you run the command he mentioned:
ledger --file finance.dat reg -F '%12(total)'

It fails for me with ledger from Git:

Error: Assertion failed in "ledger/src/unistring.h", line 
72:ledger::unistring::unistring(const string&): len < 1024

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/Y9HYdj2r4Z99IErh%40jirafa.cyrius.com.


Re: Assertion failure in unistring

2023-01-25 Thread John Wiegley
> "TO" == Tavis Ormandy  writes:

TO> Hello! I've been hitting an assertion when experimenting with register
TO> formats: $ ledger --file finance.dat reg -F '%12(total)' Error: Assertion
TO> failed in "/build/ledger-SR1_DQ/ledger-3.1.3/src/unistring.h", line
TO> 72:ledger::unistring::unistring(const string&): len < 1024

Hi Tavis, the example data in your message doesn't abort on my machine. Do you
have a reproducible example I could use for debugging?

John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m2fsbyclkc.fsf%40Vulcan.attlocal.net.


Re: Assertion failure in unistring

2023-01-24 Thread Martin Michlmayr
* Tavis Ormandy  [2023-01-25 06:56]:
> Hello! I've been hitting an assertion when experimenting with register 
> formats:

Can you please report this at https://github.com/ledger/ledger/issues

> Maybe this is not the intended solution, should I just average the cost basis 
> and record it as one big lot?

The transaction looks ok to me, but ledger has had some problems with long
transactions; I guess you hit one such problem.

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/Y9DXOkMo95nYu5k1%40jirafa.cyrius.com.


Assertion failure in unistring

2023-01-24 Thread Tavis Ormandy
Hello! I've been hitting an assertion when experimenting with register formats:

$ ledger --file finance.dat reg -F '%12(total)'
Error: Assertion failed in "/build/ledger-SR1_DQ/ledger-3.1.3/src/unistring.h", 
line 72:ledger::unistring::unistring(const string&): len < 1024

It is probably because I was trying to record the purchase of some stock,
followed by some automatic dividend reinvestments, like this (numbers made up):

2023/01/01 Opening Balances
Assets:Investments:Brokerage  10 ABC @ $1
Assets:Investments:Brokerage  20 DEF @ $150.10
Assets:Investments:Brokerage  20 DEF @ $155.10
Assets:Investments:Brokerage  20 DEF @ $160.10
Assets:Investments:Brokerage  0.555 DEF @ $139.86
Assets:Investments:Brokerage  0.555 DEF @ $105.38
Assets:Investments:Brokerage  0.555 DEF @ $106.03
Assets:Investments:Brokerage  0.555 DEF @ $100.43
Assets:Investments:Brokerage  0.555 DEF @ $110.43
Assets:Investments:Brokerage  0.555 DEF @ $167.84
Assets:Investments:Brokerage  0.555 DEF @ $154.28
Assets:Investments:Brokerage  0.555 DEF @ $137.87
Assets:Investments:Brokerage  0.555 DEF @ $167.62
Assets:Investments:Brokerage  0.555 DEF @ $103.49
Assets:Investments:Brokerage  0.555 DEF @ $183.88
Assets:Investments:Brokerage  0.555 DEF @ $164.78
Assets:Investments:Brokerage  0.555 DEF @ $124.15
Assets:Investments:Brokerage  0.555 DEF @ $189.91
Assets:Investments:Brokerage  0.555 DEF @ $165.80
Assets:Investments:Brokerage  0.555 DEF @ $172.87
Assets:Investments:Brokerage  0.555 DEF @ $152.30
Assets:Investments:Brokerage  0.555 DEF @ $175.06
Assets:Investments:Brokerage  0.555 DEF @ $140.07
Assets:Investments:Brokerage  0.555 DEF @ $321.53
Assets:Investments:Brokerage  0.555 DEF @ $173.77
Assets:Investments:Brokerage  0.555 DEF @ $183.37
Assets:Investments:Brokerage  0.555 DEF @ $159.54
Assets:Investments:Brokerage  0.555 DEF @ $107.77
Assets:Investments:Brokerage  0.555 DEF @ $122.80
Assets:Investments:Brokerage  0.555 DEF @ $139.38
Assets:Investments:Brokerage  0.555 DEF @ $134.81
Assets:Investments:Brokerage  0.555 DEF @ $177.23
Equity:Opening Balances

Maybe this is not the intended solution, should I just average the cost basis 
and record it as one big lot?

Thanks, Tavis.

-- 
 _o)$ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger tav...@sdf.org
_\_V _( ) _( )  @taviso

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/tqqjrd%2417f3%241%40ciao.gmane.io.