lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Input-sequence anomaly [Was: wx_test: output strings truncated


From: Greg Chicares
Subject: Re: [lmi] Input-sequence anomaly [Was: wx_test: output strings truncated to one character]
Date: Thu, 11 Feb 2016 04:44:27 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 02/11/2016 03:30 AM, Greg Chicares wrote:
[...]
> Let's try the last example above in gdb:

Once more, to localize the problem...looks like it goes haywire in
InputSequenceEditor::add_row().

/opt/lmi/bin[0]$gdb --quiet lmi_wx_shared.exe
Reading symbols from lmi_wx_shared.exe...done.
(gdb) set arg --ash_nazg --data_path=/opt/lmi/data
(gdb) b InputSequenceEntry::UponOpenEditor(wxCommandEvent&)
Function "InputSequenceEntry::UponOpenEditor(wxCommandEvent&)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (InputSequenceEntry::UponOpenEditor(wxCommandEvent&)) pending.
(gdb) r
Starting program: /opt/lmi/bin/lmi_wx_shared.exe --ash_nazg 
--data_path=/opt/lmi/data
[New Thread 812.0x100]

Breakpoint 1, InputSequenceEntry::UponOpenEditor (this=0x49a07f8)
    at /lmi/src/lmi/input_sequence_entry.cpp:1359
1359    {
(gdb) n
1360        Input const& in = input();
(gdb) n
1364        InputSequenceEditor editor(button_, title_, in);
(gdb) n
1360        Input const& in = input();
(gdb) n
1364        InputSequenceEditor editor(button_, title_, in);
(gdb) n
1366        std::string sequence_string = std::string(text_->GetValue());
(gdb) n
1367        datum_sequence const& ds = 
*member_cast<datum_sequence>(in[field_name()]);
(gdb) n
1369        std::map<std::string,std::string> const kwmap = 
ds.allowed_keywords();
(gdb) n
1367        datum_sequence const& ds = 
*member_cast<datum_sequence>(in[field_name()]);
(gdb) n
1369        std::map<std::string,std::string> const kwmap = 
ds.allowed_keywords();
(gdb) n
1371            detail::extract_keys_from_string_map(kwmap);
(gdb) n
1369        std::map<std::string,std::string> const kwmap = 
ds.allowed_keywords();
(gdb) n
1371            detail::extract_keys_from_string_map(kwmap);
(gdb) n
1374                ds.keyword_values_are_allowable()
(gdb) n
1375            && !ds.numeric_values_are_allowable()
(gdb) n
1378        editor.set_keywords(keywords, keywords_only, ds.default_keyword());
(gdb) n
1391            );
(gdb) n
1389            ,ds.default_keyword()
(gdb) n
1378        editor.set_keywords(keywords, keywords_only, ds.default_keyword());
(gdb) n
1391            );
(gdb) n
1389            ,ds.default_keyword()
(gdb) n
1391            );
(gdb) n
1393        std::string const diagnostics = 
sequence.formatted_diagnostics(true);
(gdb) n
1391            );
(gdb) n
1393        std::string const diagnostics = 
sequence.formatted_diagnostics(true);
(gdb) n
1394        if(!diagnostics.empty())
(gdb) n
1393        std::string const diagnostics = 
sequence.formatted_diagnostics(true);
(gdb) n
1394        if(!diagnostics.empty())
(gdb) n
1404        editor.sequence(sequence);
(gdb) set pr pr on
(gdb) pr diagnostics
Ambiguous command "pr diagnostics": print, print-object, printf.
(gdb) print diagnostics
$1 = {
  static npos = <optimized out>,
  _M_dataplus = {
    <std::allocator<char>> = {
      <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
    _M_p = 0x49efcdc ""
  }
}
(gdb) print sequence
$2 = {
  <lmi::uncopyable<InputSequence>> = {<No data fields>},
  <obstruct_slicing<InputSequence>> = {<No data fields>},
  members of InputSequence:
  _vptr.InputSequence = 0x82b0ac <vtable for InputSequence+12>,
  input_stream = <incomplete type>,
  last_possible_duration = 55,
  issue_age = 45,
  retirement_age = 65,
  inforce_duration = 0,
  effective_year = 2016,
  index_origin = 0,
  extra_keywords = {
    <std::_Vector_base<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >, std::allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > > >> = {
      _M_impl = {
        <std::allocator<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > >> = {
          <__gnu_cxx::new_allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No 
data fields>},
        members of std::_Vector_base<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, 
std::allocator<std::basic_string<char, std::char_tr---Type <return> to 
continue, or q <return> to quit---
aits<char>, std::allocator<char> > > >::_Vector_impl:
        _M_start = 0x49efc98,
        _M_finish = 0x49efcb4,
        _M_end_of_storage = 0x49efcb4
      }
    }, <No data fields>},
  default_keyword = {
    static npos = <optimized out>,
    _M_dataplus = {
      <std::allocator<char>> = {
        <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data 
fields>},
      members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
      _M_p = 0x49ef93c ""
    }
  },
  keywords_only = false,
  current_token_type = InputSequence::e_eof,
  current_number = 1000000,
  current_keyword = {
    static npos = <optimized out>,
    _M_dataplus = {
---Type <return> to continue, or q <return> to quit---
      <std::allocator<char>> = {
        <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data 
fields>},
      members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
      _M_p = 0x49f21f4 ""
    }
  },
  current_duration_scalar = 2089915119,
  previous_duration_scalar_mode = e_inception,
  current_duration_scalar_mode = e_inception,
  last_input_duration = 1,
  diagnostics = <incomplete type>,
  current_interval = {
    value_number = 1000000,
    value_keyword = {
      static npos = <optimized out>,
      _M_dataplus = {
        <std::allocator<char>> = {
          <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data 
fields>},
        members of std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider:
---Type <return> to continue, or q <return> to quit---
        _M_p = 0x49efd2c "insane"
      }
    },
    value_is_keyword = false,
    begin_duration = 0,
    begin_mode = e_inception,
    end_duration = 1,
    end_mode = e_duration,
    insane = false
  },
  intervals = {
    <std::_Vector_base<ValueInterval, std::allocator<ValueInterval> >> = {
      _M_impl = {
        <std::allocator<ValueInterval>> = {
          <__gnu_cxx::new_allocator<ValueInterval>> = {<No data fields>}, <No 
data fields>},
        members of std::_Vector_base<ValueInterval, 
std::allocator<ValueInterval> >::_Vector_impl:
        _M_start = 0x49efd50,
        _M_finish = 0x49efd78,
        _M_end_of_storage = 0x49efd78
      }
    }, <No data fields>},
---Type <return> to continue, or q <return> to quit---
  number_result = {
    <std::_Vector_base<double, std::allocator<double> >> = {
      _M_impl = {
        <std::allocator<double>> = {
          <__gnu_cxx::new_allocator<double>> = {<No data fields>}, <No data 
fields>},
        members of std::_Vector_base<double, std::allocator<double> 
>::_Vector_impl:
        _M_start = 0x49f42b8,
        _M_finish = 0x49f4470,
        _M_end_of_storage = 0x49f4470
      }
    }, <No data fields>},
  keyword_result = {
    <std::_Vector_base<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> >, std::allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > > >> = {
      _M_impl = {
        <std::allocator<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > >> = {
          <__gnu_cxx::new_allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No 
data fields>},
        members of std::_Vector_base<std::basic_string<char, 
std::char_traits<ch---Type <return> to continue, or q <return> to quit---
ar>, std::allocator<char> >, std::allocator<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > > >::_Vector_impl:
        _M_start = 0x49f4580,
        _M_finish = 0x49f465c,
        _M_end_of_storage = 0x49f465c
      }
    }, <No data fields>}
}
(gdb) s
(anonymous namespace)::InputSequenceEditor::sequence (s=...,
    this=<optimized out>) at /lmi/src/lmi/input_sequence_entry.cpp:346
346             remove_row(0);
(gdb) n
344         while(0 < rows_count_)
(gdb) n
349         std::vector<ValueInterval> const& intervals = 
s.interval_representation();
(gdb) n
350         int const num_intervals = intervals.size();
(gdb) n
352         if(intervals.empty())
(gdb) n
350         int const num_intervals = intervals.size();
(gdb) n
352         if(intervals.empty())
(gdb) n
359         LMI_ASSERT(0 == intervals.front().begin_duration);
(gdb) n
360         LMI_ASSERT(e_maturity == intervals.back().end_mode);
(gdb) n
361         for(int i = 1; i < num_intervals; ++i)
(gdb) print num_intervals
$3 = 1
(gdb) n
366         for(int i = 0; i < num_intervals; ++i)
(gdb) n
369             LMI_ASSERT(!data.insane);
(gdb) n
371             add_row();
(gdb) n
pure virtual method called
warning: In file ../include/wx/msw/private.h at line 809: 'UnregisterClass' 
failed with error 0x00000584 (class still has open windows.).
In file ../include/wx/msw/private.h at line 809: 'UnregisterClass' failed with 
error 0x00000584 (class still has open windows.).
[Inferior 1 (process 812) exited with code 01]
(gdb) q
/opt/lmi/bin[0]$





reply via email to

[Prev in Thread] Current Thread [Next in Thread]