[TextEditor_mcc] Re: Editor test program crashes in MorphOS

  • From: Jens Langner <Jens.Langner@xxxxxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Thu, 11 Aug 2005 15:28:18 +0200

Hi Ilkka,

Ilkka Lehtoranta schrieb:

> Got problem mentioned in the title - test program was hitting like crazy 
> and busylooped. Dumped binary from hitzone and it was good old 
> LineCharsWidth() again.
[...]
> There is one problem left: the temporary rastport is initialized in 
> MUIM_Setup and MUIM_Hide. It seems (at least in MUI4) that MUIM_Setup is 
> not invoked at all if object is in window but hidden.

Either this is a MUI4 specific thing (which I can't believe) or the
reason must be something different because it is very unwise that
MUIM_Setup is not called even if the object is hidden in the window.
That's because in our current (and also probably in other mcc's as well)
the whole configuration initialization is done in MUIM_Setup.

So before we are going to change something here I would like to be 100%
certain that MUI4 really doesn't call MUIM_Setup in case the object is
hidden. Can you please verify that again and also check with an older
MUI version unter MorphOS, please?

> It is also possible to crash editor if text is inserted right after when 
> application object is created. Temporary rastport should be initialized in 
> OM_NEW already. I dont know what to use for SetFont() ?  GfxBase->DefaultFont 
> ?

As I said. Normally (since the very first version of MUI) MUIM_Setup is
always called no matter if the object is hidden or not and it also
doesn't make much sense why it shouldn't be called. For such a purpose
you normally have MUIM_Show and MUIM_Hide AFAIK. And no, setting the
font to DefaultFont is not the proper way of doing it. The only sensible
solution (in case MUI4 is really not calling MUIM_Setup and it is also
no bug in MUI4) would be to move the InitConfig() call to OM_NEW as well
and then do a SetFont(data->font) accordingly.

So please do invesitgate a bit further because I can't really believe
that Stefan changed MUI so fundamentally because then many other MUI
calsses would probably not work anymore.

jens
-- 
Jens Langner                                         Ph: +49-351-4716545
Lannerstrasse 1
01219 Dresden                                Jens.Langner@xxxxxxxxxxxxxx
Germany                                      http://www.jens-langner.de/
_____________________________________________________________________________
TextEditor ML   - //www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025

Other related posts: