realbasic-plugins
[Top] [All Lists]

Re: PEF in Mach-O App crash - Puzzle - Solved

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: PEF in Mach-O App crash - Puzzle - Solved
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Tue, 22 Mar 2005 21:27:16 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE65DFFD dot C358%vanhoek at mac dot com> <28B95A9C-9B0D-11D9-8123-000A277A7E3C at einhugur dot com>
The case seems to have been that REALbasic does not like the property structure to be shared on Mach-O

So having two for the two sister classes like bellow solves the problem:
(I cant say I understand it though, unless if REALbasic writes something to the structure ??)

REALproperty ObjectStackProperties[1] = {
        { nil, "Size", "Integer", 0, (REALproc)ObjectStackGetSize ,nil,0},
};

REALproperty VariantStackProperties[1] = {
        { nil, "Size", "Integer", 0, (REALproc)ObjectStackGetSize ,nil,0},
};

On 22.3.2005, at 20:01, Björn Eiríksson wrote:


On 22.3.2005, at 19:45, Alfred Van Hoek wrote:

on 3/22/05 1:51 PM, Björn Eiríksson at bjorn at einhugur dot com wrote:

So if I am not missing something very obvious here then I don't get it why no-one has hit the problem before, other plugin authors, my self or
even REALsoftware in their own built in plugins.

I did, Mach-O is not forgiving, while PEF allows certain things. Your plug likely corrupts memory, and it shows up in Mach-O. I bet that if you would
build for Mach-O you will still experience the crash.


This is the only thing that happens in the constructor:

ClassData(ObjectStackClass, instance, ObjectStackStruct, me);
                
me->m_Top      = 0;
me->m_Count   = 0;
me->m_Current = 0;

And the crash happens regardless if you call Push or not so with it given that only the code in the constructor above then there is no memory that can be corrupted. (Unless if someone has a suggestion on how the above could possibly corrupt memory ?)


--
______________________________________________________________________
Björn Eiríksson                            bjorn at einhugur dot com
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 43 countries world wide.
______________________________________________________________________
For support:                               support at einhugur dot com
To post on the maillist:                   einhugur at yahoogroups dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>