[lazarus] Editor Crash explanation

Cliff Baeseman Cliff.Baeseman at Greenheck.Com
Thu May 13 16:44:45 EDT 1999


This seems to be because of Shane's problem with Passing Self as the owner
of a control. You see we use a procedure
called addcontrol in the TControl object at the top of the component tree.
This has to have a owner or a crash will occur. Whoever is the controls
owner is where tcomponent gets placed using gtk_table_attach. A Table is
placed on the parent and the widget is added based on it's height and width
properites..

Cliff

-----Original Message-----
From: Payne Thomas E CNIN [mailto:payne_t at crane.navy.mil]
Sent: Thursday, May 13, 1999 10:35 AM
To: 'lazarus at miraclec.com'
Subject: RE: RE: [lazarus] Shane's Self Problem detected!


Shane,

I am working off of both as of this morning.  I just figured out that I can
checkout lazarus from the FPC CVS server.
My comments are from the .zip file on cliff's web page.

The .zip version has unitlist and ActivePage in global.pp.  I found the
commented out line you referenced and uncommented it.

This time I get an unhandled exception after 'In OPENFILE' (not 'Creating
the MEmo');

Tom

btw: I have not updated FPC since yesterday (via CVS).

> -----Original Message-----
> From:	Shane Miller [SMTP:SMiller1 at stvgb.org]
> Sent:	Thursday, May 13, 1999 10:10 AM
> To:	lazarus at miraclec.com
> Subject:	Re: RE: [lazarus] Shane's Self Problem detected!
>
> Payne,
> I'm not sure what code your working off, so this may not work.
>
> Make sure that your global.pp file has a reference to unitlist and
> ActivePage.  If so this will work.
> The reason it crashes is because fmEditor does not contain anything so
> assigning the Memo1's parent to fmeditor crashes.  What I did was add a
> local variable called fmeditor in the OPENFILE procedure and assign it to
> TEditor(UnitList.Objects[ActivePage]);
>
> Then, fmeditor is assigned to something.
> Try that and let me know if it works.
> Shane
>
>
> >>> Payne Thomas E CNIN <payne_t at crane.navy.mil> 05/13 9:43 AM >>>
> Problem:  Lazarus halt with an unhandled exception after choosing a file
> from FILE OPEN pulldown menu dialog box reference (lazarus/editor.pp line
> 278 'Memo1 := TMemo.Create(fmEditor);' )
>
> Possible Cause:  Object TMemo's create method is the constructor and
> should
> pass a pointer back to Memo1 variable, but... the vmtSelfPtr is not
> implemented in FPC (reference rtl/objpas/objpas.pp line 27 '//vmtSelfPtr =
> -36; {not implemented yet})
>
> Background:
> I have not tested this theory, but it seems right.  Object Pascal
> liturature
> states that you can send an app into the 'wild blue yonder' by using an
> object's method without calling the constructor to intialize the link to
> the
> virtual method table of the object. The editor problem seems related to
> tha
> t, even though you are calling the constructor.
>
> Solution:
> It beyond my capability to suggest one.
>
> Tom
>
> > -----Original Message-----
> > From:	Cliff.Baeseman at Greenheck.com
> [SMTP:Cliff.Baeseman at Greenheck.com]
> > Sent:	Thursday, May 13, 1999 8:58 AM
> > To:	lazarus at miraclec.com
> > Subject:	[lazarus] Shane's Self Problem detected!
> >
> > Shane.
> >    Tom sent me a mail message that said we should look at the objpas
> unit
> > something about self being commented out where it should
> > be pointing to a memory table....
> >
> >
> > Cliff
> >
> > - "If you kiss me, I'll turn into a beautiful princess."
> > - "Look, I'm a computer programmer. I don't have time for girls,
> > but a talking frog is very very cool."
> >
> >
> > _________________________________________________________________
> >      To unsubscribe: mail lazarus-request at miraclec.com with
> >                 "unsubscribe" as the Subject
> >     archives at http://www.miraclec.com/list_archives/lazarus
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list