OF_WARNING: texture not bound for character – line 660 in /Users/rangel/Documents/OF_v0.06/apps/Rangel/QuaseCinema/…/…/…/libs/openFrameworks/graphics/ofTrueTypeFont.cpp
thank you! That seems to be it. I has actually setting the text variable to be full of blank spaces. And there was the error, flooding the console.
Now I changed it, until we find a better solution, to dots (’.’) , and the error is gone.
on testApp.h:
char textInput[20];
on testApp.cppp:
textInput[0] = ‘!’;
for (int x = 1; x <22; x++) {
textInput[x] = ‘.’;
}
Some other weird behaviour above (probably because of my C newbie ways…). The variable is set to have 20 chars in the array, but I have to make the for up to 21 to fully fill it with the dots, otherwise, weird characters show up on the end.
hm, not sure - i think its more general, in your case it might work as a workaround to replace with “.” i run into the same problem, but didnt really resolve it yet - just commented out line 660 in ofTrueTypeFont.cpp to stop slowing down the app - and continued till now. the issue with that is ‘just ignoring them’ destroys the text-align which results in http://bit.ly/oWfUX
…looking at ofTrueTypeFont.cpp just now and came up with a different patch: http://pastie.org/496710
I applied the pastie patch and I get rid of the warning but I still dont get why the problem occurs in the first place. What about ur cases? I dont have any probs if I load the font in the beginning of the programm execution but than always if I try to
load it on the fly. Any idea?
I’m not by any means in the know about how C++ memory works, but I think it’s somewhere along those lines. I had the same problem (except no characters were printing as well as the error). I fixed it by changing from using reference to a font:
[tt]ofTrueTypeFont font; // in the header
[/tt]
with the corresponding usage:
[tt]font.loadfont(“arial.ttf”, 15);
font.drawString(… etc.)
[/tt]
to using a pointer:
[tt]ofTrueTypeFont* font; // in the header
[/tt]
with usage:
[tt]font = new ofTrueTypeFont();
font->loadfont(“arial.ttf”, 15);
font->drawString(… etc.)
[/tt]
I had changed sth in a file so that the message no longer gets displayed
I had some BAD_ACCESS errors and crashes in my program when I was moving text around on mouse drag - I used what you suggested and I seem to no longer get these crashes,
So I think it has made my program more efficient although I cannot be sure at the moment if the problem is indeed solved as I can no longer see the error message regardless…