x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

USoundCue::RecursiveFindNode gives linker error on OSX

I'm currently building my project on OSX. Everything builds fine except for one line, which calls USoundCue::RecursiveFindNode(). The project builds fine in VS.

Relevant lines in my code:

 TArray<USoundNodeWavePlayer*> wavePlayers;
 cue->RecursiveFindNode<USoundNodeWavePlayer>(cue->FirstNode, wavePlayers);

Linker error raised:

 Undefined symbols for architecture x86_64:
   "void USoundCue::RecursiveFindNode<USoundNodeWavePlayer>(USoundNode*, TArray<USoundNodeWavePlayer*, FDefaultAllocator>&)"

If I comment out this line, or replace this call with a call to USoundCue::RecursiveFindAllNodes() and use casting in my subsequent loop to identify the correct type, the code builds fine.

Platform: OSX 10.9.5 (Mavericks) Engine version: 4.9.0 binary release

Product Version: UE 4.9
Tags:
more ▼

asked Sep 11 '15 at 02:25 AM in Bug Reports

avatar image

rohoon
142 16 19 33

avatar image Doug E ♦♦ STAFF Sep 11 '15 at 02:03 PM

Hey rohoon-

Were these the only lines shown when the compile failed? If you can reproduce the issue, can you post steps for me to test on my end?

Cheers

Doug Wilson

avatar image Doug E ♦♦ STAFF Sep 15 '15 at 02:38 PM

Hi rohoon,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

avatar image rohoon Oct 14 '15 at 12:55 AM

Hi Doug,

Please see my comment above.

avatar image rohoon Oct 14 '15 at 12:55 AM

Hi Doug,

Sorry for dropping off the radar. Yes, the only line shown in the error is the one that uses RecursiveFindNode.

In terms of repro steps, it should be enough to simply get a valid reference to a SoundCue and call RecursiveFindNode() on it.

This snippet contains all I'm trying to do:

 // Get sound from audio component
 USoundCue* cue = Cast<USoundCue>(MyAudioComponent->Sound);
 if(cue)
 {
     // Get all SoundNodeWavePlayers in the SoundCue.
     TArray<USoundNodeWavePlayer*> wavePlayers;
     cue->RecursiveFindNode<USoundNodeWavePlayer>(cue->FirstNode, wavePlayers);
 
     for(int32 i = 0; i < wavePlayers.Num(); ++i)
     {
         // Do stuff with wave player
     }
 }
avatar image Doug E ♦♦ STAFF Oct 14 '15 at 01:45 PM

Hey rohoon-

I'm getting a compile error related to "MyAudioComponent" when I try to copy the code you're using. What is the data type for this variable? Also, what type of class is this code being added to? If possible could you post the full class where this code is being used so that I can try to setup a reproduction case on my end?

avatar image rohoon Oct 22 '15 at 01:58 AM

Hi Doug,

MyAudioComponent is of type UAudioComponent*. What is the compile error you are getting? I'll try and create a simple class that demonstrates the error.

avatar image Doug E ♦♦ STAFF Oct 22 '15 at 04:59 PM

Since I didn't know what type MyAudioComponent was the compiler wasn't sure what to do with it. Now that I can define it properly I will try adding the code you posted to a class. If adding the code alone doesn't reproduce the issue then a sample class/project that does demonstrate the issue would be helpful.

avatar image Doug E ♦♦ STAFF Oct 22 '15 at 05:39 PM

Hey rohoon-

I added the following code to an actor based class and compiled successfully in XCode:

.h

 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
 UAudioComponent* MyAudioComponent;

.cpp

 #include "Runtime/Engine/Classes/Sound/SoundNodeWavePlayer.h"

 //added to class Tick() function
 USoundCue* cue = Cast<USoundCue>(MyAudioComponent->Sound);
  if(cue)
  {
      // Get all SoundNodeWavePlayers in the SoundCue.
      TArray<USoundNodeWavePlayer*> wavePlayers;
      cue->RecursiveFindNode<USoundNodeWavePlayer>(cue->FirstNode, wavePlayers);
  
      for(int32 i = 0; i < wavePlayers.Num(); ++i)
      {
          // Do stuff with wave player
      }
  }
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey rohoon-

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

more ▼

answered Oct 19 '15 at 05:30 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question