#49 [svn] Crash when trying to sell shares for $0

closed-fixed
Portfolio (43)
7
2006-08-17
2006-08-17
Anonymous
No

<tried to sell 18 shares of BCE at $0, then want to buy a BCE trust at $0 - we'll see what happens...for now will try to sell them at a penny>

Message: Pre-Condition of function virtual libawf::html_object* transactions_view::get_navmenu() was violated, expression: _symbol.length() > 0.
File: transactionsview.cc
Line: 165
Function: virtual libawf::html_object* transactions_view::get_navmenu()
Error Type: N6libawf21precondition_violatedE
Stack Trace:
#1 /var/www/localhost/htdocs/ast/ast [0x828ceb7]
#2 /var/www/localhost/htdocs/ast/ast [0x828c6c8]
#3 /var/www/localhost/htdocs/ast/ast [0x814e19c]
#4 /var/www/localhost/htdocs/ast/ast [0x80694b5]
#5 /var/www/localhost/htdocs/ast/ast [0x831b980]
#6 /var/www/localhost/htdocs/ast/ast [0x836fe63]
#7 /var/www/localhost/htdocs/ast/ast [0x82a142c]
#8 /var/www/localhost/htdocs/ast/ast [0x82ce0ae]
#9 /var/www/localhost/htdocs/ast/ast [0x8288abe]
#10 /var/www/localhost/htdocs/ast/ast [0x82860ae]
#11 /var/www/localhost/htdocs/ast/ast [0x806a3dc]
#12 /lib/libc.so.6(__libc_start_main+0xa6) [0xb7970396]
#13 /var/www/localhost/htdocs/ast/ast(__gxx_personality_v0+0x125) [0x804d401]

Parameters: action=append-save
process=transactions
transaction.currency_id=CAD
transaction.date-day=20
transaction.date-month=7
transaction.date-year=2006
transaction.market=0
transaction.portfolio_id=4
transaction.price=0
transaction.price2=0
transaction.quantity=18
transaction.symbol=BCE
transaction.type=2

Version: svn
Language: NOT USING NLS
Crypto: libmhash
TA-lib Version: < 0.2.0
Compression: enabled
SQL Support: enabled
OS: Linux 2.6.16-gentoo-r7
Bit Size: 32 bits
Server: Apache
User Agent: Opera/9.00 (Windows NT 5.1; U; en)
Contact: karenwilliamson@aci.on.ca

Discussion

  • Michael Williamson

    • labels: --> Portfolio
    • milestone: --> Version 0.2.x (Final)
    • priority: 5 --> 7
    • assigned_to: nobody --> mwilliamson
    • summary: [svn] <POssibly because="" shares="" sold="" at="" 0=""> --> [svn] Crash when trying to sell shares for $0
    • status: open --> closed-fixed
     
  • Michael Williamson

    Logged In: YES
    user_id=1281708

    Thanks. I've fixed this in svn commit #298. You can't sell
    for $0, though maybe I can change this. The fix only allows
    you to see the error message.

    Index: src/src/transactionsview.cc

    --- src/src/transactionsview.cc (revision 282)
    +++ src/src/transactionsview.cc (working copy)
    @@ -318,6 +318,13 @@
    void transactions_view::validate_record(
    libawf::parameter_set& pset, libawf::record & r )
    {
    transaction_record& rec =
    dynamic_cast<transaction_record&>(r);
    +
    + // Fix Bug #1542045: Make sure these are set before any
    errors can be thrown
    + // otherwise the error page will complain symbol is not
    set.
    + _symbol = rec.symbol();
    + _market = rec.market();
    + _portfolio_id = rec.portfolio_id();
    +
    // Share dividend is type 4, which does not require a
    price, only a quantity.
    if( rec.price() <= 0 && rec.type() !=
    TRANSACTION_SHARE_DIV )
    AWF_TOSS_INPUT_ERROR("transaction.price",_("Price must
    be greater than 0."));
    @@ -335,10 +342,6 @@

    rec.date( (time_t)now );
    }
    -
    - _symbol = rec.symbol();
    - _market = rec.market();
    - _portfolio_id = rec.portfolio_id();

    if( rec.type() == TRANSACTION_BUY )
    {

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks