Xojo Conferences
XDCMay2019MiamiUSA

FSpCreate crashes in a Carbon plugin (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Re: [V4Rb 2] Constructor overriding problem
Next thread: Using Windows GDI+


macosx and unix paths   -   GOLD
  FSpCreate crashes in a Carbon plugin   -   Fred Ross-Perry
   Re: FSpCreate crashes in a Carbon plugin   -   Alfred Van Hoek
    Re: FSpCreate crashes in a Carbon plugin   -   Thomas Tempelmann
    RE: FSpCreate crashes in a Carbon plugin   -   Fred Ross-Perry
    RE: FSpCreate crashes in a Carbon plugin   -   Fred Ross-Perry
    RE: FSpCreate crashes in a Carbon plugin   -   Thomas Tempelmann

FSpCreate crashes in a Carbon plugin
Date: 02.06.05 23:39 (Thu, 2 Jun 2005 15:39:11 -0700)
From: Fred Ross-Perry
Hi, 'm new to the list.

I inherited a RB application and a plugin, all working.

To the plugin I added a function, and a bunch of C++
classes to support it. Builds fine.

Inside one of those classes is a call to FSpCreate
that crashes the application. Although, the file
does get created.

When I build those same classes into a regular old
Carbon C++ application, it works fine.

Ideas?

RB 5.2.4, CW 8.3, OS X 10.3.9.

thanks,
fred ross-perry
san Rafael, ca

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

Re: FSpCreate crashes in a Carbon plugin
Date: 03.06.05 02:37 (Thu, 02 Jun 2005 21:37:27 -0400)
From: Alfred Van Hoek
on 6/2/05 6:39 PM, Fred Ross-Perry at <email address removed> wrote:

> FSpCreate

Requires an FSSpec. RB's folderItem requires an FSRef in OSX, so the guess
is it fails in the conversion from FSSpec to Folderitem.

Having said that, I am really not sure what's going on, 'cause it sounds
like a Carbon problem, which could be addressed on the carbon list of
course, given the little info you provide.

Alfred

PS: Not sure why you want to create a file; Rather, get the folderitem from
the caller of the plugin, and transform that to an FSRef, but again not
knowing what the plug does or should makes it all speculative.

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

Re: FSpCreate crashes in a Carbon plugin
Date: 03.06.05 02:01 (Thu, 2 Jun 2005 18:01:03 -0700)
From: Thomas Tempelmann
Fred Ross-Perry wrote:

>To the plugin I added a function, and a bunch of C++
>classes to support it. Builds fine.

If you use static vars for C++ classes, it won't work properly because
they do not get properly initialized by RS' plugin startup code and could
cause random crashes.

You could either switch to using my Plugin Starter "framework" (it init
the C++ environment properly as needed) or try creating the class
instances dynamically by declaring them as pointers and using "new" to
instantiate them.

Thomas
_______________________________________________
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>

RE: FSpCreate crashes in a Carbon plugin
Date: 03.06.05 16:13 (Fri, 3 Jun 2005 08:13:53 -0700)
From: Fred Ross-Perry
Never Mind. I was using a version of the Plugin SDK that was too old
for
RB 5.2.4. Switching to the latest SDK solved my problem. Thanks for
listening.

_____________________________________________
From: Fred Ross-Perry
Sent: Thursday, June 02, 2005 3:39 PM
To: '<email address removed>'
Subject: FSpCreate crashes in a Carbon plugin

Hi, 'm new to the list.

I inherited a RB application and a plugin, all working.

To the plugin I added a function, and a bunch of C++
classes to support it. Builds fine.

Inside one of those classes is a call to FSpCreate
that crashes the application. Although, the file
does get created.

When I build those same classes into a regular old
Carbon C++ application, it works fine.

Ideas?

RB 5.2.4, CW 8.3, OS X 10.3.9.

thanks,
fred ross-perry
san Rafael, ca

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

RE: FSpCreate crashes in a Carbon plugin
Date: 03.06.05 18:17 (Fri, 3 Jun 2005 10:17:07 -0700)
From: Fred Ross-Perry
Some clarification. I have existing C/C++ code that I am wrapping into
a Carbon plugin.
It is this code that carries static variables and uses FSpCreate.

Thomas, is there something simple you're doing in your framework to init
the
C++ environment that I can just add to my plugin?

_____________________________________________
From: Fred Ross-Perry
Sent: Friday, June 03, 2005 8:14 AM
To: '<email address removed>'
Subject: RE: FSpCreate crashes in a Carbon plugin

Never Mind. I was using a version of the Plugin SDK that was too old
for
RB 5.2.4. Switching to the latest SDK solved my problem. Thanks for
listening.

_____________________________________________
From: Fred Ross-Perry
Sent: Thursday, June 02, 2005 3:39 PM
To: '<email address removed>'
Subject: FSpCreate crashes in a Carbon plugin

Hi, 'm new to the list.

I inherited a RB application and a plugin, all working.

To the plugin I added a function, and a bunch of C++
classes to support it. Builds fine.

Inside one of those classes is a call to FSpCreate
that crashes the application. Although, the file
does get created.

When I build those same classes into a regular old
Carbon C++ application, it works fine.

Ideas?

RB 5.2.4, CW 8.3, OS X 10.3.9.

thanks,
fred ross-perry
san Rafael, ca

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

RE: FSpCreate crashes in a Carbon plugin
Date: 04.06.05 02:29 (Fri, 3 Jun 2005 18:29:49 -0700)
From: Thomas Tempelmann
Fred Ross-Perry wrote:

>Thomas, is there something simple you're doing in your framework to init
>the C++ environment that I can just add to my plugin?

You could make the two modifications to your plugin as I explain them in
my plugin starter somewhere. Basically, its these:

1. Remove a (wrong because incomplete) init call from the plugin main
entry.
2. Add a new call in the PEF linker "initialize" settings.

Thomas
_______________________________________________
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>