I'm trying to create an AdGroupAd using an existing groupAd, and i'm getting a "segmentation fault" error message
I've been at this for more than a day now, but the lack of details on the error just makes this insane to understand whats wrong
my code. Assume createAdGroupAd() is called with a valid resource name for an adGroup in the $adGroup parameter
and the type is CreativeType_Asset::TYPE_YOUTUBE in this case (although i tried with both types and both give out the error)
public function createAdGroupAd($adGroup, $data) {
        $service = $this->client->getAdGroupAdServiceClient();
        $ad = $this->createAd($data, $data['asset']->type);
        $adGroupAd = new AdGroupAd([
            'ad' => $ad,
            'status' => AdGroupAdStatus::PAUSED,
            'ad_group' =>Â
$adGroup
        ]);
        $adGroupAdOperation = new AdGroupAdOperation();
        $adGroupAdOperation->setCreate($adGroupAd);
       //this is the call causing the error
        $response = $service->mutateAdGroupAds(
            $this->customerId,
            [$adGroupAdOperation]
        );
        return $response->getResults()->count() > 0 ? $response->getResults()[0]->getResourceName() : null;
    }
    public function createAd($data, $adType = null) {
        $service = $this->client->getAdServiceClient();
        $appAdInfo = new AppAdInfo([
            'headlines' => array_map(function ($headline) {
                new AdTextAsset(['text' => $headline]);
            }, [$data['creative']->title1, $data['creative']->title2]),
            'descriptions' => array_map(function ($description) {
                new AdTextAsset(['text' => $description]);
            }, [$data['creative']->description1, $data['creative']->description2])
        ]);
        switch ($adType) {
            case CreativeType_Asset::TYPE_IMAGE:
                $appAdInfo->setImages([new AdImageAsset(['asset' => $data['assetResourceName']])]);
                break;
            case CreativeType_Asset::TYPE_YOUTUBE:
                $appAdInfo->setYoutubeVideos([new AdVideoAsset(['asset' => $data['assetResourceName']])]);
                break;
            default:
                break;
        }
        return new Ad([
            'app_ad' => $appAdInfo,
            'type' => AdType::APP_AD]);
    }