Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to set a Font Menu string in FxPlug #316

Closed
latenitefilms opened this issue Dec 30, 2023 · 1 comment
Closed

Crash when trying to set a Font Menu string in FxPlug #316

latenitefilms opened this issue Dec 30, 2023 · 1 comment

Comments

@latenitefilms
Copy link
Contributor

latenitefilms commented Dec 30, 2023

Apple Feedback Assistant ID: FB13502566

DESCRIBE THE BUG:
I have created a Font Menu using:

paramAPI.addFontMenu(
    withName: "Font",
    parameterID: globalParametersID_Font,
    fontName: defaultFont,
    parameterFlags: FxParameterFlags(kFxParameterFlag_DEFAULT)
)

I can read the parameter using:

if paramAPI.getStringParameterValue(&stringValue, fromParameter: globalParametersID_Font) {

This works well.

However, if I try and set the font string, it crashes Final Cut Pro:

if !(paramSetAPI?.setStringParameterValue(globalFont, toParameter: globalParametersID_Font))! {

Here's the crash log:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Final Cut Pro [65927]
Path:                  /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro
Identifier:            com.apple.FinalCut
Version:               10.7.1 (410082)
Build Info:            ProEditor-41000082016000000~12 (1D1004)
App Item ID:           424389933
App External ID:       861999800
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-12-30 17:15:10.6649 +1100
OS Version:            macOS 14.1.2 (23B92)
Report Version:        12
Anonymous UUID:        CF7BEE6E-B8B3-12C6-A359-37A97C616B4B

Sleep/Wake UUID:       BBF1728E-792C-4B7B-B799-EC7338D89781

Time Awake Since Boot: 300000 seconds
Time Since Wake:       1418 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0xfffffffffffffff0
Exception Codes:       0x0000000000000001, 0xfffffffffffffff0

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [65927]

VM Region Info: 0xfffffffffffffff0 is not in any region.  
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      UNUSED SPACE AT END

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   ???                           	0xfffffffffffffff0 ???
1   Ozone                         	       0x120eb16c8 -[OZFxPlugParameterHandler_v4 setStringParameterValue:toParm:] + 40
2   ProAppsFxSupport              	       0x10336f59c -[PAETileableXPCPlugIn setValueForTransaction:] + 32
3   ProAppsFxSupport              	       0x103304ef0 -[PAEFxTransactionProcessor processTransactionArray:] + 1184
4   Ozone                         	       0x120e16fe8 __90-[OZFxXPCAPIMediator hostSession:transactionID:parameterUpdates:endCustomParameterAction:]_block_invoke_2 + 36
5   Flexo                         	       0x109a13dd8 _FFPerformModelWriteUsingBlock + 104
6   Ozone                         	       0x120e16f78 __90-[OZFxXPCAPIMediator hostSession:transactionID:parameterUpdates:endCustomParameterAction:]_block_invoke + 88
7   ViewBridge                    	       0x197f0a364 __wrapBlockWithVoucher_block_invoke + 56
8   ViewBridge                    	       0x197fa9c00 deferredBlockOpportunity_block_invoke_2 + 360
9   CoreFoundation                	       0x18f905894 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
10  CoreFoundation                	       0x18f9057a8 __CFRunLoopDoBlocks + 356
11  CoreFoundation                	       0x18f9045e0 __CFRunLoopRun + 812
12  CoreFoundation                	       0x18f903c5c CFRunLoopRunSpecific + 608
13  HIToolbox                     	       0x199e80448 RunCurrentEventLoopInMode + 292
14  HIToolbox                     	       0x199e80284 ReceiveNextEventCommon + 648
15  HIToolbox                     	       0x199e7ffdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
16  AppKit                        	       0x1930dec54 _DPSNextEvent + 660
17  AppKit                        	       0x1938b4ebc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
18  AppKit                        	       0x1930d2100 -[NSApplication run] + 476
19  LunaKit                       	       0x102c7bcb0 LKApplicationMain + 204
20  dyld                          	       0x18f4ad0e0 start + 2360

You can find the full crash log here.


TO REPRODUCE:
Try set a Font Menu item programatically in FxPlug.


EXPECTED BEHAVIOUR:
You should be able to set the Font Menu using a string.


SCREENSHOTS:
NA


SPECS:

  • 2021 16-inch MacBook Pro (M1 Max, 64GB RAM, 8TB SSD)
  • macOS Sonoma 14.1.2
  • Final Cut Pro 10.7.1

ADDITIONAL COMMENTS:
The documentation also clearly has never been proof read:

image

Note, it says "Creates a help push button parameter".

@latenitefilms
Copy link
Contributor Author

Closing in favour of #320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant