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"

Instantiating 3rd Party abstract class

Trying to write code for opencv that I've implemented into UE. I get this error when i run:

Unhandled exception at 0x000007FED136617B (UE4Editor-VRProject-Win64-DebugGame.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

I'm not sure if the garbage collector has said goodbye to my object or not. Here is the relevant code:

header:

public: cv::StereoBM* SBM;

cpp:

void ACameraDepthReader::DisparityMap()

{

 NumDisparities = 100;
 BlockSize = 21;
 SBM = cv::StereoBM::create(NumDisparities, BlockSize);
 SBM->compute(*Left, *Right, *OD);


}

It fails on compute. Pointers matrixes left,right and od seem to be fine as left and right carry my video signals and work when accessed directly. From what i've read the instantiating/garbage collector has not been handled correctly but the only thing ive found is:

  void AddReferencedObjects(FReferenceCollector& Collector) override
  {
      Collector.AddReferencedObject(SBM);
  }

but this just gave me an error. Any help would be appreciated.

Product Version: UE 4.9
Tags:
more ▼

asked Apr 14 '16 at 03:06 AM in C++ Programming

avatar image

CosmicDreamStudios
60 5 7 11

avatar image CosmicDreamStudios Apr 15 '16 at 02:40 AM

After more research I might be having a similar issue as in this thread:

https://answers.unrealengine.com/questions/36777/crash-with-opencvfindcontour.html

is there no way to protect something like this from the GC?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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