Segfault caused by "Hook qt model for country"

Lubomir I. Ivanov neolit123 at gmail.com
Tue Oct 3 16:24:32 PDT 2017


On 4 October 2017 at 02:22, Gaetan Bisson <bisson at archlinux.org> wrote:
> [2017-10-04 02:05:50 +0300] Lubomir I. Ivanov:
>> On 4 October 2017 at 01:46, Gaetan Bisson <bisson at archlinux.org> wrote:
>> > [2017-10-03 12:36:11 -1000] Gaetan Bisson:
>> >> [2017-10-03 10:56:48 -0700] Dirk Hohndel:
>> >> > On Mon, Oct 02, 2017 at 04:50:27PM -1000, Gaetan Bisson wrote:
>> >> > > Hi,
>> >> > >
>> >> > > I'm building the latest git snapshot of Subsurface on Arch Linux (we've
>> >> > > got qt-5.9.1) and the latest commit "Hook qt model for country"
>> >> > > (d5ab03ef4e84820f9530152dbf4ffc29dec6e652) causes a segfault.
>> >> > >
>> >> > > Building goes well but then when running the binary I get:
>> >> > >
>> >> > >   Thread 1 "subsurface" received signal SIGSEGV, Segmentation fault.
>> >> > >   0x0000555555721d87 in DiveListView::DiveListView(QWidget*) ()
>> >> > >   (gdb) bt
>> >> > >   #0  0x0000555555721d87 in DiveListView::DiveListView(QWidget*) ()
>> >> > >   #1  0x000055555566f07e in MainWindow::MainWindow() ()
>> >> > >   #2  0x000055555566858d in init_ui() ()
>> >> > >   #3  0x0000555555666f9d in main ()
>> >> > >
>> >> > > I've bisected this segfault to that precise commit. I have no idea how
>> >> > > to debug this further but will be happy to help in any way I can.
>> >> >
>> >> > Can you look at the disassembly at the crash and see if this might be
>> >> > similar to what Lubomir just reported? The loop going way further than it
>> >> > should?
>> >>
>> >> Yes. I've got no segfault after applying Lubomir's pull request.
>> >
>> > Though now, if the dive list is nonempty, the dive list widget shows
>> > *only* the location column.
>> >
>>
>> that's odd,
>> it doesn't happen for me.
>>
>> i made the default columns widths exactly the same as before.
>> can you provide a screenshot and also what happens if you resize the
>> columns to some normal widths and then restart subsurface?
>
> Sure. I've even tried erasing my Subsurface.conf file. The problem shows
> up as soon as there's one dive in the list. See attached. All is fine.
> Then I click on "Log ==> Add Dive" and all is still fine until I press
> "Apply changes" and then the dive list widget reloads with what you
> see...
>
> Adding some debugging printf's it appears the column width is originally
> set to the correct values. But as soon as dives are loaded into the
> widget, the width is asked again using columnWidth() which then returns
> zero for all columns...
>

On 4 October 2017 at 02:17, Gaetan Bisson <bisson at archlinux.org> wrote:
> [2017-10-04 02:05:50 +0300] Lubomir I. Ivanov:
>> On 4 October 2017 at 01:46, Gaetan Bisson <bisson at archlinux.org> wrote:
>> > [2017-10-03 12:36:11 -1000] Gaetan Bisson:
>> >> [2017-10-03 10:56:48 -0700] Dirk Hohndel:
>> >> > On Mon, Oct 02, 2017 at 04:50:27PM -1000, Gaetan Bisson wrote:
>> >> > > Hi,
>> >> > >
>> >> > > I'm building the latest git snapshot of Subsurface on Arch Linux (we've
>> >> > > got qt-5.9.1) and the latest commit "Hook qt model for country"
>> >> > > (d5ab03ef4e84820f9530152dbf4ffc29dec6e652) causes a segfault.
>> >> > >
>> >> > > Building goes well but then when running the binary I get:
>> >> > >
>> >> > >   Thread 1 "subsurface" received signal SIGSEGV, Segmentation fault.
>> >> > >   0x0000555555721d87 in DiveListView::DiveListView(QWidget*) ()
>> >> > >   (gdb) bt
>> >> > >   #0  0x0000555555721d87 in DiveListView::DiveListView(QWidget*) ()
>> >> > >   #1  0x000055555566f07e in MainWindow::MainWindow() ()
>> >> > >   #2  0x000055555566858d in init_ui() ()
>> >> > >   #3  0x0000555555666f9d in main ()
>> >> > >
>> >> > > I've bisected this segfault to that precise commit. I have no idea how
>> >> > > to debug this further but will be happy to help in any way I can.
>> >> >
>> >> > Can you look at the disassembly at the crash and see if this might be
>> >> > similar to what Lubomir just reported? The loop going way further than it
>> >> > should?
>> >>
>> >> Yes. I've got no segfault after applying Lubomir's pull request.
>> >
>> > Though now, if the dive list is nonempty, the dive list widget shows
>> > *only* the location column.
>> >
>>
>> that's odd,
>> it doesn't happen for me.
>>
>> i made the default columns widths exactly the same as before.
>> can you provide a screenshot and also what happens if you resize the
>> columns to some normal widths and then restart subsurface?
>
> Sure. I've even tried erasing my Subsurface.conf file. The problem shows
> up as soon as there's one dive in the list. See attached. All is fine.
> Then I click on "Log ==> Add Dive" and all is still fine until I press
> "Apply changes" and then the dive list widget reloads with what you
> see... The last file "bla4.png" is with my normal Subsurface profile
> instead of an empty one.
>
> Adding some debugging printf's it appears the column width is originally
> set to the correct values. But as soon as dives are loaded into the
> widget, the width is asked again using columnWidth() which then returns
> zero for all columns...
>

thanks,

that's very strange and it doesn't happen for me.
attached is a screenshot after adding a single dive.

i will investigate more...

lubomir
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: single_dive.jpg
Type: image/jpeg
Size: 235755 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20171004/4ce79126/attachment-0001.jpg>


More information about the subsurface mailing list