arturoc / FaceSubstitution

Face substitution experiments using ofxFacetracker
Other
436 stars 120 forks source link

assertion failed (s.is_open()) #6

Closed heaversm closed 12 years ago

heaversm commented 12 years ago

Hi - I got the assertion error that Kyle mentioned in the readme for facetracker. I'm assuming this has something to do with putting the model files in the proper place, but I can't seem to find where that place is. I have the standard face tracker examples working fine. I created a bin/data/model folder in the FaceSubstitution example, but that didn't seem to solve the issue.

kylemcdonald commented 12 years ago

if you're running the FaceSubstitution app, the files should be in FaceSubstitution/bin/data/model

for example, FaceSubstitution/bin/data/model/face.con etc.

heaversm commented 12 years ago

Hmmm, that's where it's at. Something else must be wrong. I've successfully built ofxCV and ofxFaceTracker projects, but I wasn't sure what you meant: "finally switch out the source for the example you're interested in"

My overall structure is:

openFrameworks > addons > ofxFaceTracker > libs > Tracker > Tracker.h (etc, for the face tracker source) openFrameworks > apps > FaceSubstitution > Face Substitution (and Scramble Suit) > bin > data > model > face.con (etc, for the model files). This seems consistent with the XCode Project Config files.

On Mon, Jul 9, 2012 at 7:15 PM, Kyle McDonald < reply@reply.github.com

wrote:

if you're running the FaceSubstitution app, the files should be in FaceSubstitution/bin/data/model

for example, FaceSubstitution/bin/data/model/face.con etc.


Reply to this email directly or view it on GitHub: https://github.com/arturoc/FaceSubstitution/issues/6#issuecomment-6862700

Mike Heavers 917-345-6634

kylemcdonald commented 12 years ago

that looks identical to my setup, so i'm not sure what the problem is. i recommend adding an ofDirectory and doing some kind of directory listing of the model/ folder to see if it has what you expect it to have.

heaversm commented 12 years ago

Ok, I'll work on it. Thanks for the quick response!

On Tue, Jul 10, 2012 at 10:44 AM, Kyle McDonald < reply@reply.github.com

wrote:

that looks identical to my setup, so i'm not sure what the problem is. i recommend adding an ofDirectory and doing some kind of directory listing of the model/ folder to see if it has what you expect it to have.


Reply to this email directly or view it on GitHub: https://github.com/arturoc/FaceSubstitution/issues/6#issuecomment-6877587

Mike Heavers 917-345-6634

kylemcdonald commented 12 years ago

no worries -- also, i just remembered, there have been some seriously weird issues in the past with ofToDataPath() on different systems, different IDEs, etc. so if ofDirectory tells you that the folder doesn't exist, don't get too surprised -- just start trying to figure out where exactly OF thinks you are by listing "." first and working from there. and if you that it's giving you the wrong directory, definitely add a bug report to the OF issue tracker.

heaversm commented 12 years ago

Hey Kyle - so I did a diretory listing from testApp.cpp. Here is the code:

string path = "model/";

ofDirectory dir(path);

dir.listDir();

for (int i = 0; i < dir.numFiles(); i++){

    ofLogNotice(dir.getPath(i));

}

and the results seemed correct:

_OF: OF_LOGNOTICE: model/face.con

_OF: OF_LOGNOTICE: model/face.tracker

_OF: OF_LOGNOTICE: model/face.tri

_OF: OF_LOGNOTICE: model/face2.tracker

I did notice some very strange things happening in the assertion_failed error output though. It was sort of making up its own path names, or degrading names, or something. Here's the full error:

_Assertion failed: (s.is_open()),Assertion failed: (s.isopen()), function Load, file /Users/heav function Load, file /Users/heavers/Websource/openFrameworks/appers/Websource/openFrameworks/apps/FaceSubstitution/FaceSubstituts/FaceSubstitution/FaceSubstitution/../../../addons/ofxFaceTrackion/../../../addons/ofxFaceTracker/libs/Tracker/Tracker.cc, lineer/libs/Tracker/Tracker.cc, line 60.

Here's how I assume it should read though:

/Users/heavers/Websource/openFrameworks/appers/Websource/openFrameworks/ apps/FaceSubstitution/FaceSubstituts/FaceSubstitution/FaceSubstitution/../../../addons/ofxFaceTrackion/../../../addons/ofxFaceTracker/libs/Tracker/Tracker.cc, lineer/libs/Tracker/Tracker.cc* ???*

Crazy - misspellings and added path segments and stuff. If you have any idea why this is happening, I'd love to get to the bottom of it. Thanks again for your help.

On Tue, Jul 10, 2012 at 11:15 AM, Kyle McDonald < reply@reply.github.com

wrote:

no worries -- also, i just remembered, there have been some seriously weird issues in the past with ofToDataPath() on different systems, different IDEs, etc. so if ofDirectory tells you that the folder doesn't exist, don't get too surprised -- just start trying to figure out where exactly OF thinks you are by listing "." first and working from there. and if you that it's giving you the wrong directory, definitely add a bug report to the OF issue tracker.


Reply to this email directly or view it on GitHub: https://github.com/arturoc/FaceSubstitution/issues/6#issuecomment-6878485

Mike Heavers 917-345-6634

kylemcdonald commented 12 years ago

this is really, really weird. i've really never seen anything like this before (path names getting glitched out) and i can only imagine that it has to do with some deeper error on your specific machine. if ofDirectory is listing the right files, but ofxFaceTracker can't load them, it makes me think there is some problem reading from disk.

heaversm commented 12 years ago

Yikes, well, I switched to a different computer and the good news is that I don't get weird path issues anymore, but the bad is that the error is still occurring. Are there any other files that might be missing that would trigger this error? What about the face images that are supposed to be substituted on to the face? I noticed that there was nothing within these two projects that looked like a jpg or anything. If you have any other ideas, let me know.

Hopefully this won't complicate anything (I'm really just trying to get face substitution working) but I ran a couple of the other examples in there, they threw errors in looking for a folder in ofxOpencv/libs/opencv/ called vs2010 (ex: vlibd.lib). I checked through the older versions of oF and couldn't find that folder. Seems like a reference to visual studio? Maybe that will give a clue to something that's missing in faceTracker as well.

Thanks again for your time and feedback.

On Fri, Jul 13, 2012 at 4:09 AM, Kyle McDonald < reply@reply.github.com

wrote:

this is really, really weird. i've really never seen anything like this before (path names getting glitched out) and i can only imagine that it has to do with some deeper error on your specific machine. if ofDirectory is listing the right files, but ofxFaceTracker can't load them, it makes me think there is some problem reading from disk.


Reply to this email directly or view it on GitHub: https://github.com/arturoc/FaceSubstitution/issues/6#issuecomment-6956920

Mike Heavers 917-345-6634

heaversm commented 12 years ago

Hi Kyle,

A couple other things - I updated the project settings (see screenshot) in xcode for face tracker and it now compiles, outputs (lldb) - and the app icon just bounces in my dock forever without actually running the program. I also tried to run scramble suit and got a number of errors - I wasn't quite sure where to change these settings, but they seem to be referencing something on your computer.

On Fri, Jul 13, 2012 at 6:38 AM, Mike Heavers mheavers@gmail.com wrote:

Yikes, well, I switched to a different computer and the good news is that I don't get weird path issues anymore, but the bad is that the error is still occurring. Are there any other files that might be missing that would trigger this error? What about the face images that are supposed to be substituted on to the face? I noticed that there was nothing within these two projects that looked like a jpg or anything. If you have any other ideas, let me know.

Hopefully this won't complicate anything (I'm really just trying to get face substitution working) but I ran a couple of the other examples in there, they threw errors in looking for a folder in ofxOpencv/libs/opencv/ called vs2010 (ex: vlibd.lib). I checked through the older versions of oF and couldn't find that folder. Seems like a reference to visual studio? Maybe that will give a clue to something that's missing in faceTracker as well.

Thanks again for your time and feedback.

On Fri, Jul 13, 2012 at 4:09 AM, Kyle McDonald < reply@reply.github.com

wrote:

this is really, really weird. i've really never seen anything like this before (path names getting glitched out) and i can only imagine that it has to do with some deeper error on your specific machine. if ofDirectory is listing the right files, but ofxFaceTracker can't load them, it makes me think there is some problem reading from disk.


Reply to this email directly or view it on GitHub: https://github.com/arturoc/FaceSubstitution/issues/6#issuecomment-6956920

Mike Heavers 917-345-6634

Mike Heavers 917-345-6634

theholons commented 12 years ago

Hi Heaversm, I get the same issue in mac osx, but after I commented ofSetDataPathRoot("../data/"); in testApp.cpp I get it work. Thanks so much

heaversm commented 12 years ago

Removing the data path worked! Thanks.

kylemcdonald commented 12 years ago

ah wow, i never put these things together. sorry about this. the reason for the data path setting was so that you can "hide" the data inside the .app bundle. if you open up the downloaded (compiled) .app from the downloads section, you can see where i dropped the files inside the bundle. unfortunately this means it has a different file organization than the other examples, so it's a little surprising...