Bug 295060 - Greeter crashes in ExtraRowProxy if sourceModel is empty
Summary: Greeter crashes in ExtraRowProxy if sourceModel is empty
Status: RESOLVED FIXED
Alias: None
Product: lightdm
Classification: Miscellaneous
Component: greeter (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 11:27 UTC by David Edmundson
Modified: 2012-03-03 12:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2012-02-29 11:27:12 UTC
** (process:11722): WARNING **: Failed to open sessions directory: Error opening directory '/usr/local/share/xsessions': No such file or directory

Program received signal SIGSEGV, Segmentation fault.
detach (this=0x867e30) at /usr/include/qt4/QtCore/qhash.h:299
299         inline void detach() { if (d->ref != 1) detach_helper(); }
(gdb) bt
#0  detach (this=0x867e30) at /usr/include/qt4/QtCore/qhash.h:299
#1  operator[] (akey=<synthetic pointer>, this=0x867e30) at /usr/include/qt4/QtCore/qhash.h:738
#2  ExtraRowProxyModel::setRowData (this=<optimized out>, id=0, column=0, value=..., role=0)
    at /home/david/lightdm/lightdm-kde/greeter/extrarowproxymodel.cpp:38
#3  0x000000000040d8a5 in GreeterWindow::GreeterWindow (this=0x858050, parent=<optimized out>)
    at /home/david/lightdm/lightdm-kde/greeter/greeterwindow.cpp:88
#4  0x000000000040b08a in main (argc=1, argv=0x7fffffffe0f8)
    at /home/david/lightdm/lightdm-kde/greeter/main.cpp:45
Comment 1 David Edmundson 2012-03-03 12:18:23 UTC
Git commit ad3973c82159befd92d2db199058f12e4cabb911 by David Edmundson.
Committed on 03/03/2012 at 13:16.
Pushed by davidedmundson into branch 'master'.

Convert columns to a QHash rather than a QVector in ExtraModelProxy

Previously number of columns was allocated to be the same as the number of rows which makes no sense
which caused a crash when the source model had no rows and a column was added.

M  +2    -2    greeter/extrarowproxymodel.cpp
M  +2    -2    greeter/extrarowproxymodel.h

http://commits.kde.org/lightdm/ad3973c82159befd92d2db199058f12e4cabb911