[Kstars-devel] crash when opening a new window

Thomas Kabelmann thomas.kabelmann at gmx.de
Mon Sep 24 16:10:40 CEST 2007


Hi Jason,

you're right with the singleton. I've thought about it some time ago but have 
not tried the KDE 4 code yet. I think opening a new window from the 
application is not very intuitive and we should remove this menu entry. For 
that purpose the desktop or the system menu bar is the right place. If we 
really want to keep this entry, we should use fork(). This system call is 
designed for duplicating an application at runtime.

Regards,
Thomas

Am Montag, 24. September 2007 schrieb Jason Harris:
> Hello,
>
> I'm trying to track down a crash when opening a new KStars window.  I
> suspect it may be related to the fact that KStarsData is now a singleton. 
> I don't know what happens here (kstars.cpp, line 71):
>
>     kstarsData = KStarsData::Create( this );
>
> when opening a second KStars window.  Does it return the original
> KStarsData object, or make a new one, since we are initializing a new
> KStars object?
>
> Anyway, the crash usually happens immediately, but I've seen one instance
> where the splashscreen appeared and made it most of the way through its
> init cycle before crashing.  Backtraces show the crash is a segfault in
> ColorScheme::colorNamed(), which seems like a pretty odd place for a crash.
>
> My current guess is that the original window's kstarsData object is getting
> messed up when initializing the new window's kstarsData.  But that's just a
> guess.
>
> Any ideas?
>
> thanks,
> Jason
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel




More information about the Kstars-devel mailing list