ofSystemLoadDialog and ofSystemSaveDialog error ?
The error i guess is that draw is not drawing anymore on screen ... so maybe GLcontext is lost ?
If i use OF 0.84 i got errors on both, load and save. If i get the ofSystemUtils.cpp from Github and put it on the OF 0.84 the load dialog problem is solved, but not the load dialog problem ...
I experienced this with XCode 5 and OSX 10.9.1 if that helps ...¿?
This is what i see if i resize the window when draw is not working ... nice GL glitch ;)

i think i solve it ... http://forum.openframeworks.cc/t/ofsystemloaddialog-and-ofsystemsavedialog-hangs-draw-solved/15024/5
The only change i made to make it working was in
oFileDialogResult ofSystemSaveDialog(string defaultName, string messageName){ #ifdef TARGET_OSX
and just put the GLcontext operation at the beginning ... so changing from :
NSSavePanel * saveDialog = [NSSavePanel savePanel];
NSOpenGLContext *context = [NSOpenGLContext currentContext];
to
NSOpenGLContext *context = [NSOpenGLContext currentContext];
NSSavePanel * saveDialog = [NSSavePanel savePanel];
and now it works wink
does this also occur on the current master branch?
I can't reproduce the error in master nor in 8.4 release. strange... OSX 10.9.5 Xcode Version 6.0.1
I double-checked ... and it's weird ... we where talking with @wasawi and we got different results with same example ...
Summary : I've XCode 5.02 in OSX 10.9.1 ...
- using OF_084 ...
... downloaded OF0.84 from website.
Compiling the "fileOpenSaveDialogExample" and running release app ...
Press
If i do the suggested changes of @ofTheo in the forum : http://forum.openframeworks.cc/t/ofsystemloaddialog-and-ofsystemsavedialog-hangs-draw-solved/15024/3 ..... then Load is corrected ... and to correct the Save i've to do the change I posted here ...
- using GitHub Master branch ...
Again ... error on SaveDialog ... LoadDialog works ok ... but Save doesn't ! GL glitch comes again ... ?¿
If i make the suggested change in oSystemSaveDialog:
from
NSSavePanel * saveDialog = [NSSavePanel savePanel]; NSOpenGLContext *context = [NSOpenGLContext currentContext];
to
NSOpenGLContext *context = [NSOpenGLContext currentContext]; NSSavePanel * saveDialog = [NSSavePanel savePanel];
it works well ...
??¿¿ totally confused why other people doesn't see this issue ... ?¿ is an XCode 5.01 issue ? or OSx 10.9.1 ?¿
hm, could some @openframeworks/macos devs take a look at this?
I can't seem to reproduce this though I'm not 100% certain what to look for - @eloimaduell could you provide a bit more info:
- Steps to Reproduce
- Expected Behavior
- Actual Behavior
I have the same issue with XCode6.3.2 OF 0.8.4 on OSX 10.10.3 The strange thing is that it only started happening after running the same app a few times! So the first few times I compiled and ran the app it worked fine, then all of a sudden it stopped working. I did see some weird shareKit errors popping up:
NSSoftLinking - The ShareKit framework's library couldn't be loaded from /System/Library/PrivateFrameworks/ShareKit.framework/Versions/A/ShareKit.
I'll try to investigate further.
@timknapen if you have a spare moment and can get a solid repro case down, could you please try to reproduce on the master branch as quite a lot has changed since the 0.8.4.
@pizthewiz yes, i'll try it as soon as possible
@pizthewiz I dowloaded the 0.9.0 master branch as a zip, but it doesnt include an emptyExample for Xcode. Any idea if there's an example project I can start from to test this?
it's easier to use the nightly builds, you can find them in http://openframeworks.cc/downloads
thanks @arturoc I'll try that
@arturoc is there no nightly build for OSX?
yes: http://192.237.185.151/versions/nightly/of_v20150616_osx_nightly.zip
@pizthewiz i tried with the main branch (the one @arturoc linked to). I can perfectly reproduce the problem in this version with this simple code: ( on OSX 10.10.3 , OF0.9.0, XCode 6.3.2 )
/// ofApp.h
#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
bool bShowLoadDialog;
};
and
// ofApp.cpp
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(255);
bShowLoadDialog = false;
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
ofSetColor(0);
ofDrawBitmapString("Drawing frame nr "+ofToString(ofGetFrameNum()), 15, 15);
}
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
bShowLoadDialog = true;
if(bShowLoadDialog){
bShowLoadDialog = false;
cout << "Show the file dialog" << endl;
ofFileDialogResult dialogResult = ofSystemLoadDialog();
}
}
after opening the load file dialog and closing it again (click cancel), the drawing of the OF view doesn't restart.
The weird thing with bShowLoadDialog = true; in keyPressed is because I first tried
if(bShowLoadDialog){
bShowLoadDialog = false;
cout << "Show the file dialog" << endl;
ofFileDialogResult dialogResult = ofSystemLoadDialog();
}
inside update(); and then moved it into keyPressed()