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

Can't get the plugin load in Catalina #7

Closed
videolist opened this issue Oct 30, 2019 · 10 comments
Closed

Can't get the plugin load in Catalina #7

videolist opened this issue Oct 30, 2019 · 10 comments

Comments

@videolist
Copy link

Ws able to compile successfully but can't get any of the plugins (Sample or SampleVCam) to load. I am using your Cameo tool to browse the DALs (super nice tool, love those Swift wrappers). But I don't see them there. I wonder if it's a signing issue or I am missing some important steps in how to register them with the system. Any pointers?

@videolist
Copy link
Author

Actually I got to the point where Cameo as well as system_profiler SPCameraDataType hangs as soon as I put SampleVCam.plugin into CoreMediaIO/Plig-ins/DAL

@videolist
Copy link
Author

Narrowed it down to
err = CMIODPASampleConnect(assistantServicePort, CAProcess::GetPID(), &port);
hanging in CMIO_DPA_Sample_ClientExtras.cpp

@videolist
Copy link
Author

videolist commented Oct 30, 2019

I figured it out. It was crashing in the assistant server and therefore the plugin couldn't communicate with it via mach_msg.
Line 34, CMIO_DPA_Sample_Server_VCamDevice.cpp, change:

mFrameCount = ftell(mSequenceFile) / mFrameSize;

to:

mFrameCount = MAX(1, ftell(mSequenceFile) / mFrameSize);

@acrosson
Copy link

@videolist were you able to get this working then? How were you able to debug it?

My assistant is crashing as well. It looks like it's when EmitFrame is called.

Time Awake Since Boot: 66 seconds

System Integrity Protection: disabled

Crashed Thread:        2

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Floating point exception: 8
Termination Reason:    Namespace SIGNAL, Code 0x8
Terminating Process:   exc handler [646]

Application Specific Information:
dyld2 mode

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff78fff21a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff78fff768 mach_msg + 60
2   libsystem_kernel.dylib        	0x00007fff7901674a mach_msg_server + 378
3   SampleVCamAssistant           	0x0000000104d32056 main + 646 (CMIO_DPA_Sample_VCamServer.cpp:89)
4   libdyld.dylib                 	0x00007fff78eca3d5 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff79002866 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff790c156e _pthread_cond_wait + 722
2   SampleVCamAssistant           	0x0000000104cf26bf CAGuard::Wait() + 191 (CAGuard.cpp:120)
3   SampleVCamAssistant           	0x0000000104d21b09 CAGuard::Locker::Wait() + 25 (CAGuard.h:118)
4   SampleVCamAssistant           	0x0000000104d27e40 CMIO::DPA::Sample::Server::Deck::SimulationEntry(CMIO::DPA::Sample::Server::Deck&) + 384 (CMIO_DPA_Sample_Server_Deck.cpp:518)
5   SampleVCamAssistant           	0x0000000104cf3798 CAPThread::Entry(CAPThread*) + 280 (CAPThread.cpp:315)
6   libsystem_pthread.dylib       	0x00007fff790be2eb _pthread_body + 126
7   libsystem_pthread.dylib       	0x00007fff790c1249 _pthread_start + 66
8   libsystem_pthread.dylib       	0x00007fff790bd40d thread_start + 13

Thread 2 Crashed:
0   SampleVCamAssistant           	0x0000000104d3250a CMIO::DPA::Sample::Server::VCamDevice::EmitFrame(void*) + 90
1   libsystem_pthread.dylib       	0x00007fff790be2eb _pthread_body + 126
2   libsystem_pthread.dylib       	0x00007fff790c1249 _pthread_start + 66
3   libsystem_pthread.dylib       	0x00007fff790bd40d thread_start + 13

Thread 3:
0   libsystem_pthread.dylib       	0x00007fff790bd3f0 start_wqthread + 0

Thread 2 crashed with X86 Thread State (64-bit):
  rax: 0x6674616c50540010  rbx: 0x000070000864e000  rcx: 0x00007fa3e550d9f0  rdx: 0x0000000000000000
  rdi: 0x00007fffaf647030  rsi: 0x0000000000000000  rbp: 0x000070000864df10  rsp: 0x000070000864dec0
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000001  r11: 0x0000000000000247
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x0000000104d3250a  rfl: 0x0000000000010246  cr2: 0x00007fffecf7d002

@johnboiles
Copy link
Contributor

@videolist I had the same problem -- it's because the .yuv video files are in git-lfs. Normally you'd do a git-lfs pull to download them but it looks like this repository is over its Git LFS quota for GitHub.

Instead, what you can do is download the videos from the original Apple sample page and overwrite the git-lfs stubs (Sources/Extras/CoreMediaIO/DeviceAbstractionLayer/Devices/Sample/KernelExtension/*.yuv)

@lvsti
Copy link
Owner

lvsti commented Mar 27, 2020

@johnboiles thanks for linking the alternate download location, indeed LFS has been suspended for my account because a surge of downloads consumed my quota. 🤷‍♂

@videolist
Copy link
Author

videolist commented Mar 27, 2020 via email

@bensyverson
Copy link

@videolist Do you know if I need to install the kext as well? I'm building on Catalina without errors, but after adding SampleVCam.plugin, I don't see anything in Cameo.

@videolist
Copy link
Author

videolist commented Apr 1, 2020 via email

@bensyverson
Copy link

@videolist Gotcha, that worked, thanks! Just FYI if you committed that change, it didn't get pushed to this repo.

@lvsti lvsti closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants