segfault in LocationDialog::LocationDialog since rev 1043608

View: New views
2 Messages — Rating Filter:   Alert me  

segfault in LocationDialog::LocationDialog since rev 1043608

by Lukas Middendorf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm experiencing segfaults when I try to open "Set Geographic Location" since
revision

r1043608 | khudyakov | 2009-11-02 00:33:38 +0100 (Mon, 02 Nov 2009) | 5 lines

Add KStarsData::getGeoList function to obtain list of
all geo locations                                    

KSWizard and MapCanvas are not KStarsData friends anymore.


the crash happens in

LocationDialog::LocationDialog(struct QWidget *) (this=0x330aa50,
parent=<value optimized out>) at
/mnt/daten/Software/kde/kdeedu/kstars/kstars/dialogs/locationdialog.cpp:52
52              if ( it.key().length() )

If I change back lines 49 and 50
    QMap<QString, TimeZoneRule>::Iterator it = data->getRulebook().begin();
    QMap<QString, TimeZoneRule>::Iterator itEnd = data->getRulebook().end();

to what they were before r1043608, I do not see the crash.
_______________________________________________
Kstars-devel mailing list
Kstars-devel@...
https://mail.kde.org/mailman/listinfo/kstars-devel

Re: segfault in LocationDialog::LocationDialog since rev 1043608

by Khudyakov Alexey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

В сообщении от 06 ноября 2009 20:45:54 Lukas Middendorf написал:
> I'm experiencing segfaults when I try to open "Set Geographic Location"
>  since revision
>
Thank you for pointing this out. Will fix it tomorrow.

>
> If I change back lines 49 and 50
>     QMap<QString, TimeZoneRule>::Iterator it = data->getRulebook().begin();
>     QMap<QString, TimeZoneRule>::Iterator itEnd =
>  data->getRulebook().end();
>
> to what they were before r1043608, I do not see the crash.

And it shouldn't. It's my mistake. Iterators are created for temporary objects
which are destroyed immediately after. So iterators are pointing into nowhere.
_______________________________________________
Kstars-devel mailing list
Kstars-devel@...
https://mail.kde.org/mailman/listinfo/kstars-devel