realbasic-plugins
[Top] [All Lists]

PEF in Mach-O App crash - Puzzle

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: PEF in Mach-O App crash - Puzzle
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Tue, 22 Mar 2005 18:51:37 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
Hello

I just got a bug report from a user where a Mach-O app using a PEF plugin fails on a property, and I am not sure yet how to report it, I was wondering if others are getting the same also.

Here is how the code is called from REALbasic:

  stack = new ObjectStack()

stack.Push(new Date()) // The fact that this one is valid shows the object is alive

i = stack.Size // Crash (When the App is Mach-O, no Crash when the App is PEF)
  MsgBox Str(i)

(Note that the plugin is always PEF only)


long ObjectStackGetSize(REALobject instance,long param)
{
DebugStr("\pIn ObjectStackGetSize"); // In a Mach-O App then we never ever get here

        ClassData(ObjectStackClass, instance, ObjectStackStruct, me);
        
        return me->m_Count;
}

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

I tried adding a Setter also to see if it was the fact that its read only that causes the crash. I tried with and without the "long param", and tried with and without the zero for the field offset.

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.

(And note we are talking about REALbasic 5.5.x here)

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

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