[Bug 478898] [NEW] display function never returns
iapx86
jlettvin at gmail.com
Mon Nov 9 05:20:29 UTC 2009
Public bug reported:
//******************************************************************************
/// @file CImgFails.cpp <EOF>
/// @author Jonathan D. Lettvin
/// @date 20091108
//******************************************************************************
/// @brief Simple example of failing CImg package on ubunutu 9.10 Karmic Koala.
/// cimg release 1.2.0.1-2.1
/// Compile and run this source. Program fails to terminate on keyboard input.
//******************************************************************************
/*
TESTIMAGE=/usr/share/backgrounds/Frog.jpg
CImgFails: CImgFails.cpp
g++ \
CImgFails.cpp \
-I/usr/include/CImg \
-o CImgFails \
-lpthread \
-L/usr/X11R6/lib \
-lX11
./CImgFails $(TESTIMAGE)
*/
//******************************************************************************
#include "CImg.h"
#include <iostream>
#include <string>
#include <sstream>
#define cimg_strict
using namespace std;
using namespace cimg_library;
int main( const int argc, const char **argv, const char **envp ) {
stringstream ss;
try {
if( argc != 2 ) throw( "Usage: CimgFails {imagefilename}" );
CImg<double> img( argv[ 1 ] );
img.display( "img" );
cout << "CImg \"display\" freezes on 'q'. This never gets output." << endl;
}
//tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
catch( const exception &e ) { ss << "Error except: " << e.what( ) << endl; }
catch( const string &s ) { ss << "Error string: " << s << endl; }
catch( const char * &s ) { ss << "Error char *: " << s << endl; }
catch( ... ) { ss << "Error unknown:" << endl; }
int ret = ss.str( ).length( );/// Check for thrown error message
if( ret ) cerr << ss.str( ); /// Display the thrown error message
return ret; /// Return length of thrown error message
}
//******************************************************************************
/// file CImgFails.cpp <EOF>
//******************************************************************************
** Affects: cimg (Ubuntu)
Importance: Undecided
Status: New
--
display function never returns
https://bugs.launchpad.net/bugs/478898
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list