f



Phonon error: libv4l2: error getting pixformat: Invalid argument

Here is my code. I'm just trying to play an mp3 that I've clicked in a PyQT listwidget:

    @pyqtSlot()
    def item_clicked(self):
        row = self.listWidget.currentRow()
        song = musiclist[row]
        QCoreApplication.setApplicationName("Phonon")
        output = Phonon.AudioOutput(Phonon.MusicCategory)
        m_media = Phonon.MediaObject()
        Phonon.createPath(m_media, output)
        m_media.setCurrentSource(Phonon.MediaSource(song))
        m_media.play() 

I'm running OpenSUSE Linux 12.3

Any ideas?
0
tausciam (20)
8/27/2013 3:42:52 AM
comp.lang.python 77058 articles. 6 followers. Post Follow

7 Replies
587 Views

Similar Articles

[PageSpeed] 19

Looking in /var/log/messages, every time I get that error I get:

[41553.128652] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
[41553.152537] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
[41553.355913] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
[41553.379712] xc2028 9-0061: i2c input error: rc = -19 (should be 2)

and that's my video capture card! That has nothing to do with playing an mp3
0
tausciam (20)
8/27/2013 11:45:12 AM
On Tue, Aug 27, 2013 at 1:42 PM,  <tausciam@gmail.com> wrote:
> Here is my code. I'm just trying to play an mp3 that I've clicked in a PyQT listwidget:
>
>     @pyqtSlot()
>     def item_clicked(self):
>         row = self.listWidget.currentRow()
>         song = musiclist[row]
>         QCoreApplication.setApplicationName("Phonon")
>         output = Phonon.AudioOutput(Phonon.MusicCategory)
>         m_media = Phonon.MediaObject()
>         Phonon.createPath(m_media, output)
>         m_media.setCurrentSource(Phonon.MediaSource(song))
>         m_media.play()

I can't help with Phonon itself, but here's a general comment: When
you have a problem like this, post the full exception traceback. Also,
if you can, try to cut down the example to the point where you can
post all the code, not just one method; if you make it so we can
actually run the script, it's that much more likely we can help you.
But mainly, the exception traceback - it's very helpful.

Help us to help you! :)

ChrisA
0
rosuav (4324)
8/27/2013 2:50:27 PM
It's not giving me an exception. Here is the code I used:

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.phonon import Phonon
import os
import sys, traceback

def lumberjack():
    song = '/home/tannhaus/Music/A Perfect Circle/eMOTIVE/02 Imagine.mp3'
    QCoreApplication.setApplicationName("Phonon")
    output = Phonon.AudioOutput(Phonon.MusicCategory)
    m_media = Phonon.MediaObject()
    Phonon.createPath(m_media, output)
    m_media.setCurrentSource(Phonon.MediaSource(song))
    m_media.play() 

class MainWindow(QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        
        try:
            lumberjack()
        except IndexError:
            exc_type, exc_value, exc_traceback = sys.exc_info()
            print "*** print_tb:"
            traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
            print "*** print_exception:"
            traceback.print_exception(exc_type, exc_value, exc_traceback,
                              limit=2, file=sys.stdout)
            print "*** print_exc:"
            traceback.print_exc()
            print "*** format_exc, first and last line:"
            formatted_lines = traceback.format_exc().splitlines()
            print formatted_lines[0]
            print formatted_lines[-1]
            print "*** format_exception:"
            print repr(traceback.format_exception(exc_type, exc_value,
                                          exc_traceback))
            print "*** extract_tb:"
            print repr(traceback.extract_tb(exc_traceback))
            print "*** format_tb:"
            print repr(traceback.format_tb(exc_traceback))
            print "*** tb_lineno:", exc_traceback.tb_lineno
        
if __name__=="__main__":
    from sys import argv, exit
     
    a=QApplication(argv)
    m=MainWindow()
    m.show()
    m.raise_()
    exit(a.exec_())


When I run it, the complete and only error I get is:

libv4l2: error getting pixformat: Invalid argument

When I check /var/log/messages, I see these messages:

2013-08-27T18:12:04.163062-05:00 tannhaus-PC kernel: [ 1786.397499] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
2013-08-27T18:12:04.187054-05:00 tannhaus-PC kernel: [ 1786.421479] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
2013-08-27T18:12:04.391057-05:00 tannhaus-PC kernel: [ 1786.625614] xc2028 9-0061: i2c input error: rc = -19 (should be 2)
2013-08-27T18:12:04.415052-05:00 tannhaus-PC kernel: [ 1786.649613] xc2028 9-0061: i2c input error: rc = -19 (should be 2)


0
tausciam (20)
8/27/2013 11:17:25 PM
I unplugged the tv capture card and got no errors at all. It didn't cause it to crash when I had it plugged in. However, it appears that it's not actually playing the mp3. I don't hear it at all. I checked my sound mixer and no channels are muted.
0
tausciam (20)
8/27/2013 11:26:39 PM
But, the PYQT example works:

https://github.com/Werkov/PyQt4/blob/master/examples/phonon/musicplayer.py#L1

It's just my code isn't working for some reason. I don't hear anything coming from it
0
tausciam (20)
8/27/2013 11:39:36 PM
When I pare down the code to the following, I can't hear the mp3 play either:

#!/usr/bin/env python

import sip
sip.setapi('QString', 2)

import sys

from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon



class MainWindow(QtGui.QMainWindow):
    def __init__(self):
        super(QtGui.QMainWindow, self).__init__()       
        self.audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self)
        self.mediaObject = Phonon.MediaObject(self)
        self.metaInformationResolver = Phonon.MediaObject(self)
        Phonon.createPath(self.mediaObject, self.audioOutput)
        self.sources = "/home/tannhaus/Music/A Perfect Circle/eMOTIVE/02 Imagine.mp3"
        self.metaInformationResolver.setCurrentSource(Phonon.MediaSource(self.sources))
        self.mediaObject.play()

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    app.setApplicationName("Music Player")
    app.setQuitOnLastWindowClosed(True)

    window = MainWindow()
    window.show()

    sys.exit(app.exec_())
0
tausciam (20)
8/28/2013 12:42:19 AM
I've played around with it and got code that plays mp3s now. I'm not sure what I was doing wrong.... or why it plays now...but it does, so I'm going to use it:

#!/usr/bin/env python

import sip
sip.setapi('QString', 2)

import sys

from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon



class MainWindow(QtGui.QMainWindow):
    def __init__(self):
        super(QtGui.QMainWindow, self).__init__()   
        self.sources = "/home/tannhaus/Music/A Perfect Circle/eMOTIVE/02 Imagine.mp3"
        self.mediaObject = Phonon.createPlayer(Phonon.MusicCategory)
        self.audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self)
        Phonon.createPath(self.mediaObject, self.audioOutput)
        self.mediaObject.setCurrentSource(Phonon.MediaSource(self.sources))
        self.mediaObject.play()

if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    app.setApplicationName("Music Player")
    app.setQuitOnLastWindowClosed(True)

    window = MainWindow()
    window.show()

    sys.exit(app.exec_())
0
tausciam (20)
8/28/2013 12:56:44 AM
Reply:

Similar Artilces:

3146 Error, and Invalid Argument Value error
I have recently upsized a client database to SQL Server. The application is used to book people onto courses at a Conference Centre/Adult Study Centre. It was originally an Access FE/BE, all written by my client. While it's not bad as an "amateur" database, it has all the expected failings of the inexperienced developer (poor table design, queries operating on whole tables, macros running hither and yon mixed with code etc.) The FE resides on a server, and all users (about four or five at most) connect to it. The BE resides on a different server. Recently, the users have be...

HELP! Getting Error: Argument not optional (Error 449)
Hello All, I could really use some help with this bit of code I am working on, every time I come to execute it I get an error that says "Compile Error: Argument not optional". Now I am using Access 2002 to run this code that will allow me to populate a field in several tables at once. Here is an example of the code. Private Sub cmdOK_Click() DoCmd.SetWarnings False Dim db As ADODB.Connection Dim rsDaily_CallVolumes, rsBilling, rsTech, rsTransfer, rsSales, rsOther, As Recordset Dim sEmployeeID, sQueue, sTextDate As String Dim dTotalCalls As Double Log.SetFocus Log...

When is an error not an error?
The Java language specification claims in: 8.8.7.1 Explicit Constructor Invocations .... "If an anonymous class instance creation expression appears within an explicit constructor invocation statement, then the anonymous class may not refer to any of the enclosing instances of the class whose constructor is being invoked." Helpfully it gives an example: "For example: class Top { int x; class Dummy { Dummy(Object o) {} } class Inside extends Dummy { Inside() { super(new Object() { int r = x; }); // err...

When is an error not an error?
When it's OSS slopware, of course. http://www.angelfire.com/planet/dfs0/Knode_send_error.png On 2006-09-12 02:42, * DFS wrote: > When it's OSS slopware, of course. > > http://www.angelfire.com/planet/dfs0/Knode_send_error.png > Well, some time ago I had a problem with OE - too long reference line to other posts, and OE of course refused to send... then crashed. Should I name it a feature? -- Andrea On Tue, 12 Sep 2006 03:25:29 +0200, Andrea wrote: > On 2006-09-12 02:42, * DFS wrote: >> When it's OSS slopware, of course. >> >> http:/...

error or not an error ...
I was just testing out the R4 REXX thingy, and it found an error in the following program. My question is this, is it an error or not? My PC/REXX and Regina don't barf on it, but I thought they should've. _____________________________________________ /**/ ?.='' ?.z='batman' trace i if ?.z\==''then do; say '?.z=' ?.z; end ______________________________________________ Note that there is space before the THEN. I'm not sure of the exact rules for parsing an IF statement, I know that THEN is a "reserved" keyword when an IF statement is...

It works but get an "invalid argument" error
The code below works fine in IE7 and Firefox2 but gets an "Invalid Argument" error in IE7. I've tried quotes around "ShowContent" ( I've used double " and single ' ) but it doesn't work at all with quotes. Anyone know what's happening. Thanks. <body onload="javascript:setTimeout(ShowContent('success'),1000)"> function ShowContent(d) { document.getElementById(d).style.display = "block"; } On May 27, 6:22 pm, "Don M" <d...@home.com> wrote: > <body onload="javascript:setTimeout(ShowCo...

Objc Nubie: Errors Errors Errors
I've been toying with learning ObjC/Cocoa for sometime and finally got over the hump of "brackets vs. braces" but am wondering why my little test throws so many warnings when run: // gcc FileTest.m -o FileTest -ObjC -framework Cocoa #include <Cocoa/Cocoa.h> #include <Foundation/Foundation.h> int main( void ) { NSString * str = [ [NSStringalloc] initWithString:@"~/samplefromcocoa.txt" ]; NSString * full = [ NSString stringWithString: [str stringByExpandingTildeInPath ] ]; if( [ [NSFileManager defaultManager] fileExistsAtPath:full ] ) { NSLog( @"File %@ exists", str ); } else { NSString * contents = [ [NSString alloc] initWithString:@"Created by FileTest.m" ]; BOOL didWrite = [contents writeToFile:full atomically:NO]; if( didWrite ) { NSLog( @"Creating File %@", str ); } else { NSLog( @"Unable to create file %@", str ); } } return 0; } when run and it has to write the string to disk> 2004-02-11 08:27:03.882 FileTest[2082] *** _NSAutoreleaseNoPool(): Object 0x50d6f0 of class NSCFString autoreleased with no pool in place - just leaking 2004-02-11 08:27:03.885 FileTest[2082] *** _NSAutoreleaseNoPool(): Object 0x50dc80 of class NSPathStore2 autoreleased with no pool in place - just leaking 2004-02-11 08:27:03.887 FileTest[2082] ...

Creating Posix message queue with attribute get error (invalid argument)
Why not Following code always get "Invalid argument" error? Who can help me out? $ ./a.out /tmp.333 Wrong! : Invalid argument #include <mqueue.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/stat.h> #include <iostream> using namespace std; #define FILE_MODE S_IRUSR|S_IWUSR struct mq_attr attr; int main(int argc, char** argv){ int c, flags; mqd_t mqd; flags = O_RDWR|O_CREAT; if( argc != 2){ printf("usage: mqcreate <name>\n"...

Creating Posix message queue with attribute get error (invalid argument)
Why not Following code always get "Invalid argument" error? $ ./a.out /tmp.333 Wrong! : Invalid argument #include <mqueue.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/stat.h> #include <iostream> using namespace std; #define FILE_MODE S_IRUSR|S_IWUSR struct mq_attr attr; int main(int argc, char** argv){ int c, flags; mqd_t mqd; flags = O_RDWR|O_CREAT; if( argc != 2){ printf("usage: mqcreate <name>\n"); return -1; } attr.mq_maxmsg = 512; attr.mq_msgsize = 512; mqd = mq_open( argv[argc -1 ], flags, FILE_MODE, &attr); if(mqd < 0){ perror("Wrong!\n"); return -1; } mq_close(mqd); exit(0); } Hill wrote: > Why not Following code always get "Invalid argument" error? > > $ ./a.out /tmp.333 > > Wrong! > : Invalid argument > Hi Hill! It's common problem when working with POSIX MQ. Your system disallows you to create MQ containing 512 messages, since system-wide limit is 10 by default. You can solve your problem by changing hard limit as follows: krivenok@olimpico_work 10:44:27 /tmp $ g++ -lrt -Wall mq.cpp mq.cpp: In function 'int main(int, char**)': mq.cpp:16: warning: unused variable 'c' krivenok@olimpico_work 10:44:37 /tmp $ ./a.out /tmp.333 Wrong! : Invalid argument krive...

Link Error: invalid object error
Hi, I tried to build my project on MAC OS X 10.3 (7B39) compilation was fine but linker complains: Invalid object code /usr/lib/libiconv.2.dylib what does it mean? and is it possible to workaround it somehow? thanks Dmitry Markman In article <BB66E059.680E%dima@concord.org>, Dmitry Markman <dima@concord.org> wrote: >Hi, I tried to build my project >on MAC OS X 10.3 (7B39) I don't have any idea what this is, perhaps you meant to write 10.2 since you'd be breaking a contract if you mentioned any NDA stuff. >compilation was fine >but ...

Error Directing BCP In Errors to error file
Greetings, I am trying to bcp in data to a table which is in different server. Though the bcp in works fine but the error file is not being created and rejected records are not being directyd to the error file. Query looks like: bcp <db>..test_b_plan_cp in /home/file_out.txt -c -t '|' -S *****-U ****** -P ******-I /home/bcp2db_sql.ini -e /home/bcp2db.error. Can someone please help? TIA. Regards, Rajpreet ...

(assert-error) tests errors and error messages
I wrote (assert-error) to make sure that a function generates an error, and verify the error message. What do you think? Below is the definition and a few test cases, for Emacs 22.1.50. (require 'cl) (defmacro assert-error (form &optional regexp) "FORM must signal an error. Signal an error otherwise. Additionally, the error message must match REGEXP. Case is ignored while matching REGEXP." (let ((msg (make-symbol "msg")) (ok (make-symbol "ok")) (res (make-symbol "res"))) `(let ((,ok nil)) (condition-case err ;; Evaluate FORM and save the result. (set ',res ,form) (error ;; This runs when FORM signals an error of any kind. (set ',ok t) (set ',msg (error-message-string err)))) (unless ,ok (error "Did not signal an error: %s (returned %s)" ',form ,res)) (when ,regexp ;; Here we know that FORM signaled an error, and that the ;; caller wants to check the error message. (unless (let ((case-fold-search t)) (string-match ,regexp ,msg)) (error "Error message does not match \"%s\": \"%s\"" ,regexp ,msg)))))) ;; Test assert-error, mostly by running it against itself. (assert-error (assert-error nil) "did not signal.*nil") (assert-error (assert-error t) "\\bt\\b") (as...

Error directing BCP In errors to error file
Greetings, I am trying to bcp in data to a table which is in different server . Though the bcp in works fine but the error file is not being created and rejected records are not being directyd to the error file. Query looks like: bcp <db>..test_b_plan_cp in /home/file_out.txt -c -t '|' -S *****-U ****** -P ******-I /home/bcp2db_sql.ini -e /home/bcp2db.error. Can someone please help? TIA. Regards, Rajpreet ...

error C2106: error C2057 :error C3304:
I have faced intrinsic errors "error C2106 / error C2057 / error C3304" in Visual studio 2008. Though the source files have included with header files like "math.h" and "ctype.h", compilation gives error as given below. 2>c:\apps\microsoft visual studio 9.0\vc\include\string.h(48) : error C2106: '=' : left operand must be l-value 2>c:\apps\microsoft visual studio 9.0\vc\include\string.h(48) : error C2057: expected constant expression 2>c:\apps\microsoft visual studio 9.0\vc\include\string.h(48) : error C3304: 'PreAttribute': at...

How To Accessing C++ Class objects in C : getting error fatal error C1189: #error : "eh.h is only for C++!"
hi , i am Getting this Error fatal error C1189: #error : "eh.h is only for C++!" my Problem is i am Having C++ librabry and Appropriate .h file i want to Access Them is .c File Files..... to Be More Specific i am Creating a C++ Object in a C file... this Giving me the error!!! :( can Any Body Please Help me How to Access the C++ object in C file... Thanks In Advance :) Hi, > How to Access the C++ object in C file... Please have a look at the following page http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html Regards On Jan 7, 11:17=A0am, "sachinv1...@gmail.com" <sachinv1...@gmail.com> wrote: > hi , > i am Getting this Error > fatal error C1189: #error : "eh.h is only for C++!" > my Problem is i am Having C++ librabry and Appropriate .h file > i want to Access Them is .c File Files..... > to Be More Specific i am Creating a C++ Object in a C file... > this Giving me the error!!! :( > > can Any Body Please Help me > > How to Access the C++ object in C file... > Thanks In Advance :) In general, you can't. You can provide a procedural interface instead, and declare it in a header file like this: #ifdef __cplusplus extern "C" { #endif void some_function(int, char*, double); // or whatever #ifdef __cplusplus } #endif This can then be included from both C and C++. On Jan 7, 4:32=A0pm, tragomaskhalos <dave.du.verg...@logicacmg.com> wrote: > On Jan 7, 11:17=A0am, "...

[Urgent]: How To Accessing C++ Class objects in C : getting error fatal error C1189: #error : "eh.h is only for C++!"
hi , i am Getting this Error fatal error C1189: #error : "eh.h is only for C++!" my Problem is i am Having C++ librabry and Appropriate .h file i want to Access Them is .c File Files..... to Be More Specific i am Creating a C++ Object in a C file... this Giving me the error!!! :( can Any Body Please Help me How to Access the C++ object in C file... Thanks In Advance :) "sachinv1821@gmail.com" <sachinv1821@gmail.com> writes: > How to Access the C++ object in C file... > Thanks In Advance :) You'd be better off asking in comp.lang.c++. I know this sounds...

Getting Error TNS: PROTOCL ADAPTER ERROR
Hi There! I have Oracle 8i and I'm running it on Windows Xp Professional and while running SQL Client, i get this error TNS: PROTOCOL ADAPTER ERROR, and i would also like to know that whenever I run SQL client, the services of the database dont start in SERVICES of Administrative tools. Regards, nomi On 3 Jan 2004 11:19:06 -0800, rox_santiago@hotmail.com (nomi) wrote: >Hi There! > I have Oracle 8i and I'm running it on Windows Xp Professional >and while running SQL Client, i get this error TNS: PROTOCOL ADAPTER >ERROR, and i would also like to know that w...

How to get the error message rather than the code error
Hi, After sending a request, I would get the possible error message. Not the code @@error, nor the exact content of sysmessages, but the message like it could be in the log file. TIA, TSalm TSalm (tsalm@free.fr) writes: > After sending a request, I would get the possible error message. > Not the code @@error, nor the exact content of sysmessages, but the > message like it could be in the log file. "Sending a request", that sounds like you are issuing a call from a client program. In that case you should be able to pick up the error message. If you tell which client API...

I m getting error datatype mismatch error
i m doing asci key press F1 in under AUT. whenever i ger error for an "Data Type Mismatch Error" in i press debug error highlighting in strFilter statement. any one please help me.... in module code behind Set GetRec = IECDB.OpenRecordset(strSQL) in form code behind Case "BE_Invoice" strSQL = "Select BEDocNo,Inv_Sr_No,Inv_No from b_Invoice" strFilter = "BEDocNo=" & frmBEJob.txtJobno ' huzaink@gmail.com wrote in news:1172918032.739191.249250@v33g2000cwv.googlegroups.com: > i m doing asci key press F1 in und...

Getting an error: Syntax error at the end of input
I have one program and when I try to copile it using the make file it is giving me an error: Syntax error at the end input.... I am getting two warnings before this error which says "Warning: no previous prototype for slmics_creare" I have this function defined very well.... So is the error because of these warnings or what???? But I am not finding any syntax error at the end ..... Can any one please help.... I even not understanding what sohuld I include to give you good idea about from where the problem is coming so please let me know..... sorry for inconvinience... This was my...

Error 8 Compilation Error. File permission error or DMA hardware error detected
I just upgraded my Labview code to Labview 8.5 from LV8.2.1 Then I tried to compile&nbsp;my code to get an .exe file I keep getting the following error, &nbsp; Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference: Error 8 occurred at Write to Text File in AB_Engine_Update_INI_Header.vi-&gt;AB_Application.lvclass:Create_INI_File.vi-&gt;AB_Application.lvclass:Copy_Files.vi-&gt;AB_Build.lvclass:Build.vi-&gt;AB_EXE.lvclass:Build.vi-&gt;AB_Build.lvclass:Build_from_Wizard.vi-&gt;AB_UI_FR...

[ace-users] proactor test example getting unknown error on open(): proactor test example getting unknown error on open()
ACE VERSION: 5.5 HOST MACHINE and OPERATING SYSTEM: HP Compaq nw8420, Windows XP SP2, not sure of the WINSOCK version. Pentium M, 2.0 Ghz, 1 GB of RAM TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific file, simply state which one]: I link to config-win32-msvc.h THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you use a link to a platform-specific file, simply state which one (unless this isn't used in this case, e.g., with Microsoft Visual C++)]: Not used CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features (used by MPC when you generate your own makefiles): AREA/CLASS/EXAMPLE AFFECTED: [What example failed? What module failed to compile?] $ACE_ROOT/examples/Reactor/Proactor DOES THE PROBLEM AFFECT: EXECUTION SYNOPSIS: When testing the proactor example on the "client" side it looks like the file gets sent across. I get a lot of information telling me about bytes_transferred, etc with no error codes. This is the command line. test_proactor.exe -h "MY IP" -p 20002 -f README.send However, on the "server" side I get the following error: .\test_proactor.cpp:86:Receiver::open called ACE_OS::open: Unknown error DESCRIPTION: I've tried sending vari...

@@Error not catching error.
Hi all, I want to catch error in stored procedure and return error message. I want to catch error 'Syntax error converting the varchar value 'a' to a column of data type int.' Means error occuring if i enter wrong value. Say suppose i have statment like select * from emp where rowid = 'a' PRINT @@ERROR print 'reach' here rowid is integer value so i am getting above mention error. So what i am expecting is it should print error and then print 'reach' which is not happening. can anyone tell me reason behind this and how to overcome this problem. than...

Robust error handling, an error while handling another error
I've been having this discussion a lot with my colleagues at work. A buffered file writer is the classic example. #include <fstream> int main() { std::ofstream fout("foo.txt"); if ( ! fout) return 1; //write important data to file //let the destructor implicitly close the file handle } The ofstream destructor will call flush then free the file handle, return it to the operating system. However, flush can fail. The disk can be full, for example. When flush fails, it sets a state flag, but there is no opportunity for the user to examine this state fl...

Web resources about - Phonon error: libv4l2: error getting pixformat: Invalid argument - comp.lang.python

Resources last updated: 3/7/2016 9:54:50 PM