[Kstars-devel] crash when opening a new window

Jason Harris jharris at 30doradus.org
Mon Sep 24 16:14:44 CEST 2007


Hi Thomas,

On Monday 24 September 2007 07:10:40 am Thomas Kabelmann wrote:
> 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.
>

Maybe it doesn't make sense to open a new window from the menu, at least not 
the way we currently do it.  It might make more sense if KStarsData contained 
only the data that could be shared between all open KStars windows (i.e., the 
object catalogs), and all instance-specific data (the date/time, color 
scheme, etc.) was moved to KStars and SkyMap.  In other words, make KStars 
conform to a "Model/View" framework, where KStarsData is the Model and KStars 
and SkyMap are the View.

But, I don't think this is the time to make changes at this level, so I'm 
inclined to agree about disabling the New/Close Window actions.

Jason

> 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
>
> _______________________________________________
> 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