Fabian Fagerholm wrote:
Anthony, any chance you could try the following things:

      * Could you compile the attached file (g++ -g -o test test.cpp)
        and run it under gdb? If it crashes in the same way, we have a
        smaller test case to work with.
The program does not crash.

      * Could you apply the attached patch to src/gtkmm/dockdialog.cpp,
        recompile and provide the output? Or put a gdb breakpoint at
        dockdialog.cpp:506 and then print the value of str and
        separator?

Breakpoint 1, studio::DockDialog::set_contents (this=0xfe2320, z=<value optimized out>) at dockdialog.cpp:506
506                             
book_contents=String(str.begin(),str.begin()+separator);
(gdb) p str
$3 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xfee418 "navigator - info pal_edit pal_browse - tool_options history canvases - layers groups"}}
(gdb) p separator
$4 = 10


However, it appears that line is run several times.

  1. 1: str = {static npos = 18446744073709551615,
       _M_dataplus = {<std::allocator<char>> =
     {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
     fields>},
         _M_p = 0xfee418 "navigator - info pal_edit pal_browse -
     tool_options history canvases - layers groups"}}
     (gdb) display separator
     2: separator = 10
  2. 2: separator = 26
     1: str = {static npos = 18446744073709551615,
       _M_dataplus = {<std::allocator<char>> =
     {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
     fields>},
         _M_p = 0xfee548 " info pal_edit pal_browse - tool_options
     history canvases - layers groups"}}
  3. 2: separator = 31
     1: str = {static npos = 18446744073709551615,
       _M_dataplus = {<std::allocator<char>> =
     {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
     fields>},
         _M_p = 0xff8218 " tool_options history canvases - layers groups"}}
  4. 2: separator = 4294967295
     1: str = {static npos = 18446744073709551615,
       _M_dataplus = {<std::allocator<char>> =
     {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
     fields>}, _M_p = 0xff2b28 " layers groups"}}

The crash is, of course, after #4.

Looking at the code, on line 483 and 485, is unsigned int really right? Note that on amd64, sizeof(int) is 4 and sizeof(ptrdiff_t) is 8...


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to