Hi:
I did a upgrade on raspberry pi2, and now mi program crashed,
this app is a Image Slideshow, which use shaders for the transitions, so the app only pass to the shaders de progress uniform and the textures. This app works fine on raspberry pi B+, but in the new Raspberry pi 2, this compile but crash whe i run that. the openframeworks i used is the 0.8.4 for armv7. the examples run well (gles folder, running the customEGLWindowSettings and others).
this is the output
notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1920x1080
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set
[notice ] ofAppEGLWindow: createSurface(): current renderer type: ProgrammableGL
[notice ] ofAppEGLWindow: createSurface(): GLES2 renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION = OpenGL ES 2.0
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[ error ] ofShader: begin(): couldnāt begin, shader not loaded
[ error ] ofShader: begin(): couldnāt begin, shader not loaded
[ error ] ofShader: begin(): couldnāt begin, shader not loaded
[ error ] ofShader: begin(): couldnāt begin, shader not loaded
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): unabled to find mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[warning] ofAppEGLWindow: setupKeyboard(): unabled to find keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard, keyboard_fd < 0
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete
[warning] ofShader: GL_VERTEX_SHADER shader reports:
Compiled
[warning] ofShader: GL_FRAGMENT_SHADER shader reports:
Compiled
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop
terminate called after throwing an instance of āJ_MESSAGE_CODEā
[notice ] ofAppEGLWindow: destroyNativeKeyboard()
[notice ] ofAppEGLWindow: destroyNativeKeyboard(): unable to reset terminal
[notice ] ofAppEGLWindow: destroySurface(): destroying EGL surface
header:
Below the ofApp.cpp code:
#include "ofApp.h"
int x2;
//--------------------------------------------------------------
void ofApp::setup(){
ofSetFrameRate(25);
ofHideCursor();
x2 = 1;
ofEnableAlphaBlending();
n = dir.listDir("imgs");
seq.resize( n );
//im.loadImage("betho.jpg");
//4. Load images
for (int i=0; i<n; i++) {
//Getting i-th file name
string fileName = dir.getPath( i );
//Load i-th image
ofLoadImage( seq[i], fileName );
//seq[i].resize(1920,1080);
}
shader.load("shader.vert", "shader.frag", "");
fbo.allocate(ofGetWidth(), ofGetHeight());
//ofEnableAlphaBlending();
}
//--------------------------------------------------------------
void ofApp::update(){
n1 = dir.listDir("/home/pi/imgs");
if(!(n==n1)){
seq.resize( n1 );
for (int i=0; i<n1; i++) {
string fileName = dir.getPath( i );
ofLoadImage( seq[i], fileName );
//seq[i].resize(1920, 1080);
}
//cout<<"n=" << n <<endl;
//cout<<"n1=" << n1 <<endl;
n=n1;
}
y=ofGetFrameNum();
time1 = (y%201);
switch(time1)
{
case 0:
if(x2==n) {
x2=0;
x++;
}
else if(x2<n){
x2++;
x=x2-1;
}
break;
default:
break;
}
progress=ofMap(time1,0,25,0,1,true);
//seq[x];
//seq[x2];
fbo.begin();
ofBackground(0);
shader.begin();
shader.setUniform2f("resolution", ofGetWidth(), ofGetHeight());
//shader.setUniform1f("time", ofGetElapsedTimef());
shader.setUniform1f("progress", progress);
shader.setUniformTexture("from", seq[x],1);
shader.setUniformTexture("to", seq[x2],2);
//shader.setUniformTexture("luma", im,3);
//img.draw(0,0);
ofRect(0,0,1920,1080);
shader.end();
fbo.end();
//std::stringstream pro;
//pro <<ofToString(time1);
//ofSetWindowTitle(pro.str());
}
//--------------------------------------------------------------
void ofApp::draw(){
fbo.draw(0,0);
}
##############################################################################################
here the header
> #pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
ofDirectory dir;
int n;
int n1;
int x,y,time1;
float progress;
ofTexture img;
ofTexture img2;
ofShader shader;
ofFbo fbo;
vector<ofTexture> seq;
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
};
the main file:
#include "ofMain.h"
#include "ofApp.h"
#ifdef TARGET_OPENGLES
#include "ofGLProgrammableRenderer.h"
#endif
//========================================================================
int main( ){
#ifdef TARGET_OPENGLES
ofSetCurrentRenderer(ofPtr<ofBaseRenderer>(new ofGLProgrammableRenderer()));
#endif
ofSetupOpenGL(1920,1080, OF_WINDOW);
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp(new ofApp());
}
whats is the meaning of āterminate called after throwing an instance of āJ_MESSAGE_CODEāā ?/
with gdb (GNU debugger) I got the follow:
Program received signal SIGILL, Illegal instruction.
0x76d80608 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) bt
#0 0x76d80608 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
Cannot access memory at address 0x0
#1 0x76d7d004 in OPENSSL_cpuid_setup () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
#2 0x76fe8254 in ?? () from /lib/ld-linux-armhf.so.3
#3 0x7efff7f4 in ?? ()
Cannot access memory at address 0x0
#4 0x7efff7f4 in ?? ()
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
it is a bug???
What thing am I doing wrong??