Quantcast
Channel: bugs, errors - openFrameworks
Viewing all 636 articles
Browse latest View live

ofLoadURLAsync Memory Leak

$
0
0

@imanolgo wrote:

Hi,

I just realised that if there is no network connection connection, if you use ofLoadURLAsync(), the memory starts increasing and increasing until the computer runs out of it.

Any idea how to solve that?

Posts: 2

Participants: 2

Read full topic


Math.h not found, QtCreator crash and corrupted SSD

$
0
0

@hamoid wrote:

Hi! A hard to debug one:

Symptoms

Sometimes (not every day), while compiling from QtCreator, the whole OS becomes unresponsive. I see the available RAM go down to 0. If I notice this on time I can stop the compilation by pressing the red stop button in QtCreator. If I don't, then the computer may recover, or may become extremely slow taking it many seconds to switch to another window or open a terminal to try kill the clangbackend.

Current status

This kind of crash happened two days ago. When I rebooted the computer, I was instructed to repair the disk. Dozens of screens like this were shown:


Fortunately the system booted but I couldn't compile my project. I bought a new SSD and cloned the drive.

A source file in an OF addon was full of binary gibberish. Strangely, git did not notice that this file had changed when doing git status. I had to delete the file, then do git checkout file to get the file back.

I still can not compile the project. I now get this error:

In file included from /home/funpro/src/openFrameworks/examples/3d/3DPrimitivesExample/src/ofApp.cpp:1:
In file included from /home/funpro/src/openFrameworks/examples/3d/3DPrimitivesExample/src/ofApp.h:3:
In file included from /home/funpro/src/openFrameworks/libs/openFrameworks/ofMain.h:5:
In file included from /home/funpro/src/openFrameworks/libs/openFrameworks/utils/ofConstants.h:53:
/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/cmath:45:15: fatal error: 'math.h' file not found
#include_next <math.h>
              ^~~~~~~~
1 error generated.
Process failed with exit code 1.

But math.h seems to be there:

ls -la /bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/*math*
-rw-r--r-- 1 root root 48484 Nov 28 22:27 /bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/cmath
-rw-r--r-- 1 root root  1360 Nov 28 22:27 /bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/ctgmath
-rw-r--r-- 1 root root  4380 Nov 28 22:27 /bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/math.h
-rw-r--r-- 1 root root  1360 Nov 28 22:27 /bin/../lib64/gcc/x86_64-pc-linux-gnu/7.2.1/../../../../include/c++/7.2.1/tgmath.h

Questions

Does QtCreator become unresponsive like this to anyone with medium sized projects? This used to happen when I had only 8Gb on my system, so I upgraded to 16Gb. It happens less often now, but still happens.

Any ideas about fixing compilation and the missing math.h? I tried reinstalling a few packages like clang, qtcreator, but I guess I didn't find the right one.

Tips or suggestions?

Idea: scan all .c .cpp .h files looking if any of those contain binary content. This way maybe I can find corrupted ones.

Posts: 4

Participants: 2

Read full topic

Possible OpenGL bug /w ofSetLineWidth() and setStrokeWidth()

$
0
0

@heartsnatcher wrote:

So I'm working on this polygon API for my videoclips and somehow when I choose to use ofCreateWindow(ofGLFWWindowSettings) instead of the simpler ofSetupOpenGL() in main() to set op my OpenGL window al LineWidth calls don't work. It just doesn't get rendered. (I need the explicit GL settings for using shaders)

I've been testing this out for weeks now. Using ofPolyline in combination with ofSetLineWidth() and ofPath::setStrokeWidth().

I'm on 0.9.8 from the main oF site. Tested on MacOS and Debian Linux. Did I miss something or is this some bug somewhere?

Posts: 1

Participants: 1

Read full topic

ofVideoGrabber::initGrabber()'s arbitrary behaviour with multiple cameras

$
0
0

@hrodgair wrote:

Hi

I'm trying to setup a multi-cam app on a Mac. For now, I have two cameras: the built-in iSight; and a Logitech C525 USB cam. I've been struggling for both cameras to draw simultaneously. I just couldn't get both to draw at the same time. Until I realized that it depended on the parameters passed on to ofVideoGrabber's initGrabber(...).

I've tried different settings with these results:

cam->initGrabber(320, 240); // both cameras draw OK
cam->initGrabber(321, 241); // just one camera will draw
cam->initGrabber(319, 239); // both cameras draw OK
cam->initGrabber(320, 480); // both cameras draw [obviously] distorted
cam->initGrabber(640, 240); // both cameras draw [obviously] distorted
cam->initGrabber(640, 480); // just one camera will draw
cam->initGrabber(1024, 480); // just one camera will draw
cam->initGrabber(ofGetWidth(), ofGetHeight()); // just one camera will draw

Here's the [simplified] code.

ofApp.h

class ofApp : public ofBaseApp{
   // ...
    vector<shared_ptr<ofVideoGrabber> > cams;
}

ofApp.cpp

void ofApp::setup() {

    ofVideoGrabber vidGrabber;
    vector<ofVideoDevice> devices = vidGrabber.listDevices();

    for(int i = 0; i < devices.size(); i++) {
        shared_ptr<ofVideoGrabber> cam(new ofVideoGrabber());
        cam->setDeviceID(i);
        cam->initGrabber(ofGetWidth(), ofGetHeight()); // or whatever
        cams.push_back(cam);
    }
}

//--------------------------------------------------------------
void ofApp::update(){
    for (int i=0; i < cams.size(); i++) {
        cams[i]->update();
    }
}

//--------------------------------------------------------------
void ofApp::draw(){
    for (int i=0; i < cams.size(); i++) {
        cams[i]->draw(320*i, 0);
    }
}

Any ideas on what is going on? I don't like the idea of hard-coding camera sizes, and even if there wasn't any other solution, 320x240 is way too small for what I'm willing to accomplish.

Posts: 1

Participants: 1

Read full topic

'\t' has no effect on ofTrueTypeFont::drawString()

$
0
0

@cuinjune wrote:

Hi, I just found out I can't draw a tab character '\t' using ofTrueTypeFont::drawString().

The new line character '\n' works fine but '\t' doesn't work.

Here's my test code. I tried this with OF v0.9.8 on Mac OS X.

//--------------------------------------------------------------
void ofApp::setup(){

    font.load("font.ttf", 30);

    str = "Hello\tWorld"; //string to draw
    cout << str << endl;
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

    font.drawString(str, 100, 100);
}

And Here's a screenshot when you run the code.

As you can see, if you print the string to console, there's a tab space between "Hello" and "World" but you can't see the space in the text drawn on the OF window.

Is this a bug? If so, I would appreciate any suggestion on how to fix this.
Thank you in advance.

Posts: 1

Participants: 1

Read full topic

ofFbo.getTexture().bind()/unbind() doesn't work properly on iOS

$
0
0

@cuinjune wrote:

Hi, I figured out calling ofFbo.getTexture().bind()/unbind() methods doesn't bind the FBO's texture correctly on iOS.

Here's my simple test code.

in ofApp.h

ofFbo fbo;
ofMesh mesh;

in ofApp.cpp

//--------------------------------------------------------------
void ofApp::setup(){

    ofDisableArbTex();
    ofSetCircleResolution(50);

    int fboWidth = ofGetWidth()/4;
    int fboHeight = ofGetHeight()/4;

    fbo.allocate(fboWidth, fboHeight, GL_RGB);

    fbo.begin();
    ofClear(255, 0, 0, 255);
    ofSetColor(0, 255, 0);
    ofDrawEllipse(fboWidth/2, fboHeight/2, fboWidth, fboHeight);
    fbo.end();

    mesh = ofMesh::plane(fboWidth, fboHeight);
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

    fbo.draw(0, 0);

    ofTranslate(ofGetWidth()/2, ofGetHeight()/2);
    fbo.getTexture().bind();
    mesh.draw();
    fbo.getTexture().unbind();
}

If I run this code on MacOS, it draws correctly as the screenshot below.

But If I run the same code on iOS, the bound texture is not drawing correctly.

When I print the texCoords of the plane mesh, it is correctly set. so I don't think it is ofMesh's problem but I think it is ofFbo's texture's problem.

Could any one please give me an advice on fixing this issue?
Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Can't copy ofFbo to ofImage when allocate with GL_RGB on iOS

$
0
0

@cuinjune wrote:

If I allocate ofFbo with GL_RGBA, I can successfully copy the FBO to ofImage. But if I use GL_RGB instead, I could not properly copy FBO to ofImage.

Here's my simple test code.

in ofApp.h

ofFbo fbo;
ofImage img;

in ofApp.cpp

//--------------------------------------------------------------
void ofApp::setup(){

    ofSetBackgroundColor(0);

    //allocate an image space
    img.allocate(ofGetWidth(), ofGetHeight(), OF_IMAGE_COLOR);

    //allocate the fbo
    fbo.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA);

    //draw an ellipse to the fbo
    fbo.begin();
    ofClear(0,0,0,0);
    ofSetColor(255);
    ofDrawEllipse(ofGetWidth()/2, ofGetHeight()/2, ofGetWidth(), ofGetHeight());
    fbo.end();

    //copy pixels from fbo to image
    ofPixels pixels;
    fbo.readToPixels(pixels);
    img.setFromPixels(pixels);
}

//--------------------------------------------------------------
void ofApp::update(){

}

//--------------------------------------------------------------
void ofApp::draw(){

    //draw the image
    img.draw(0, 0, ofGetWidth(), ofGetHeight());
}

If I run the code, the white ellipse appears on the black background.

But if I change GL_RGBA to GL_RGB from the code and run it, I no longer see the white ellipse but only the black background.

Does any one know why it happens and how to fix this?
Thanks in advance!!

Posts: 1

Participants: 1

Read full topic

OpenGL static objects destruction crahes

$
0
0

@chuckleplant wrote:

I've had situations in which OpenGL obejcts get destroyed after main thread exits, in which case the destruction crashes. Specifically the static ofVboMesh gradientMesh in ofGraphics.cpp.

It's hard to reproduce this issue but shouldn't it be avoided to have static OpenGL objects? I wanted to consult here first before posting an issue on github.

Posts: 1

Participants: 1

Read full topic


Travis build of osx libopenFrameworksDebug.a is broken

$
0
0

@hrs wrote:

My Travis build of oF addon failed only on osx.
https://travis-ci.org/hiroMTB/ofxEquidistantProjection/builds
travis.yml is from ofxAddonTempalte

It looks like libopenFrameworksDebug.a is broken.

Here is Link Error on my Travis and OSX local machine with Terminal make Debug. (I switched .a file and build)

"ofBaseApp::keyPressed(ofKeyEventArgs&)", referenced from:
vtable for ofApp in ofApp.o
"ofBaseApp::mouseMoved(ofMouseEventArgs&)", referenced from:
vtable for ofApp in ofApp.o
...

Of course I'm sure I implemented all function which I declare on ofApp.h file.
All errors are related to ofBaseApp so I assume it is related to this commit few days ago.

Strange thing is, oF also build emptyExample on Travis and it doesn't have any problem.

Posts: 5

Participants: 2

Read full topic

Syphon output gliches

$
0
0

@times2 wrote:

Hi there

I'm trying to use ofxSyphon with openframeworks (latest git build) on OSX (10.12.6)

After some configuration teething troubles it is basically working, but I'm seeing output "popping" from it's correct scale to a bigger scale and back again erratically, making it unusable.

I'm using openGL 2.1.

Just wonder if anyone has seen this before I delve into whether syphon framework is up to date etc.

Tim

Posts: 1

Participants: 1

Read full topic

ofxFaceRecognizer example project compiling problem

$
0
0

@alana92 wrote:

I'm running the example project (from the ofxFaceRecognizer addon folder) in the of_v0.9.8_osx_release (downloaded from the of website) in xcode (v. 9.1) with opencv (v. 3.4.0 ) installed on macOS High Sierra and getting the following compiling errors:

Error:

/Applications/of_v0.9.8_osx_release/addons/ofxOpenCV2461/src/ofxCvImage.h:82:29: Virtual function 'getPixels' has a different return type ('unsigned char *') than the function it overrides (which has return type 'ofPixels_<unsigned char> &')

From code:

virtual unsigned char* getPixels();

Error:

/Applications/of_v0.9.8_osx_release/addons/ofxOpenCV2461/src/ofxCvContourFinder.h:58:29: Field type 'ofxCvGrayscaleImage' is an abstract class

From code:

 protected:

    int  _width;
    int  _height;
    ofxCvGrayscaleImage     inputCopy;
    CvMemStorage*           contour_storage;
    CvMemStorage*           storage;
    CvMoments*              myMoments;
    vector<CvSeq*>          cvSeqBlobs;  //these will become blobs

    ofPoint  anchor;
    bool  bAnchorIsPct;

    virtual void reset();

Error:

/Applications/of_v0.9.8_osx_release/addons/ofxOpenCV2461/src/ofxCvHaarFinder.h:51:22: Field type 'ofxCvGrayscaleImage' is an abstract class

From code:

protected:
	CvHaarClassifierCascade* cascade;
	string haarFile;
	ofxCvGrayscaleImage img;
	float scaleHaar;
	unsigned neighbors;

Issue also logged on the ofxopencv2461 github repository, see: https://github.com/pkmital/ofxOpenCV2461/issues/1

Issue also logged on the openframeworks github repository (closed), see: https://github.com/openframeworks/openFrameworks/issues/5850

Please advise

Posts: 1

Participants: 1

Read full topic

VS2015 v141 build tools problem with OF

$
0
0

@mrwappa wrote:

I have followed the instructions for installing OF on VS2015 step by step but I still get an error message when compiling that says this.Yes, I have tried retargeting solution. Some help on the matter would be appreciated.

Posts: 2

Participants: 2

Read full topic

ofTessellator Error

$
0
0

@schmidh wrote:

Dear OF community,

just trying to run example fontShapesExample from master branch of OF on GitHub. Unfortunately I get following error message:

[ error ] ofTessellator: performTessellation(): mesh polygon tessellation failed, winding mode 0

Could also be a consequential error from ofTrueTypeFont loading a font. Not sure. Has anybody else seen this error?

Kind regards!

Posts: 2

Participants: 1

Read full topic

ofURLFileLoader http post, and master openCV

$
0
0

@jedahan wrote:

So I am trying to interact with a non-form http api, where I post JSON directly into the body.

I tried ofxHTTPUtils, but that makes it a form post and mangles the stringified JSON.

I saw that the master branch has http post support that seems simple enough, and it was committed on December 2015 (ca62f5845c02ff677dd8ba81d35e6db55b0355a8).

But when I tried it on 0.9.8 release, it wasn't there. 0.9.8 got released in October 2016, about 10 months later.

So I decided to try building master openframeworks on macOS 10.13.2, but I am getting errors when trying to use ofxCv when linking:

Undefined symbols for architecture x86_64:
"__ittapi_version_ptr__3_0", referenced from:
cv::utils::trace::details::Region:....

So to take a step back, is there any commit that both has the HTTP POST code and working opencv in macOS 10.13.2?

Posts: 3

Participants: 2

Read full topic

Include ofPolyline.h without errors?

$
0
0

@justin_hidair wrote:

in another vs project I have I needed the ofPolyline functionnality so what I did was adding the folder of the module :
..\graphics\ to the additional include directories , intellisense catches it , but when compiling it gives me error : 'cannot open source file' these files happen to be headers included by ofPolyline.h ... but I still don't know how to fix it so what is the proper way to include ofPolyline.h on any project ?

Posts: 1

Participants: 1

Read full topic


fontShapesExample not Working

$
0
0

@schmidh wrote:

fontShapesExample is not working in latest Github version (maybe even for a long time). I found the critical area but I know too little of OF so maybe someone can help me out. Here is the ticket:

Thank you!

Posts: 2

Participants: 1

Read full topic

Project Generator support on rPi? Poco linker errors on nightly build

$
0
0

@ttyy wrote:

Pretty sure this is a known thing, but just want to check -

Compiling Project Generator on Raspberry Pi fails when linking Poco - with errors like:

main.cpp:(.text.startup+0xe64): undefined reference to `Poco::Path::current[abi:cxx11]()

whole output here

this is using the compilePG.sh script with:

  • rPi3, Raspbian Stretch
  • nightly build of_v20180210_linuxarmv61_release
  • mesa drivers using bakercp's method 2 (working nicely btw)

I'm guessing there are just parts of Poco that aren't supported on rPi?

ps -- also wondering if there's a best method right now for cross compiling ?

Posts: 3

Participants: 2

Read full topic

ofSetVerticalSync not working (ubuntu 16.04, 64bit, OF v0.9.8)

$
0
0

@nerrull wrote:

Hi all,
I'm working on a generative video project using the of_v0.9.8_linux64_release version of openframeworks.

Basically, my issue is that in my setup I run : ofSetVerticalSync(True), but this seems to have no effect on the framerate or the amount of screen tearing i'm seeing.

Is this a known issue with this version of OF or my operating system? Any help on the matter would be very much appreciated.
Thanks!

Posts: 4

Participants: 2

Read full topic

OF_FULLSCREEN and OF_GAME_MODE

$
0
0

@edapx wrote:

Hey, I'm trying to draw an FBO in fullscreen but it is not working as expecting. I'm on Linux(ubuntu) and I'm using the last OF master.

This is the code of the main.cpp file

#include "ofMain.h"
#include "ofApp.h"

//========================================================================
int main( ){
    ofGLFWWindowSettings settings;
    settings.setGLVersion(3, 2);
//  settings.setSize(1480, 920);
    settings.windowMode = OF_FULLSCREEN;
    ofCreateWindow(settings);
    ofRunApp(new ofApp());
}

And this is the ofApp.cpp

void ofApp::setup(){
    // finalFbo was declared in the header file as ofFbo
    ofSetVerticalSync(true);
    //FBO
    cout << "FULLSCREEN" << endl;
    cout << ofGetWidth() << endl; // this print 1024
    finalFbo.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA);
    finalFbo.begin();
    ofClear(0, 0, 0, 0);
    finalFbo.end();
}

void ofApp::draw(){
    // fullfill the FBO
    finalFbo.begin();
    ofClear(0, 0, 0, 255);
    myClass.draw();
    finalFbo.end();
    // draw the FBO
    ofSetColor(255);
    finalFbo.draw(0, 0);
}

The result is that the window goes fullscreen, but not the content.

While trying to fix this, I've substitute OF_FULLSCREEN with OF_GAME_MODE

settings.windowMode = OF_GAME_MODE;

When the setupt function is called, this line

 cout << ofGetWidth() << endl;

prints 1850

And the screen is still cutted

In both case, resolution looks good and the window appears without decorations.
Any idea? should I open an issue on github?

Posts: 3

Participants: 3

Read full topic

Erro when my application is launch : /compile.project.mk:171: run] Error 127

$
0
0

@baguette wrote:

Hello OpenFrameworks :slight_smile:

I have a problem when launching my application. I want to run example of the addons ofxMarchingCubes. It compiles correctly, but when I launch the application, I get this error :

make: *** [.../OpenFrameworks/of_v0.9.8_msys2_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:171: run] Error 127

It's not the first I have this error, it would be useful if I know why this happen :).

I use the makefile to compile the code, in Windows 10.

Thank you very much for your help !

Posts: 1

Participants: 1

Read full topic

Viewing all 636 articles
Browse latest View live