[lazarus] Shane's Self Problem detected!

Shane Miller SMiller1 at stvgb.org
Thu May 13 14:08:54 EDT 1999


I am reloading my system with 1.2.1 gtk and glib so hopefully I can compile and run the software here.  Otherwise I'll have to answer you when I get to my home system.

thought:  Make sure fmeditor is being declared localy and make sure that in MAIN.PP ActivePage is being set to NUm (I think).

If you see what I am doing, feel frfee to rewrite it so it works.

Shane


>>> Payne Thomas E CNIN <payne_t at crane.navy.mil> 05/13 12:43 PM >>>
Shane,

Writeln('In OPENFILE');
fmEditor := TEditor(UnitList.Objects[ActivePage]); <---This was commented
out before
{ PageControl1 := TPageControl.Create(self);
...
 TabSheet1.Show;
}
Writeln('Creating the MEmo....');


Tom
> -----Original Message-----
> From:	Shane Miller [SMTP:SMiller1 at stvgb.org] 
> Sent:	Thursday, May 13, 1999 12:16 PM
> To:	lazarus at miraclec.com 
> Subject:	Re: RE: RE: [lazarus] Shane's Self Problem detected!
> 
> What line is it crashing on?  What's after the IN OPENFILE in your source?
> 
> Shane
> 
> 
> >>> Payne Thomas E CNIN <payne_t at crane.navy.mil> 05/13 10:32 AM >>>
> 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 
> 
> _________________________________________________________________
>      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