Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

REALGetProjectFolder crash (Real Studio Plugins Mailinglist archive)

Back to the thread list
Next thread: REALconstant problem


macosx and unix paths   -   GOLD
  REALGetProjectFolder crash   -   Alexander Cohen
   Re: REALGetProjectFolder crash   -   Alexander Cohen
   Re: REALGetProjectFolder crash   -   Chad J McQuinn

REALGetProjectFolder crash
Date: 30.06.04 17:51 (Wed, 30 Jun 2004 12:51:34 -0400)
From: Alexander Cohen
Im having a really weird crash with REALGetProjectFolder. Whenever i
call it, i get a crash log, but my app does not crash. Here's the crash
log, any ideas what might be going on here? Is there any other known
way to get the app's containing folder?

Thread 0 Crashed:
0 ATS 0x96bff388
AssureDBGenerationSynched + 0x34
1 ATS 0x96c15690 SyncQueryPortList + 0x20
2 ATS 0x96c18678
CallGetFontFamilyHook(unsigned char const*) + 0x2c
3 ATS 0x96c04144
_eFOGetFontFamilyFromName + 0x100
4 ATS 0x96c04020 FOGetFontFamilyFromName
+ 0x30
5 com.apple.QD 0x9157fcb0 GetFNum + 0x18
6 ...ple.CoreServices.CarbonCore 0x902b6f1c DoesFontnameMatchScript
+ 0x50
7 ...ple.CoreServices.CarbonCore 0x90296d2c
UpgradeScriptInfoToTextEncodingImplementation + 0x33c
8 RBFramework 0x005cdd4c 0x46cd40 + 0x16100c
9 RBFramework 0x005cdfec 0x46cd40 + 0x1612ac
10 RBFramework 0x00589de0 0x46cd40 + 0x11d0a0
11 RBFramework 0x0058ad1c 0x46cd40 + 0x11dfdc
12 RBFramework 0x0058fcdc 0x46cd40 + 0x122f9c
13 RBFramework 0x0058f5c8 0x46cd40 + 0x122888
14 RBFramework 0x004c9bfc 0x46cd40 + 0x5cebc
15 RBFramework 0x004c9f20 0x46cd40 + 0x5d1e0
16 RBFramework 0x004ca178 0x46cd40 + 0x5d438
17 RBFramework 0x0051ce38 0x46cd40 + 0xb00f8
18 Plugin 0x006b82d4 0x6b7000 + 0x12d4
19 Plugin 0x006b9c04 0x6b7000 + 0x2c04
20 Plugin 0x006b8dd4 0x6b7000 + 0x1dd4
21 main 0x00408bb0
WinMain.WinMain.PBCreate_Action%%o<WinMain> + 0x1dc
22 RBFramework 0x004e2e6c 0x46cd40 + 0x7612c
23 RBFramework 0x004968cc 0x46cd40 + 0x29b8c
24 RBFramework 0x0048b390 0x46cd40 + 0x1e650
25 RBFramework 0x00535994 0x46cd40 + 0xc8c54
26 com.apple.HIToolbox 0x927d2330 DispatchEventToHandlers
+ 0x150
27 com.apple.HIToolbox 0x927d25a4
SendEventToEventTargetInternal + 0x174
28 com.apple.HIToolbox 0x927e4a34 SendEventToEventTarget +
0x28
29 com.apple.HIToolbox 0x927f9b2c
SendHICommandEvent(unsigned long, HICommand const*, unsigned long,
unsigned long, unsigned char, OpaqueEventTargetRef*,
OpaqueEventTargetRef*, OpaqueEventRef**) + 0x170
30 com.apple.HIToolbox 0x9291134c
SendControlCommand(HIView*, unsigned long, unsigned long) + 0x44
31 com.apple.HIToolbox 0x928aa230
HIView::NotifyControlHit(short, unsigned long) + 0x70
32 com.apple.HIToolbox 0x9289583c
HIView::ClickInternal(CGPoint const&, unsigned long, void
(*)(OpaqueControlRef*, short), bool) + 0xa4
33 com.apple.HIToolbox 0x928d6a3c TrackControl + 0x50
34 RBFramework 0x0048bed4 0x46cd40 + 0x1f194
35 RBFramework 0x0048bd4c 0x46cd40 + 0x1f00c
36 RBFramework 0x0048bcdc 0x46cd40 + 0x1ef9c
37 RBFramework 0x005378fc 0x46cd40 + 0xcabbc
38 RBFramework 0x004a3ee8 0x46cd40 + 0x371a8
39 RBFramework 0x005775e8 0x46cd40 + 0x10a8a8
40 RBFramework 0x005063b4 0x46cd40 + 0x99674
41 RBFramework 0x00505cb8 0x46cd40 + 0x98f78
42 RBFramework 0x00504068 0x46cd40 + 0x97328
43 RBFramework 0x005042e4 0x46cd40 + 0x975a4
44 RBFramework 0x00500f80 0x46cd40 + 0x94240
45 main 0x0045f060 Main + 0x98
46 main 0x00405098 % main + 0x18
47 ...ple.CoreServices.CarbonCore 0x902d9d5c CCFM_LaunchApplication +
0x1e8

thanks!

Alex

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

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

Re: REALGetProjectFolder crash
Date: 30.06.04 18:01 (Wed, 30 Jun 2004 13:01:00 -0400)
From: Alexander Cohen
I found what the problem was here, but maybe someone can shed some
light on it for me.

The idea is to start up a new process then execv it to run a binary. So
i fork the new process, and in the new child process, i call
REALGetProjectFolder and that is where it crashes. If i just call
REALGetProjectFolder and store the results before i call fork, i get no
crash.

Alex

On Jun 30, 2004, at 12:51 PM, Alexander Cohen wrote:

> Im having a really weird crash with REALGetProjectFolder. Whenever i
> call it, i get a crash log, but my app does not crash. Here's the
> crash log, any ideas what might be going on here? Is there any other
> known way to get the app's containing folder?
>

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

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

Re: REALGetProjectFolder crash
Date: 30.06.04 18:37 (Wed, 30 Jun 2004 12:37:12 -0500)
From: Chad J McQuinn
On Jun 30, 2004, at 12:01 PM, Alexander Cohen wrote:

> I found what the problem was here, but maybe someone can shed some
> light on it for me.
>
> The idea is to start up a new process then execv it to run a binary.
> So i fork the new process, and in the new child process, i call
> REALGetProjectFolder and that is where it crashes. If i just call
> REALGetProjectFolder and store the results before i call fork, i get
> no crash.

In general you need to do as little as possible between fork and exec.
In this case, RB needs to make a system call to get that folderitem;
this invokes copy-on-write for any memory that is changed. That by
itself is wasteful, but in this case it is also dangerous because all
the mach ports used to communicate with the windowserver, etc. are
stale and copy-on-write doesn't fix that.

While it is sometimes necessary to make some calls between fork and
exec (setting up pipes, etc), you must never make carbon or cocoa calls
because of those mach ports that are no longer valid.

-Chad

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

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