Bug 215054 - ksudoku crash on startup, with patch
Summary: ksudoku crash on startup, with patch
Status: RESOLVED DUPLICATE of bug 294420
Alias: None
Product: ksudoku
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Johannes.Bergmeier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-18 00:58 UTC by Christopher Neufeld
Modified: 2012-02-23 08:25 UTC (History)
3 users (show)

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 Christopher Neufeld 2009-11-18 00:58:05 UTC
Version:            (using Devel)
Compiler:          gcc-4.2.4 
OS:                Linux
Installed from:    Compiled sources

I checked out revision 1050528 and compiled it.  Ksudoku always crashes at startup.  It happens at ksudoku/src/gui/views/valuelistwidget.cpp:165 because m_maxValue is 1, but m_symbols is an empty list.

I was able to fix this with the following patch.  This may not be the correct fix, but it works for me:

--- ksudoku/src/gui/views/valuelistwidget.cpp   (revision 1050705)
+++ ksudoku/src/gui/views/valuelistwidget.cpp   (working copy)
@@ -126,7 +126,7 @@
        m_selectionItem = new SelectionItem();
        m_scene->addItem(m_selectionItem);

-       m_maxValue = 1;
+       setMaxValue(1);
        m_selectedValue = 1;
 }
Comment 1 Albert Astals Cid 2009-11-27 19:45:25 UTC
Johannes can you have a look?
Comment 2 Johannes.Bergmeier 2010-01-23 01:31:54 UTC
I'm not able to reproduce this bug. Can you give infos about your system configuration and a backtrace? Are you using Qt 4.6?
Comment 3 Christopher Neufeld 2010-01-24 00:53:06 UTC
I just rebuilt from revision 1079103, with and without my patch.  It no longer crashes.

Before closing the bug, can you comment on the validity of the patch?  The manipulator function setMaxValue() appears to be intended to set m_maxValue, and also do further things to keep the system consistent.  Even if it does not generate a reproducible crash anymore, might the patched version be safer?
Comment 4 Frederik Schwarzer 2010-04-19 17:26:46 UTC
Johannes? Comments?
Comment 5 Ian Wadham 2012-02-23 08:25:30 UTC
Fixed in the KDE 4.8.1 release. The above patch does the trick.

*** This bug has been marked as a duplicate of bug 294420 ***