TooTallNate / NodObjC

The Node.js ⇆ Objective-C bridge

Home Page:http://tootallnate.github.io/NodObjC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ffi_prep_cif() returned an FFI_BAD_TYPEDEF

matheuss opened this issue · comments

I have the following in Objective-C:

// ...
[[self.output connectionWithMediaType:AVMediaTypeVideo] setVideoMinFrameDuration: CMTimeMake(1, 30)];
// ...

and the following in Node:

// ...
$.framework('Foundation');
$.framework('AVFoundation');
$.framework('CoreMedia');
// ...
this.output('connectionWithMediaType', $.AVMediaTypeVideo)('setVideoMinFrameDuration', $.CMTimeMake(1, 30));
// ...

When I run the app (It's an Electron app), I get the following error:

App threw an error during load
Error: ffi_prep_cif() returned an FFI_BAD_TYPEDEF error
    at CIF (/Users/matheus/dev/node/***/node_modules/ffi/lib/cif.js:60:19)
    at Object.ForeignFunction (/Users/matheus/dev/node/***/node_modules/ffi/lib/foreign_function.js:33:13)
    at Object.createUnwrapperFunction (/Users/matheus/dev/node/***/node_modules/nodobjc/lib/core.js:299:22)
    at ID.module.exports.Class.msgSend (/Users/matheus/dev/node/***/node_modules/nodobjc/lib/class.js:186:53)
    at rtn (/Users/matheus/dev/node/***/node_modules/nodobjc/lib/core.js:375:47)
    at new *** (/Users/matheus/dev/node/***/lib/main.js:36:65)
    at Object.module.exports [as main] (/Users/matheus/dev/node/***/lib/main.js:91:9)
    at Object.<anonymous> (/Users/matheus/dev/node/***/index.js:2:41)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)

Any ideas? 😕