【HELP】About gray scale video not showing on Videgrabber

I am a beginner and I am not good at English.
I am sorry if I find it difficult to understand.
In OpenCv 's Videgrabber, gray scale video is not displayed, it is troubled.
The program is below.

#pragma once
#include “ofMain.h”
#include “ofxOpenCv.h”
class ofApp : public ofBaseApp{
public :
void setup();
void update();
void draw();

ofVideoGrabber cam;
ofxCvColorImage colorImg;
ofxCvGrayscaleImage grayImg;


#include “ofApp.h”

void ofApp::setup(){
cam.initGrabber(320, 240);
colorImg.allocate(320, 240);
grayImg.allocate(320, 240);


void ofApp::update(){

bool bNewFrame=false;



void ofApp::draw(){

colorImg.draw(0, 0,320,240);
grayImg.draw(330, 0,320,240);


If you try running the OF videoGrabberExample code, the following error will be displayed.
→Thread 1: EXC_BAD_ACCESS (code=2, address=0x1047ff000)

I do not know why this is a problem of my computer setting or program problem.
The development environment is as follows.
Xcode:Version 10.1 (10B61)

I’m sorry for the rudimentary problem.
Thank you for your consideration.