Execute the same query twice, get two different results

I have a query that returns two different results:
Oracle Version : 10.2.0.1.0
I am running the following query on the Oracle server in SQL*Plus Worksheet.
SELECT COUNT(*)
FROM AEJOURNAL_S1
WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
AND DESC2 LIKE '%'
AND DESC1 LIKE '%'
AND DESC2 LIKE '%'
AND ETYPE LIKE '%'
AND MODULE LIKE '%'
AND LEVELL = '11-WARNING'
ORDER BY ORDD DESC;
The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
This query runs against a view. The view does a transpose of data from a table.
Below is the view AEJOURNAL_S1
SELECT
CHAR_TIME,
CHAR_INST,
BATCH_ID,
MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
FROM CHAR_BATCH_DATA
WHERE subbatch_id = 1774
GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
Thanks for looking,
Dan

user2188367 wrote:
I have a query that returns two different results:
Oracle Version : 10.2.0.1.0
I am running the following query on the Oracle server in SQL*Plus Worksheet.
SELECT COUNT(*)
FROM AEJOURNAL_S1
WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
AND DESC2 LIKE '%'
AND DESC1 LIKE '%'
AND DESC2 LIKE '%'
AND ETYPE LIKE '%'
AND MODULE LIKE '%'
AND LEVELL = '11-WARNING'
ORDER BY ORDD DESC;
The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
This query runs against a view. The view does a transpose of data from a table.
Below is the view AEJOURNAL_S1
SELECT
CHAR_TIME,
CHAR_INST,
BATCH_ID,
MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
FROM CHAR_BATCH_DATA
WHERE subbatch_id = 1774
GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
Thanks for looking,
DanIn fact you the first time you ran the query the data has been retrived from disk to memory , in the second time the data is already in memory so the respnse time should be faster ,but if you chagne any condition or column or letter case the optimizer will do the first step (data will be retrived from disk to memory )

Similar Messages

  • Why do I get two different results from the same coefficients?

    I am getting two different results from the Polynomial Evaluation function.
    For the first one, I am getting the coefficients from a Polynomial Fit function.  I feed the coefficients from the Fit function into the Poly Eval function and get the correct result of 12.8582 when I evaluate 49940.
    For the second one, I create constant array of the SAME values that were returned from the Polynomial Fit function (i typed them in).  However, I am getting an incorrect result of -120.7913 when I feed the constant array into the Poly Eval function when I evauate 49940.
    How can this happen when I am using the same array values?
    Attached is an image of what I am explaining.
    Solved!
    Go to Solution.
    Attachments:
    polynomial_evaluation.jpg ‏213 KB

    Hi Altran,
    are you sure about using the "same" coefficients?
    Did you compare them? Did you (atleast) set the display properties to 17 significant digits?
    Please attach a VI instead of a picture...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Can two people share the same Apple ID on two different iPhones and maintain different passwords?  Yes, there is more to the story.

    I have an iMac, and iPhone.  I've had my Apple ID for a few years. 
    My wife got an iPhone 4S a few months back and the salesperson at Verizon set her Apple ID the same as mine, but gave her a different password.  I don't know if this was ok, but that is what happened.
    So, yesterday, we both upgraded to IOS6 and I had no problem logging in to my iPhone with my Apple ID.  When my wife went to log in, she was told that she was entering the wrong password. We entered the password over and over again and still was wrong.
    The question is... can two people share the same Apple ID on two different iPhones and maintain different passwords?  (I have the feeling her iPhone is thinking that since it's my Apple ID, it wants my password.)
    If not, can I still set up a new Apple ID for her even through she's had the iPhone for a few months?
    Thanks.

    Hi
    You shold follow your feelings, its probably right most of the time.
    You can have 5 different devices hucked upp to one Apple ID. What I have done is that my wife and I have one Apple ID, when I bye a new app on my phone, She gets it to. Thats nice.
    You can allways set upp a new Apple ID for your wife.

  • Using the same Credit Card on two different iPhones

    Wanted to know if it's possible to use the same credit card on two different iPhones.
    There have been times that I wished I had a card that was in my wife's possession for certain "Points Purchases"
    It would be so handy to share a single card on two phones.  Has anyone done this?

    I appreciate your response but, the question was in relation to Apple Pay.  I thought that was the forum I posted in.
    So...let me try this again.  We have one Amex card but say I want to purchase something at Home Depot with it and she is out shopping at Nordstrom's.  Can my wife and I have the same card registered in Apple pay on each of our phones so that it's available for both of us to use?  Or are you only allowed to register a card once on one phone?  This has nothing to do with iTunes purchases or Apple ID's.   This is for for using Apple Pay out and about at different retailers.

  • How to link the same horizontal page for two different vertical pages without duplicate them?

    Hey guys,
    Is there a way to link the same horizontal page on two different vertical pages without duplicate the horizontal page?
    I have a doublepage of a book splitted in two parts in different vertical pages but i want link the fullsized image in the horizontal page for both of them. Got that? hahaha
    Thank you all

    Confusing But interesing.
    I think it's possible. I have a idea. It will need one advanced trick.
    To explain it, I need test simply haha.

  • HT204053 Can I use the same Apple ID on two different iphones?

    Can I use the same Apple ID on two different iphones and use facetime to communicate ?

    Yes.
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Use-FaceTime-On-The-iPad_2.htm

  • Can I use the same email address on two different iPads?

    Can I use the same email address on two different iPads?
    Jackie

    I use AOL for my work account, I can open an email on my iPad, my iPod Touch, my iMac, another iMac in the office and there are no issues at all. However, my AOL account is IMAP. I read email on the iPad, turn around and read and print from the iMac and someone else is accessing the email at the same time.
    We access the same emails all the time as we have one generic email address that we both use. We like to multitask with AOL.

  • HT3702 I have two charges to my credit card for the same dollar amount at two different times. First on 2/27/14 & second on 3/25/14 for $4.34. today's is pending payment and last months has been removed form my account. I have not purchased anything.

    I have two charges to my credit card for the same dollar amount at two different times. First on 2/27/14 & second on 3/25/14 for $4.34. today's is pending payment and last months has been removed from my account. I have not purchased anything.

    If they are regular payments for the same amount then it sounds like you have an auto-renewing subscription - there are instructions on this page for managing and stopping them : http://support.apple.com/kb/HT4098

  • How to use the same apple id on two different iphones with different sync?

    Hi all,
    I own an iPhone 4s for personal use. Soon my company is going to give me a business phone and I can choose to have another iPhone. I'd love it but I don't know if what I wanna do is possible.
    Let's say I will have iPhone P (personal) and iPhone B (business) and Apple ID MyID.
    At the moment on iPhone P with account MyID I have application App1, App2, ... App9, I have contacts Cont1, Cont2, ...Cont9, I have songs Song1, Song2, ... Song9. All these are synced on my personal PC via iTunes and stored in the iCloud.
    When I'll get iPhone B I'd love to be able to use on it my Apple ID MyID and to sync it with my business PC (so NOT the same one I use for iPhone P).
    The configuration I'd love to have would be the following.
    iPhone P
    - Applications: App1, App2, App3, App8, App9
    - Contacts: Cont1, Cont2, ... Cont9
    - Songs: Song1, Song2, ... Song9
    iPhone B
    - Applications: App4, App5,App6, App7, App8, App9, App10 etc.
    - Contacts: Cont1, Cont2, Cont10, Cont11, ..., Cont20
    - Songs: Song1, Song2, Song10, Song11, ... Song20
    So will it be possible using the same Apple ID MyID on both iPhones to have this configuration? Some apps, contacts and songs in common and some differents?
    If so, how should I configure the two iPhones and the two PCs?
    Kind regards.

    If you use the same Apple ID for iCloud on each device, yes. However, you can use the same Apple ID for iTunes content on each device, but different Apple ID's for iCloud, iMessage, FaceTime, etc., on each device. That way, you can have whatever iTunes content you want on each phone, but keep all of the other data separate. You can create another Apple ID here:
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId?loca lang=en_US
    Must be a verified email address.

  • I have the same itunes account on two different devices with different information.  how can I merge the two?

    I have an ipad which was synced with an old computer.   I have moved everything to the icloud from my new computer and iphone besides what is on the ipad.  The itunes account is the same, just different info on the two.  How do I merge them? 

    Hello there, Shininglight66.
    It sounds like you're asking how to get content on the iPad transferred down to your computer. The following Knowledge Base article should help out with that issue:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • How can I use the same "I Tunes" on two different computers

    I’m using two different kinds of Personal Computer: One is Desktop PC And the other one is Notebook .
    In each computer there are the same songs and when I get the new ones to the Desktop I want them to be placed on the Notebook or reverse.
    Where does the I Tunes save the playlist on the hard drive ?
    I have prepared a playlist on my Notebook and want it to be seen on the Desktop but I dont want to fallow the steps File > Library > Export Playlist on the Notebook. Is there any other way to make this issue instead of the mentioned steps.
    How can I see the same Playlists and songs on two different computers ( notebook and desktop) including the updating processes.
    Operating systems of the computers:
    Desktop: XP Pro
    Notebook: Vista Bussiness

    I use SyncToy 2.0 to keep two instances of my library in sync. SyncToy's preview will show which files it is about to update giving you a chance to spot unexpected changes and during the run only the changed files will be copied saving lots of time.
    As long as I sync after making updates at one instance of the library before making any updates at the other then everything works just fine. I periodically run iTunes Folder Watch to check for any orphaned entries or new items that haven't been imported into the active library. If your machines are regularly networked together this process is fairly straightfoward. Mine are in disparate locations so I use one of the (physically) small WD My Passport host powered drives which I take between home & work, synchronising at either end. This gives me three complete copies of my library so I'm covering backup & synchronisation in the same operation.
    When connecting my iPod at either location iTunes recognises itself as the "home" library for the iPod so I'm able to use the sync with selected playlists option without getting warning messages about the iPod being synced with a different library.
    tt2

  • Big problem with put the same received dataSource on two different panels

    Hello All!
    I have a big problem, but first what have I done:
    I am writting application that is based on AVReceiver2 and AVTransmit2 from Sun help.
    I have modified AVReceiver2 to only receive one stream - video stream.
    I show received video on scrollPane, but I want to show the same video on second scrollPane in the same time. I have read about cloning dataSource, but I don't know how to modify that code to make it work.
    This is my receiver class (logger is my own class that have listbox, so don't watch on it. This is not important):
    public class Połączenie implements ReceiveStreamListener, SessionListener,
         ControllerListener
        String session = null;
        RTPManager manager = null;
        public Player player1 = null;
        boolean dataReceived = false;
        Object dataSync = new Object();
        private Logger logger;
        private JPanelŹródłoPołączone panelOgólny;
        private JPanelŹródłoSzczegóły panelSzczegóły;
        private Date dataRozpoczęcia;
        public Połączenie(String session, JPanelŹródłoSzczegóły panelSzczegóły, JPanelŹródłoPołączone panelOgólny, Logger logger) {
            this.session = session;
            this.logger = logger;
            this.panelOgólny = panelOgólny;
            this.panelSzczegóły = panelSzczegóły;
        public void Start()
            if (!initialize())
                System.err.println("Failed to initialize the sessions.");
                System.exit(-1);
                System.err.println("Odbiór rozpoczęty");
        public boolean initialize() {
            try {
             InetAddress ipAddr;
             SessionAddress localAddr = new SessionAddress();
             SessionAddress destAddr;
             SessionLabel sessionLabel;
             // Open the RTP sessions.
               // Parse the session addresses.
              try {
                  sessionLabel = new SessionLabel(session);
              } catch (IllegalArgumentException e) {
                  System.err.println("Failed to parse the session address given: " + session);
                  return false;
              System.err.println("  - Otwarcie sesji RTP: addr: " + sessionLabel.addr + " port: " + sessionLabel.port + " ttl: " + sessionLabel.ttl);
              manager = (RTPManager) RTPManager.newInstance();
              manager.addSessionListener(this);
              manager.addReceiveStreamListener(this);
              ipAddr = InetAddress.getByName(sessionLabel.addr);
              if( ipAddr.isMulticastAddress()) {
                  // local and remote address pairs are identical:
                  localAddr= new SessionAddress( ipAddr,
                                     sessionLabel.port,
                                     sessionLabel.ttl);
                  destAddr = new SessionAddress( ipAddr,
                                     sessionLabel.port,
                                     sessionLabel.ttl);
              } else {
                  localAddr= new SessionAddress( InetAddress.getLocalHost(),
                                          sessionLabel.port);
                        destAddr = new SessionAddress( ipAddr, sessionLabel.port);
              manager.initialize( localAddr);
              // You can try out some other buffer size to see
              // if you can get better smoothness.
              BufferControl bc = (BufferControl)manager.getControl("javax.media.control.BufferControl");
              if (bc != null)
                  bc.setBufferLength(350);
                  manager.addTarget(destAddr);
            } catch (Exception e){
                System.err.println("Cannot create the RTP Session: " + e.getMessage());
                return false;
         // Wait for data to arrive before moving on.
         long then = System.currentTimeMillis();
         long waitingPeriod = 30000;  // wait for a maximum of 30 secs.
         try{
             synchronized (dataSync) {
              while (!dataReceived &&
                   System.currentTimeMillis() - then < waitingPeriod) {
                  if (!dataReceived)
                   System.err.println("  - Oczekiwanie na transmisj&#281; danych...");
                  dataSync.wait(1000);
         } catch (Exception e) {}
         if (!dataReceived) {
             System.err.println("No RTP data was received.");
             close();
             return false;
            return true;
         * Close the players and the session managers.
        protected void close() {
             try {
                player1.close();
             } catch (Exception e) {}
         // close the RTP session.
             if (manager != null) {
                    manager.removeTargets( "Closing session from AVReceive2");
                    manager.dispose();
                    manager = null;
         * SessionListener.
        public synchronized void update(SessionEvent evt) {
         if (evt instanceof NewParticipantEvent) {
             Participant p = ((NewParticipantEvent)evt).getParticipant();
             System.err.println("  - Do&#322;&#261;czy&#322; nowy u&#380;ytkownik: " + p.getCNAME());
         * ReceiveStreamListener
        public synchronized void update( ReceiveStreamEvent evt) {
         RTPManager mgr = (RTPManager)evt.getSource();
         Participant participant = evt.getParticipant();     // could be null.
         ReceiveStream stream = evt.getReceiveStream();  // could be null.
         if (evt instanceof RemotePayloadChangeEvent) {
             System.err.println("  - Received an RTP PayloadChangeEvent.");
             System.err.println("Sorry, cannot handle payload change.");
             System.exit(0);
         else if (evt instanceof NewReceiveStreamEvent) {
             try {
              stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
              DataSource ds = stream.getDataSource();
    //=========important thing:
                            DataSource cloneableDS = Manager.createCloneableDataSource( ds );
                            DataSource clonedDS = ((SourceCloneable)cloneableDS).createClone();
    //========
              // Find out the formats.
              RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
              if (ctl != null){
                  System.err.println("  - Recevied new RTP stream: " + ctl.getFormat());
              } else {
                  System.err.println("  - Recevied new RTP stream");
              if (participant == null)
                  System.err.println("      The sender of this stream had yet to be identified.");
              else {
                  System.err.println("      The stream comes from: " + participant.getCNAME());
              // create a player by passing datasource to the Media Manager
    //=====important thing:
                            player1 = javax.media.Manager.createPlayer(clonedDS);
    //=====
              if (player1 == null)
                  return;
              player1.addControllerListener(this);
              player1.realize();
              // Notify intialize() that a new stream had arrived.
              synchronized (dataSync) {
                  dataReceived = true;
                  dataSync.notifyAll();
             } catch (Exception e) {
              System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
              return;
         else if (evt instanceof StreamMappedEvent) {
              if (stream != null && stream.getDataSource() != null) {
              DataSource ds = stream.getDataSource();
              // Find out the formats.
              RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
              System.err.println("  - The previously unidentified stream ");
              if (ctl != null)
                  System.err.println("      " + ctl.getFormat());
              System.err.println("      had now been identified as sent by: " + participant.getCNAME());
         else if (evt instanceof ByeEvent) {
              System.err.println("  - Got \"bye\" from: " + participant.getCNAME());
          player1.close();
            manager.dispose();
        }

    I wanted to show the same video stream on 2 panels at the same time. The panels are on 2 different Tabs of TabbedPane.
    So I done some kind of switch:
    - when user change tab, I change vievport from one panel to another. This works gr8, but I need to record some received video on the same time when user watch it.
    I find some code to record - this works on single machine, but now, when I have cloned dataSource I supposed to be able to record received video, but guess what: it doesn't work.
    Code of recording part:
               DataSource ds2; // I cloned this the same as I posted earlier
                PushBufferStream pbs;
         Vector camImgSize = new Vector();
         Vector camCapDevice = new Vector();
         Vector camCapFormat = new Vector();
         int camFPS;
         int camImgSel;
         Processor processor = null;
         DataSink datasink = null;
        public void record()
            fetchDeviceFormats();
              camImgSel=0;     // first format, or otherwise as desired
              camFPS = 30;     // framerate
              // Setup data source
              fetchDeviceDataSource();
              createPBDSource();
              createProcessor(ds2); // i'm using cloned datasource
              startCapture();
              try{Thread.sleep(20000);}catch(Exception e){}     // 20 seconds
              stopCapture();
         boolean fetchDeviceFormats()
              Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat(null));
              CaptureDeviceInfo CapDevice = null;
              Format CapFormat = null;
              String type = "N/A";
              CaptureDeviceInfo deviceInfo=null;boolean VideoFormatMatch=false;
              for(int i=0;i<deviceList.size();i++)
                   // search for video device
                   deviceInfo = (CaptureDeviceInfo)deviceList.elementAt(i);
                   if(deviceInfo.getName().indexOf("vfw:")<0)continue;
                   Format deviceFormat[] = deviceInfo.getFormats();
                   for (int f=0;f<deviceFormat.length;f++)
                        if(deviceFormat[f] instanceof RGBFormat)type="RGB";
                        if(deviceFormat[f] instanceof YUVFormat)type="YUV";
                        if(deviceFormat[f] instanceof JPEGFormat)type="JPG";
                        Dimension size = ((VideoFormat)deviceFormat[f]).getSize();
                        camImgSize.addElement(type+" "+size.width+"x"+size.height);
                        CapDevice = deviceInfo;
                        camCapDevice.addElement(CapDevice);
                        //System.out.println("Video device = " + deviceInfo.getName());
                        CapFormat = (VideoFormat)deviceFormat[f];
                        camCapFormat.addElement(CapFormat);
                        //System.out.println("Video format = " + deviceFormat[f].toString());
                        VideoFormatMatch=true;     // at least one
              if(VideoFormatMatch==false)
                   if(deviceInfo!=null)System.out.println(deviceInfo);
                   System.out.println("Video Format not found");
                   return false;
              return true;
         * Finds a camera and sets it up
         void fetchDeviceDataSource() //I test it on localhost so I don't change it
              CaptureDeviceInfo CapDevice = (CaptureDeviceInfo)camCapDevice.elementAt(camImgSel);
              System.out.println("Video device = " + CapDevice.getName());
              Format CapFormat = (Format)camCapFormat.elementAt(camImgSel);
              System.out.println("Video format = " + CapFormat.toString());
              try
                   // ensures 30 fps or as otherwise preferred, subject to available cam rates but this is frequency of windows request to stream
                   FormatControl formCont=((CaptureDevice)ds2).getFormatControls()[0];
                   VideoFormat formatVideoNew = new VideoFormat(null,null,-1,null,(float)camFPS);
                   formCont.setFormat(CapFormat.intersects(formatVideoNew));
              catch(Exception e){}
         * Gets a stream from the camera (and sets debug)
         void createPBDSource()
              try
                   pbs=((PushBufferDataSource)ds2).getStreams()[0];
              catch(Exception e){}
         public void createProcessor(DataSource datasource)
              FileTypeDescriptor ftd = new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO);
              Format[] formats = new Format[] {new VideoFormat(VideoFormat.INDEO50)};
              ProcessorModel pm = new ProcessorModel(datasource, formats, ftd);
              try
                   processor = Manager.createRealizedProcessor(pm);
              catch(Exception me)
                   System.out.println(me);
                   // Make sure the capture devices are released
                   datasource.disconnect();
                   return;
         private void startCapture()
              // Get the processor's output, create a DataSink and connect the two.
              DataSource outputDS = processor.getDataOutput();
              try
                   MediaLocator ml = new MediaLocator("file:capture.avi");
                   datasink = Manager.createDataSink(outputDS, ml);
                   datasink.open();
                   datasink.start();
              }catch (Exception e)
                   System.out.println(e);
              processor.start();
              System.out.println("Started saving...");
         private void pauseCapture()
              processor.stop();
         private void resumeCapture()
              processor.start();
         private void stopCapture()
              // Stop the capture and the file writer (DataSink)
              processor.stop();
              processor.close();
              datasink.close();
              processor = null;
              System.out.println("Done saving.");
         }I run method record() from gui, after I received stream.
    IMPORTANT:
         on:           processor.close();
    I have an exception:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.sun.media.multiplexer.video.AVIMux.writeFooter(AVIMux.java:827)
    at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
    at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
    at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at jmonitorserver.engine.Po&#322;&#261;czenie.stopCapture(Po&#322;&#261;czenie.java:684)
    And the video file have 0kb, even during recording
    datasource ds2 is not null.
    any idea?

  • Can two users share the same mac desktop with two different iTunes accounts

    I have a mac desktop, my husband and I share the mailbox for our emails but he has his itunes account on the computer. I have mine on an old mac laptop wHich is not working well any longer. Can I create a second Itunes on the desktop so we could both use the same computer yet keep our music separate

    You can.
    Your home account can have its own hard drive.
    iTunes Media Library can be shared. Or not.
    Even have your own boot drive if needed and you have different applications and configuration.
    The Mac Pro and OS X are designed for multiple users. Not being limited to just one (or two, now that SSDs have found their way into iMac and laptops) has allowed more people to off load their media and data from the boot drive, which is always good.
    How to import, move, and use iTunes
    http://www.apple.com/support/itunes
    and of course the forum for itunes for more troubleshooting

  • The same payment term with two different Day Limit

    Hello Experts,
    I have the same Payment terme AAAA: 45 days, end of the month for two different Day Limit (15 and 31)
    2 calcul mode are possible :
    1/ fixed date :31 + additional months :1
    2/ fixed date :31 + additional months :2
    Actually this is the second method in use and according to the informations I have it should be the first one.
    Then the user for the 16/04/2010 as Baseline date, is expecting the end of May ( 16 + 45 days >> 31th of May > 31/05) But the system calculate it for the 30/06/2010.
    I want to understand the settings and how to correct.
    Thank you in advance

    Hello,
    Need your answers

  • Is it possible to run two different apple tv units on the same network and play two different movies off of my iTunes library

    Is it possible to play two different movies on two seperate apple tv units on two tvs at the same time using the same itunes library

    AC is corret you can do that.  It might work a bit better for you if you use a wired connection vs a wireless one for the ATV's.

Maybe you are looking for

  • 1.4.2_01 released - jws/plugin support?

    FYI - 1.4.2_01 is released and contains a really nifty auto-update feature for Win32 users. I was wondering if anyone had any success with this release wrt autodl - as several posts seemed to imply 1.4.2 wasn't available through Sun's autodl pages ye

  • Files and fonts disappear when I render

    My motion 3 files look fine when I drop them into the FCP timeline but when I render, the fonts disappear and images are just black. I had a previous problem (never solved) where the rendered file would be green but this would resolve itself when I o

  • 11.1.2.3.500.17 - Delete Cell Detail

    Hi community, Is it possible to delete the message detail that is shown when position on it? Thanks in advance!

  • Copying slideshow to CD/DVD

    Is there any way to transfer or copy or backup a complete slideshow made in lightroom to a CD or DVD so that contains photos and music so I could play it on another computer? Anway to save it to Hrd Drive? Thanks. Matthew Kraus

  • IDVD 7.0.2 crashes.  Old tricks don't work

    Hi. I have an older 24" iMac. Had to reload the system. (Had to first load 10.4, then upgrade to 10.5 because my mac came that way.) Since then, iDVD won't open... crashes immediately. I've tried the normal stuff: •plenty of free space on HD •have ta