I'm being electrocuted T.T And Memory Space Problems...

Rubbing my sore fingers -.- When I plugged my iPod into the computer to charge, IT SHOCKED ME and not a short shock like I dropped it my fingers hurt so bad. And I have no idea why this happened, it's not like I'm using a bad cord or something, my iPod was a Christmas gift and I use the cord it came with... If you have any idea why the iTouch would do that or if I have a bad cord or if I'm straight up doing this wrong...
Also...
When I open itunes on my computer while my iTouch is plugged in to charge, and click on my ipod, it says that the ipod can only hold 6.39 gigabites of memory, and I was wondering if that were some sort of glitch or something, because about a week ago I spent an hour on the phone with Apple Tech about ow my iPod was having syncing problems... It said I was using 4. some gigs of memory on videos, but my ipod had no videos(movies/TV shows/even videos I took myself!) at all... So I had to reset to factory settings(loosing about two pages of apps and all my ppersonal settings...).
FYI When I went through that problem, it said I was over my memory by 5 gigs, even though I was only taking up about 5 gigs with the incorrect information included. And every time I deleted more of my things, the higher my "in use" memory would go.
Also
This is really frustrating me because this puts me up to FOUR problems I've had with this one single iPod in no more that two weeks. I am so tired of this stupid thing and am just considering getting a new one.
My first problem
With the shock thing has happened to me with all three of the iPods in my house and I really think that Apple needs to get that fixed bacause it really hurts and I am only 13. I first got shocked when I was 9, and I dont exactly like unplugging the iPods anymore in fear that I will get shocked. So I just unplug it by the USB but I really do think it's a problem...

I think, it is the problem of that sites. not firefox

Similar Messages

  • MSI 785GM-E51 and memory modules problems

     
    Could anyone help me with one problem. I have motherboard MSI 785GM-E51 and 4 memory modules GOODRAM GR 1333D364L9/2G. But when I'm inserting ALL modules my system not starting (even POST procedure). So working variants - when I'm inserting:
    - one module in first (boot) slot
    or
    - they inserted in first and third memory slots
    Any ideas?

    It is not motherboard problem, but processor itself - I have AMD Phenom II X4 965 Black Edition 3,4 Ghz Core Revision C2 and this revision (according to the article: http://www.fcenter.ru/online.shtml?articles/hardware/processors/27650#02) has problems with support memory modules DDR3-1333 Mhz more than 2 modules. Conclusion - either adjust BIOS settings concerning memory timings and memory controller voltage or replace this kind of processor with the same type but with core revision C3

  • Re: MSI 785GM-E51 and memory modules problems -l- Split

    I am using AMD PHENOM II 1055 125w CPU on MSI 785GM-E51.  Memory Corsair XMS3 DDR3-1600 x4
    I can put memory in slot 1 and 3 it will boot fine.
    If I install DDR3 in slot 1 and 2 the system will not boot. If I full populate all the memory slots it will not boot
    In both scenario's after the system does not boot and go back to just using slots 1 and 3 the system boot with CMOS checksum error and need to go in to BIOS setup. All the changes need to be made again, saved and exit and it reboots fine.
    I have already attempted to setup the memory speed to 1333 and 1066 with no luck. Any ideas?
    785GM-E51/BIOS 2A0, Phenom II T1055 @ 2.8 GHz, 125W Stock AMD Heat sink&Fan
    Corsair  2x2GB CMX4GX3M2A1600C9, 9,9,9,24, 1T, 1.47V, 1600 MHz --------- 2 kits
    ESXi 4.1
    Antec 650 Truepower
    ATI x600 PCI-e
    Adaptec AAR-2610A with 5 WD Caviar RE WD2500SD-01KCB0  250GB RAID-5 Configuration
    NEC ND-2501A DVD-Burner

     Topic split, don't hi-jack other peoples topics.  >> Please read and comply with the Forum Rules <<
     Provide more information on your system, read this:  >> Posting Guide <<
     See my signature for example of information to provide.

  • VIXIA HF G30 Power and Memory Card Problems

    While taking video with my G30 using MP4 at the 35Mbps rate in Sports mode, I have encountered two problems.
    First, it will sometimes stop recording and say that the memory card is not fast enough. I'm using a 64GB PNY Elite Performance SDXC UHS-1 Class 10 90MB/sec card that is plenty fast and should work fine.
    Second, I've had the camera freeze up while recording. When this happens, the red "operation" indicator on the screen starts to flash and I am unable to stop recording. Sometimes, after I stop recording, it will not start again. In one case, I had to turn the camera off to get it back to normal. In another case, even turning the camera switch off did nothing, as the camera stayed on but would not respond. I had to remove the battery to get it to turn off.
    Canon's response was as follows: 
    "I believe the memory card may be the cause of this issue. The PNY Elite Performance memory card, while fast enough, also incorporates the UHS-1 standard, which is not supported by this camcorder. I recommend trying a second memory card without the UHS-1 designation."
    However, I checked the Canon list of tested memory cards, and many of them use the UHS-1 standard, so that does not sound like a valid issue.
    Has anyone else had similar issues?

    Update. I bought and used the Sandisk Extreme 32GB cards (45 MB/s) that are recommended by Canon. Unfortunately, I still received some memory save errors due to inadequate speed, although they have been much less frequent. So, the memory card is probably the likely cause for this issue.
    However, I also still had the camera freeze up on me again, which required me to remove the battery. So, I returned the camera and ordered a replacement because I didn't want to find out later that I just happened to get a clunker. The new camera also gave me a couple of memory save errors with the Sandisk memory cards. Eventually, this camera also froze up on me, so apparently this issue may be a more widespread problem with the camera software, not a specific problem with the hardware. 
    I'm pretty sure that every time it froze up I was using the 3 second pre-record feature. I really like the feature since it ensures that I will not miss any action even if I start the camera later than I should. However, if this is causing the problem, I will have to live without it. I have since used the camera for about six hours worth of video recording with no further problems.
    I would recommend that Canon do some more testing, because I suspect that something in the pre-record function is causing intermittent problems. I will provide any updates if it happens again, but I am reluctant to try the pre-record feature again.

  • Life and memory space for static members of a class

    hi,
    as we all know that instance members reside on heap inside object to which they belong, where do the static members reside on the heap or on stack..

    All objects reside on the heap.*
    *I think Java 6 or 7 may allow purely local objects to live on the stack, but if an object is referred to by a member variable--whether static or not--it will live on the heap.                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Internal table's Memory space problem

    Internal table is running out of memory due to the no of records. I am trying to merge the records of two internal tables into third one. and this third internal table runs out of memory.

    Hi,
    There is no limitation to the number of records in an internal table. You can store n number of data in an itab.
    What you can do:
    1. You can use the Pakage size option
    select field1 field2 field3
    from Tablename
    into table it_tablename package size 10000.
    Package size determines the Total # of records that will be picked up in the First loop.
    2. Please check you system size.
    3. Use proper select statements. Avoid SELECT*.
    4. Chek txn: ST22 to view dump analysis.
    5. Chek the code once again for any other reason for error.
    Regards,
    Anjali

  • Zune and reserved space problem

    Hi all, I just started using lumia 710 and finding it a great, fun and highly efficient device. One minor problem I am getting is with zune and reserved storage space.
    If I install a game/app in phone, the reserved space bar increases as expected. But the problem is that, even if I uninstall the game/app, the reserved space bar does not decrase, it stays the same as when the game/app was installed. so if i try out a few apps/ game and remove them later, i lose the equal amount of space from zune media storage. For example I tried out couple of xbox live titles and removed them later, net result --> my reserved space increased ~500mb while i lost 500mb from zune media free space.
    if anyone can help me to sort this out, I will be very much grateful.
    P.S. from phone i see i have ~ 3gb free space out of 6.28 gb. thanks

    Additionaly, I have all my music files in User/Music & in Downloads. I also see my iTunes "Media Folder" is located in User/Music/iTunes and is 20GB...the size itunes says.

  • I can't save a thing, and memory is being stolen? I want to try free "virus scan" app from apple, tho cannot

    Can u help me?

    I can't save a thing, and memory is being stolen? I want to try free "virus scan" app from apple, tho cannot
    Following BookmarkShow 0 Bookmarks Actions

  • Firefox 3.6.8 and memory issues

    After the last update to 3.6.6, I disabled plugin-container per the instructions given on the forum, and my RAM problems went away. However, after the automatic update to 3.6.8, the memory problems came back, with memory usage going up to 92%. I downgraded to 3.6.4, and turned plugin-container off again; while memory usage is currently at 84%, it is not as low as it was before the upgrade to 3.6.8. (79-80%) (There is very little difference in the websites being opened on the various tabs.)
    == This happened ==
    Every time Firefox opened
    == I upgraded to 3.6.8

    ffs guys. It's a free browser. It's cool. We love it. But can we do something about memory issues? Almost every release has huge memory leaks.
    How about halving the release points and focus on memory issues for the other half of the time. I am a long time user since way back in the day and it seems to me that instead of trying to release so many versions, we should be focused more fixing the current release.
    I say put a moratorium on new features until bloat can be fixed. These experiences are starting to give me a hardon for IE again.
    Screw new features. I can deal with plain old tabs like they are. I don't need more bells and whistles. This browser has been kicking ass and taking names for a loonnnggggg time. We don't need more bloat. Keep the security fixes coming but everything else can wait. Take a breath. Stop and smell the roses for a few weeks.

  • Is ther a way to speed up a Mac? Mine has gotten slower and slower over time.  When memory comes close to full would that have an effect on performance? Is there a way to determine unused programs/software to remove and free space?

    Is there a way to speed up a Mac (similar to de-fragging on a PC)? Mine has gotten slower and slower over time. 
    When memory/disc comes close to full would that have an effect on performance? How should I determine what programs/software to remove and free space?

    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with visits to:     OS X Maintenance - MacAttorney;
                                      The X Lab: The X-FAQs;
                                      The Safe Mac » Mac Performance Guide;
                                      The Safe Mac » The myth of the dirty Mac;
                                      Mac maintenance Quick Assist.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    Repair the Hard Drive - Lion/Mountain Lion/Mavericks
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the Utilites Menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD disk icon and click on the arrow button below.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    Note: Alsoft ships DW on a bootable DVD that will startup Macs running Snow Leopard or earlier. It cannot start Macs that came with Lion or later pre-installed, however, DW will work on those models.
    Suggestions for OS X Maintenance
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or later and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive.
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection I recommend using VirusBarrier Express 1.1.6 or Dr.Web Light both from the App Store. They're both free, and since they're from the App Store, they won't destabilize the system. (Thank you to Thomas Reed for these recommendations.)
    Troubleshooting Applications
    I recommend downloading a utility such as TinkerTool System, OnyX, Mavericks Cache Cleaner, or Cocktail that you can use for removing old log files and archives, clearing caches, etc. Corrupted cache, log, or temporary files can cause application or OS X crashes as well as kernel panics.
    If you have Snow Leopard or Leopard, then for similar repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. Applejack does not work with Lion and later.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
        used to manage backups and to restore backups. Time Machine
        requires a backup drive that is at least twice the capacity of the
        drive being backed up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Referenced software can be found at MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Pre-Mavericks
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Mavericks and later
    Open Activity Monitor in the Utilities folder.  Select All Processes from the View menu.  Click on the CPU tab in the toolbar. Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time (>=70,) then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • Thoughts on Stream-to-Disk Application and Memory Fragmentation

    I've been working on a LabVIEW 8.2 app on Windows NT that performs high-speed streaming to disk of data acquired by PXI modules.  I'm running with the PXI-8186 controller with 1GB of RAM, and a Seagate 5400.2 120GB HD.  My current implementation creates a separate DAQmx task for each DAQ module in the 8-slot chassis.  I was initially trying to provide semaphore-protected Write to Binary File access to a single log file to record the data from each module, but I had problems with this once I reached the upper sampling rates of my 6120's, which is 1MS/sec, 16-bit, 4-channels per board.  With the higher sampling rates, I was not able to 'start off' the file streaming without causing the DaqMX input buffers to reach their limit.  I think this might have to do with the larger initial memory allocations that are required.  I have the distinct impression that making an initial request for a bunch of large memory blocks causes a large initial delay, which doesn't work well with a real-time streaming app.
    In an effort to see if I could improve performance, I tried replacing my reentrant file writing VI with a reentrant VI that flattened each module's data record to string and added it to a named queue.  In a parallel loop on the main VI, I am extracting the elements from that queue and writing the flattened strings to the binary file.  This approach seems to give me better throughput than doing the semaphore-controlled write from each module's data acq task, which makes sense, because each task is able to get back to acquiring the data more quickly.
    I am able to achieve a streaming rate of about 25MB/sec, running 3 6120s at 1MS/sec and two 4472s at 1KS/sec.  I have the program set up where I can run multiple data collections in sequence, i.e. acquire for 5 minutes, stop, restart, acquire for 5 minutes, etc.  This keeps the file sizes to a reasonable limit.  When I run in this mode, I can perform a couple of runs, but at some point the memory in Task Manager starts running away.  I have monitored the memory use of the VIs in the profiler, and do not see any of my VIs increasing their memory requirements.  What I am seeing is that the number of elements in the queue starts creeping up, which is probably what eventually causes failure.
    Because this works for multiple iterations before the memory starts to increase, I am left with only theories as to why it happens, and am looking for suggestions for improvement.
    Here are my theories:
    1) As the streaming process continues, the disk writes are occurring on the inner portion of the disk, resulting in less throughput. If this is what is happening, there is no solution other than a HW upgrade.  But how to tell if this is the reason?
    2) As the program continues to run, lots of memory is being allocated/reallocated/deallocated.  The streaming queue, for instance, is shrinking and growing.  Perhaps memory is being fragmented too much, and it's taking longer to handle the large block sizes.  My block size is 1 second of data, which can be up to a 1Mx4x16-bit array from each 6120's DAQmx task.  I tried added a Request Deallocation VI when each DAQmx VI finishes, and this seemed to help between successive collections.  Before I added the VI, task manager would show about 7MB more memory usage than after the previous data collection.  Now it is running about the same each time (until it starts blowing up).  To complicate matters, each flattened string can be a different size, because I am able to acquire data from each DAQ board at a different rate, so I'm not sure preallocating the queue would even matter.
    3) There is a memory leak in part of the system that I cannot monitor (such as DAQmx).  I would think this would manifest itself from the very first collection, though.
    4) There is some threading/threadlocking relationship that changes over time.
    Does anyone have any other theories, or comments about one of the above theories?  If memory fragmentation appears to be the culprit, how can I collect the garbage in a predictable way?

    It sounds like the write is not keeping up with the read, as you suspect.  Your queues can grow in an unbounded fashion, which will eventually fail.  The root cause is that your disk is not keeping up.  At 24MBytes/sec, you may be pushing the hardware performance line.  However, you are not far off, so there are some things you can do to help.
    Fastest disk performance is achieved if the size of the chunks you write to disk is 65,000 bytes.  This may require you to add some double buffering code.  Note that fastest performance may also mean a 300kbyte chunk size from your data acquisition devices.  You will need to optimize and double buffer as necessary.
    Defragment your disk free space before running.  Unfortunately, the native Windows disk defragmentor only defragments the files, leaving them scattered all over the disk.  Norton's disk utilities do a good job of defragmenting the free space, as well.  There are probably other utilities which also do a good job for this.
    Put a monitor on your queues to check the size and alarm if they get too big.  Use the queue status primitive to get this information.  This can tell you how the queues are growing with time.
    Do you really need to flatten to string?  Unless your data acquisition types are different, use the native data array as the queue element.  You can also use multiple queues for multiple data types.  A flatten to string causes an extra memory copy and costs processing time.
    You can use a single-element queue as a semaphore.  The semaphore VIs are implemented with an old technology which causes a switch to the UI thread every time they are invoked.  This makes them somewhat slow.  A single-element queue does not have this problem.  Only use this if you need to go back to a semaphore model.
    Good luck.  Let us know if we can help more.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Mds process shoots up CPU and Memory

    I upgraded to OS X Mavericks about a month ago and ever since, have had to disable Spotlight due to shooting CPU and Memory. The only way to get my Mac to a usable state is to add Macintosh HD to Spotlight privacy list to prevent indexing. The moment I do that, CPU and Memory get to normal.
    Here is what Memory/CPU looks when I am doing nothing on my Mac and all apps are closed:
    mds
    1.76 GB
    6
    195
    349
    root
    100.2
    42.25
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    Yes
    0 bytes
    0 bytes
    0 bytes
    kernel_task
    598.3 MB
    93
    0
    0
    root
    1.7
    17.61
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    No
    0 bytes
    0 bytes
    0 bytes
    com.apple.IconServicesAgent
    116.1 MB
    2
    65
    214
    RockingVegan
    0.0
    0.80
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    Yes
    0 bytes
    0 bytes
    0 bytes
    Finder
    85.5 MB
    6
    296
    165
    RockingVegan
    0.0
    5.99
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    No
    0 bytes
    0 bytes
    0 bytes
    WindowServer
    57.0 MB
    5
    297
    112
    _windowserver
    0.7
    9.27
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    No
    0 bytes
    0 bytes
    0 bytes
    CVMCompiler
    48.3 MB
    2
    38
    233
    RockingVegan
    0.0
    5.06
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    Yes
    0 bytes
    0 bytes
    0 bytes
    mds_stores
    34.9 MB
    3
    60
    248
    root
    0.0
    7.16
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    Yes
    0 bytes
    0 bytes
    0 bytes
    mdworker
    32.9 MB
    4
    62
    351
    RockingVegan
    0.0
    3.81
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    Yes
    0 bytes
    0 bytes
    0 bytes
    mdworker
    31.6 MB
    4
    62
    354
    RockingVegan
    0.0
    3.66
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    Yes
    0 bytes
    0 bytes
    0 bytes
    mdworker
    31.4 MB
    4
    62
    352
    RockingVegan
    0.0
    3.68
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    Yes
    0 bytes
    0 bytes
    0 bytes
    mdworker
    31.3 MB
    4
    62
    353
    RockingVegan
    0.0
    3.67
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    Yes
    Yes
    0 bytes
    0 bytes
    0 bytes
    mds
    100.1
    1:07.13
    8
    1
    349
    root
    2.31 GB
    190
    0 bytes
    0 bytes
    0
    0
    No
    No
    0 bytes
    0 bytes
    0 bytes
    64 bit
    No
    Yes
    0 bytes
    0 bytes
    0 bytes
    Here is what EtreCheck shows: I cleaned up a bunch of stuff based on other such discussions. I see a bunch of User Launch Agents - I deleted these from /Library/User Agents - and rebooted, but these don't seem t go away from the list.
    Hardware Information:
        MacBook Pro (15-inch, Late 2011)
        MacBook Pro - model: MacBookPro8,2
        1 2.4 GHz Intel Core i7 CPU: 4 cores
        8 GB RAM
    Video Information:
        Intel HD Graphics 3000 - VRAM: 512 MB
        AMD Radeon HD 6770M - VRAM: 1024 MB
    Audio Plug-ins:
        BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
        AirPlay: Version: 1.9 - SDK 10.9
        AppleAVBAudio: Version: 2.0.0 - SDK 10.9
        iSightAudio: Version: 7.7.3 - SDK 10.9
    System Software:
        OS X 10.9.1 (13B42) - Uptime: 0 days 0:5:9
    Disk Information:
        Hitachi HTS727575A9E362 disk0 : (750.16 GB)
            EFI (disk0s1) <not mounted>: 209.7 MB
            Macintosh HD (disk0s2) /: 749.3 GB (414.88 GB free)
            Recovery HD (disk0s3) <not mounted>: 650 MB
        MATSHITADVD-R   UJ-8A8 
    USB Information:
        Apple Inc. BRCM2070 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. FaceTime HD Camera (Built-in)
        Apple Computer, Inc. IR Receiver
    FireWire Information:
    Thunderbolt Information:
        Apple Inc. thunderbolt_bus
    Kernel Extensions:
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
    Launch Agents:
    User Launch Agents:
        [failed]    com.apple.CSConfigDotMacCert-[redacted]@me.com-SharedServices.Agent.plist
        [loaded]    com.macpaw.CleanMyMac.trashSizeWatcher.plist
        [failed]    com.spotify.webhelper.plist
        [failed]    com.UninstallerTool.plist
        [failed]    com.VolumeWatcherTool.plist
    User Login Items:
        None
    3rd Party Preference Panes:
        Citrix online plug-in
        Flash Player
        Java
        MusicManager
    Internet Plug-ins::
        Flash Player: Version: 11.9.900.170 - SDK 10.6
        AdobePDFViewer: Version: 10.1.2
        eMusicRemote: Version: (null)
        googletalkbrowserplugin: Version: 4.9.1.16010
        SpeedDownload Browser Plugin: Version: 2.1.2
        iPhotoPhotocast: Version: 7.0
        AmazonMP3DownloaderPlugin1017265: Version: AmazonMP3DownloaderPlugin 1.0.17
        RealPlayer Plugin: Version: Unknown
        Veoh Plugin: Version: 3.0
        DirectorShockwave: Version: 12.0.7r148 - SDK 10.6
        QuickTime Plugin: Version: 7.7.3
        PDF Browser Plugin: Version: 2.4.2 - SDK 10.6
        FlashPlayer-10.6: Version: 11.9.900.170 - SDK 10.6
        CitrixICAClientPlugIn: Version: 11.1.0
        AmazonMP3DownloaderPlugin: Version: AmazonMP3DownloaderPlugin 1.0.17
        npgtpo3dautoplugin: Version: 0.1.44.29 - SDK 10.5
        DivXBrowserPlugin: Version: 2.2
        eMusic: Version: Unknown
        Silverlight: Version: 5.1.20913.0 - SDK 10.6
        Default Browser: Version: 537 - SDK 10.9
        Flip4Mac WMV Plugin: Version: 2.4.4.2
        o1dbrowserplugin: Version: 4.9.1.16010
        SharePointBrowserPlugin: Version: 14.3.9 - SDK 10.6
        JavaAppletPlugin: Version: Java 7 Update 45
    User Internet Plug-ins::
        Move-Media-Player: Version: npmnqmp 071706000001
        iGetterBundle: Version: 2.8.5
        OctoshapeWeb: Version: 1.0
    Bad Fonts:
        None
    Old applications:
        Keynote:    Version: 5.3 - SDK 10.5
            /Applications/iWork '09/Keynote.app
        Microsoft Alerts Daemon:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Alerts Daemon.app
        Microsoft Chart Converter:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Chart Converter.app
        Microsoft Clip Gallery:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Clip Gallery.app
        Microsoft Communicator:    Version: 13.1.3 - SDK 10.5
            /Applications/Microsoft Communicator.app
        Microsoft Database Daemon:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Database Daemon.app
        Microsoft Database Utility:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Database Utility.app
        Microsoft Document Connection:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Microsoft Document Connection.app
        Microsoft Excel:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Microsoft Excel.app
        Microsoft Graph:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Graph.app
        Microsoft Language Register:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Additional Tools/Microsoft Language Register/Microsoft Language Register.app
        Microsoft Office Reminders:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Office Reminders.app
        Microsoft Office Setup Assistant:    Version: 14.2.0 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Office Setup Assistant.app
        Microsoft Outlook:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Microsoft Outlook.app
        Microsoft PowerPoint:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Microsoft PowerPoint.app
        Microsoft Upload Center:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Microsoft Upload Center.app
        Microsoft Word:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Microsoft Word.app
        Music Manager:    Version: 1.0 - SDK 10.5
            /Applications/MusicManager.app
        My Day:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/My Day.app
        Numbers:    Version: 2.3 - SDK 10.5
            /Applications/iWork '09/Numbers.app
        Open XML for Excel:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Open XML for Excel.app
        Pages:    Version: 4.3 - SDK 10.5
            /Applications/iWork '09/Pages.app
        Solver:    Version: 1.0 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/Add-Ins/Solver.app
        SyncServicesAgent:    Version: 14.3.9 - SDK 10.5
            /Applications/Microsoft Office 2011/Office/SyncServicesAgent.app
    Time Machine:
        Mobile backups: OFF
        Auto backup: YES
        Volumes being backed up:
            Macintosh HD: Disk size: 697.84 GB Disk used: 311.45 GB
        Destinations:
            Time Machine Backups [Local] (Last used)
            Total size: 931.19 GB
            Total number of backups: 14
            Oldest backup: 2012-06-30 03:15:51 +0000
            Last backup: 2013-12-18 22:18:59 +0000
            Size of backup disk: Too small
                Backup size 931.19 GB < (Disk used 311.45 GB X 3)
        Time Machine details may not be accurate.
        All volumes being backed up may not be listed.
    Top Processes by CPU:
          100%    mds
            4%    WindowServer
            2%    Activity Monitor
            1%    EtreCheck
            0%    sysmond
    Top Processes by Memory:
        4.40 GB    mds
        115 MB    Finder
        115 MB    com.apple.IconServicesAgent
        66 MB    mds_stores
        57 MB    WindowServer
    Virtual Memory Statistics:
        14 MB    Free RAM
        2.79 GB    Active RAM
        2.78 GB    Inactive RAM
        1.18 GB    Wired RAM
        274 MB    Page-ins
        104 KB    Page-outs

    Step 1:
    Loaded extrinsic user agents:
    com.growl.GrowlLauncher
    com.stellar.VolumeWatcher
    com.stellar.UninstallerTool
    com.spotify.webhelper
    com.macpaw.CleanMyMac.trashSizeWatcher
    Safari extensions:
    DivXHTML5
    Searchme
    Restricted user files: 53
    Extrinsic loadable bundles:
    /System/Library/Extensions/2.2.0/Belcarra.USBLAN_netpart.kext  (com.Belcarra.iokit.USBLAN_netpart)
    /System/Library/Extensions/2.2.0/Belcarra.USBLAN_usbpart.kext  (com.Belcarra.iokit.USBLAN_usbpart)
    /System/Library/Extensions/2.2.0/RemoteControl.USBLAN_usbpart.kext  (com.RemoteControl.USBLAN.usbpart)
    /System/Library/Extensions/3.1.1/Belcarra.USBLAN_netpart.kext  (com.Belcarra.iokit.USBLAN_netpart)
    /System/Library/Extensions/3.1.1/Belcarra.USBLAN_usbpart.kext  (com.Belcarra.iokit.USBLAN_usbpart)
    /System/Library/Extensions/3.1.1/RemoteControl.USBLAN_usbpart.kext  (com.RemoteControl.USBLAN.usbpart)
    /System/Library/Extensions/Belcarra.USBLAN_netpart.kext  (com.Belcarra.iokit.USBLAN_netpart)
    /System/Library/Extensions/Belcarra.USBLAN_usbpart.kext  (com.Belcarra.iokit.USBLAN_usbpart)
    /System/Library/Extensions/daspi.kext  (com.makemkv.kext.daspi)
    /System/Library/Extensions/iavkfs.kext  (com.pctools.iantivirus.kfs)
    /System/Library/Extensions/RemoteControl.USBLAN_usbpart.kext  (com.RemoteControl.USBLAN.usbpart)
    Library/Address Book Plug-Ins/SkypeABDialer.bundle  (com.skype.skypeabdialer)
    Library/Address Book Plug-Ins/SkypeABSMS.bundle  (com.skype.skypeabsms)
    Library/Address Book Plug-Ins/YMsgrCallABPlugin.bundle  (com.yahoo.YMsgrCallABPlugin)
    Library/Address Book Plug-Ins/YMsgrMsnABPlugin.bundle  (com.yahoo.YMsgrMsnABPlugin)
    Library/Address Book Plug-Ins/YMsgrSmsABPlugin.bundle  (com.yahoo.YMsgrSmsABPlugin)
    Library/Address Book Plug-Ins/YMsgrYimABPlugin.bundle  (com.yahoo.YMsgrYimABPlugin)
    Library/Internet Plug-Ins/iGetterBundle.plugin  (com.presenta.iGetterBundle)
    Library/Internet Plug-Ins/Move-Media-Player.plugin  (com.movenetworks.movemediaplayer.plugin)
    Library/Internet Plug-Ins/OctoshapeWeb.plugin  (com.octoshape.browserplugin)
    Library/PreferencePanes/MusicManager.prefPane  (com.google.musicmanager.pref)
    Library/Services/ToastIt.service  (com.roxio.ToastItService)
    /Library/Audio/MIDI Drivers/EmagicUSBMIDIDriver.plugin  (info.emagic.driver.unitor)
    /Library/Internet Plug-Ins/Accel ViewTIFF.bundle  (com.acordex.AccelViewTIFF)
    /Library/Internet Plug-Ins/AdobePDFViewer.plugin  (com.adobe.acrobat.pdfviewer)
    /Library/Internet Plug-Ins/AmazonMP3DownloaderPlugin.plugin  (com.AmazonMP3DownloaderPluginLib.Amazon MP3 Downloader Plugin)
    /Library/Internet Plug-Ins/AmazonMP3DownloaderPlugin1017265.plugin  (com.AmazonMP3DownloaderPluginLib.Amazon MP3 Downloader Plugin)
    /Library/Internet Plug-Ins/CitrixICAClientPlugIn.plugin  (com.citrix.citrixicaclientplugIn)
    /Library/Internet Plug-Ins/DirectorShockwave.plugin  (com.adobe.director_12_0.shockwave.pluginshim)
    /Library/Internet Plug-Ins/DivXBrowserPlugin.plugin  (com.divx.DivXBrowserPlugin)
    /Library/Internet Plug-Ins/eMusicRemote.plugin  (com.emusic.plugins.emp.mac)
    /Library/Internet Plug-Ins/Flash Player.plugin  (com.macromedia.Flash Player.plugin)
    /Library/Internet Plug-Ins/Flip4Mac WMV Plugin.plugin  (net.telestream.wmv.plugin)
    /Library/Internet Plug-Ins/googletalkbrowserplugin.plugin  (com.google.googletalkbrowserplugin)
    /Library/Internet Plug-Ins/JavaAppletPlugin.plugin  (com.oracle.java.JavaAppletPlugin)
    /Library/Internet Plug-Ins/npContributeMac.bundle  (com.adobe.npContributeMacBundle)
    /Library/Internet Plug-Ins/npgtpo3dautoplugin.plugin  (com.google.o3d)
    /Library/Internet Plug-Ins/o1dbrowserplugin.plugin  (com.google.o1dbrowserplugin)
    /Library/Internet Plug-Ins/PDF Browser Plugin.plugin  (com.schubert-it.internet-plugin.pdf)
    /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin  (com.microsoft.sharepoint.browserplugin)
    /Library/Internet Plug-Ins/SharePointWebKitPlugin.webplugin  (com.microsoft.sharepoint.webkitplugin)
    /Library/Internet Plug-Ins/Silverlight.plugin  (com.microsoft.SilverlightPlugin)
    /Library/Internet Plug-Ins/SpeedDownload Browser Plugin.plugin  (com.yazsoft.browserplugin)
    /Library/Internet Plug-Ins/Veoh Plugin.plugin  (com.veoh.plugin)
    /Library/Internet Plug-Ins/Veoh Plugin.webplugin  (com.veoh.webplugin)
    /Library/PreferencePanes/Citrix online plug-in.prefPane  (com.citrix.StandAlone)
    /Library/PreferencePanes/Flash Player.prefPane  (com.adobe.flashplayerpreferences)
    /Library/PreferencePanes/JavaControlPanel.prefPane  (com.oracle.java.JavaControlPanel)
    /Library/QuickTime/SoundboothScoreCodec.component  (com.adobe.SoundboothScoreAudioCodec)
    /Library/ScriptingAdditions/Adobe Unit Types.osax  (No bundle ID)
    /Library/ScriptingAdditions/TotalFinder.osax  (com.binaryage.totalfinder.injector)
    Unsigned shared libraries:
    /usr/lib/libesets.4.dylib
    /usr/lib/libesets_as.4.dylib
    /usr/lib/libsup.dylib
    /usr/local/lib/libavcodec.52.108.0.dylib
    /usr/local/lib/libavcore.0.16.1.dylib
    /usr/local/lib/libavdevice.52.2.3.dylib
    /usr/local/lib/libavfilter.1.74.0.dylib
    /usr/local/lib/libavformat.52.93.0.dylib
    /usr/local/lib/libavutil.50.36.0.dylib
    /usr/local/lib/libfuse_ino64.2.dylib
    /usr/local/lib/libmp3lame.0.dylib
    /usr/local/lib/libntfs-3g.80.dylib
    /usr/local/lib/libntfs.9.0.0.dylib
    /usr/local/lib/libswscale.0.12.0.dylib
    /usr/local/lib/libublio.1.dylib
    Library/LaunchAgents:
    com.UninstallerTool.plist
    com.VolumeWatcherTool.plist
    [email protected]t
    com.macpaw.CleanMyMac.trashSizeWatcher.plist
    com.spotify.webhelper.plist
    /Library/PrivilegedHelperTools:
    com.microsoft.office.licensing.helper
    net.sourceforge.MonolingualHelper
    Library/Fonts:
    Gentium
    GentiumAlt
    TLWHM0NT.TTF
    encodings.dir
    fonts.dir
    fonts.list
    fonts.scale

  • Custom MediaStreamSource and Memory Leaks During SampleRequested

    Greetings,
    I have a nasty memory leak problem that is causing me to pull my hair out.
    I'm implementing a custom MediaStreamSource along with MediaTranscoder to generate video to disk. The frame generation operation occurs in the SampleRequested handler (as in the MediaStreamSource example). No matter what I do - and I've tried a
    ton of options - inevitably the app runs out of memory after a couple hundred frames of HD video. Investigating, I see that indeed GC.GetTotalMemory reports an increasing, and never decreasing, amount of allocated RAM. 
    The frame generator in my actual app is using RenderTargetBitmap to get screen captures, and is handing the buffer to MediaStreamSample.CreateFromBuffer(). However, as you can see in the example below, the issue occurs even with a dumb allocation
    of RAM and no other actual logic. Here's the code:
    void _mss_SampleRequested(Windows.Media.Core.MediaStreamSource sender, MediaStreamSourceSampleRequestedEventArgs args)
    if ( args.Request.StreamDescriptor is VideoStreamDescriptor )
    if (_FrameCount >= 3000) return;
    var videoDeferral = args.Request.GetDeferral();
    var descriptor = (VideoStreamDescriptor)args.Request.StreamDescriptor;
    uint frameWidth = descriptor.EncodingProperties.Width;
    uint frameHeight = descriptor.EncodingProperties.Height;
    uint size = frameWidth * frameHeight * 4;
    byte[] buffer = null;
    try
    buffer = new byte[size];
    // do something to create the frame
    catch
    App.LogAction("Ran out of memory", this);
    return;
    args.Request.Sample = MediaStreamSample.CreateFromBuffer(buffer.AsBuffer(), TimeFromFrame(_FrameCount++, _frameSource.Framerate));
    args.Request.Sample.Duration = TimeFromFrame(1, _frameSource.Framerate);
    buffer = null; // attempt to release the memory
    videoDeferral.Complete();
    App.LogAction("Completed Video frame " + (_FrameCount-1).ToString() + "\n" +
    "Allocated memory: " + GC.GetTotalMemory(true), this);
    return;
    It usually fails around frame 357, with GC.GetTotalMemory() reporting 750MB allocated.
    I've tried tons of work-arounds, none of which made a difference. I tried putting the code that allocates the bytes in a separate thread - no dice.  I tried Task.Delay to give the GC a chance to work, on the assumption that it just had no time
    to do its job. No luck.
    As another experiment, I wanted to see if the problem went away if I allocated memory each frame, but never assigned it to the MediaStreamSample, instead giving the sample (constant) dummy data. Indeed, in that scenario, memory consumption stayed
    constant. However, while I never get an out-of-memory exception, RequestSample just stops getting called around frame 1600 and as a result the transcode operation never actually returns to completion.
    I also tried taking a cue from the SDK sample which uses C++ entirely to generate the frame. So I passed the buffer as a Platform::Array<BYTE> to a static Runtime extension class function I wrote in C++.
    I won't bore you with the C++ code, but even directly copying the bytes of the array to the media sample using memcpy still had the same result! It seems that there is no way to communicate the contents of the byte[] array to the media sample without
    it never being released.
    I know what some will say: the difference between my code and the SDK sample, of course, is that the SDK sample generates the frame _entirely_ in C++, thus taking care of its own memory allocation and deallocation. Because I want to get
    the data from RenderTargetBitmap, this isn't an option for me. (As a side note, if anyone knows if there's a way to get the contents of an RT Window using DirectX, that might work too, but I know this is not a C++ forum, so...). But more importantly,
    MediaStreamSource and MediaStreamSample are managed classes that appear to allow you to generate custom frames using C# or other managed code. The MediaStreamSample.CreateFromBuffer function appears to be tailored for exactly what I want. But there appears
    to be no way to release the buffer when giving the bytes to the MediaStreamSample. At least none that I can find.
    I know the RT version of these classes are new to Windows 8.1, but I did see other posts going back 3 years discussing a similar issue in Silverlight. That never appears to have been resolved.
    I guess the question boils down to this: how do I safely get managed data, allocated during the SampleRequested handler, to the MediaStreamSample without causing a memory leak? Also, why would the SampleRequested handler just stop getting called
    out of the blue, even when I artificially eliminate the memory leak problem?
    Thanks so much for all input!

    Hi Rob - 
    Thanks for your quick reply and for clarifying the terminology. 
    In the Memory Usage test under Analyze/Performance and Diagnostics (is that what you mean?) it's clear that each frame of video being created is not released from memory except when memory consumption gets very high. GC will occasionally kick in, but eventually
    it succumbs.
    Interestingly, if I reduce the frame size substantially, say 320x240, it never runs out of RAM no matter how many frames I throw at it. The Memory Usage test, however, shows the same pattern. But this time the GC can keep up and release the RAM.
    After playing with this ad nauseum,  I am fairly convinced I know what the problem is, but the solution still escapes me. It appears that the Transcoder is requesting frames from the MediaStreamSource (and the MediaStreamSource is providing them via
    my SampleRequested handler) faster than the Transcoder can write them to disk and release them. Why would this be happening? The MediaStreamSource.BufferTime property is - I thought - used to prevent this very problem. However, changing the BufferTime seems
    to have no effect at all - even changing it to ZERO doesn't change anything. If I'm right, this would explain why the GC can't do its job - it can't release the buffers I'm giving to the Transcoder via SampleRequested because the Transcoder won't give them
    up until it's finished transcoding and writing them to disk. And yet the transcoder keeps requesting samples until there's no more memory to create them with.
    The following code, which I made from scratch to illustrate my scenario, should be air-tight according to everything I've read. And yet, it still runs out of memory when the frame size is too large. 
    If you or anyone else can spot the problem in this code, I'd be thrilled to hear it. Maybe I'm omitting a key step with regard to getting the deferral? Or maybe it's a bug in the back-end? Can I "slow down" the transcoder and force it to release samples
    it's already used?
    Anyway here's the new code, which other than App.cs is everything. So if I'm doing something wrong it will be in this module:
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Threading.Tasks;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using System.Diagnostics;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;
    using Windows.UI.Popups;
    using Windows.Storage;
    using Windows.Storage.Pickers;
    using Windows.Storage.Streams;
    using Windows.Media.MediaProperties;
    using Windows.Media.Core;
    using Windows.Media.Transcoding;
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
    namespace MyTranscodeTest
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    MediaTranscoder _transcoder;
    MediaStreamSource _mss;
    VideoStreamDescriptor _videoSourceDescriptor;
    const int c_width = 1920;
    const int c_height = 1080;
    const int c_frames = 10000;
    const int c_frNumerator = 30000;
    const int c_frDenominator = 1001;
    uint _frameSizeBytes;
    uint _frameDurationTicks;
    uint _transcodePositionTicks = 0;
    uint _frameCurrent = 0;
    Random _random = new Random();
    public MainPage()
    this.InitializeComponent();
    private async void GoButtonClicked(object sender, RoutedEventArgs e)
    Windows.Storage.Pickers.FileSavePicker picker = new Windows.Storage.Pickers.FileSavePicker();
    picker.FileTypeChoices.Add("MP4 File", new List<string>() { ".MP4" });
    Windows.Storage.StorageFile file = await picker.PickSaveFileAsync();
    if (file == null) return;
    Stream outputStream = await file.OpenStreamForWriteAsync();
    var transcodeTask = (await this.InitializeTranscoderAsync(outputStream)).TranscodeAsync();
    transcodeTask.Progress = (asyncInfo, progressInfo) =>
    Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
    _ProgressReport.Text = "Sourcing frame " + _frameCurrent.ToString() + " of " + c_frames.ToString() +
    " with " + GC.GetTotalMemory(false).ToString() + " bytes allocated.";
    await transcodeTask;
    MessageDialog dialog = new MessageDialog("Transcode completed.");
    await dialog.ShowAsync();
    async Task<PrepareTranscodeResult> InitializeTranscoderAsync (Stream output)
    _transcoder = new MediaTranscoder();
    _transcoder.HardwareAccelerationEnabled = false;
    _videoSourceDescriptor = new VideoStreamDescriptor(VideoEncodingProperties.CreateUncompressed( MediaEncodingSubtypes.Bgra8, c_width, c_height ));
    _videoSourceDescriptor.EncodingProperties.PixelAspectRatio.Numerator = 1;
    _videoSourceDescriptor.EncodingProperties.PixelAspectRatio.Denominator = 1;
    _videoSourceDescriptor.EncodingProperties.FrameRate.Numerator = c_frNumerator;
    _videoSourceDescriptor.EncodingProperties.FrameRate.Denominator = c_frDenominator;
    _videoSourceDescriptor.EncodingProperties.Bitrate = (uint)((c_width * c_height * 4 * 8 * (ulong)c_frDenominator) / (ulong)c_frNumerator);
    _frameDurationTicks = (uint)(10000000 * (ulong)c_frDenominator / (ulong)c_frNumerator);
    _frameSizeBytes = c_width * c_height * 4;
    _mss = new MediaStreamSource(_videoSourceDescriptor);
    _mss.BufferTime = TimeSpan.FromTicks(_frameDurationTicks);
    _mss.Duration = TimeSpan.FromTicks( _frameDurationTicks * c_frames );
    _mss.Starting += _mss_Starting;
    _mss.Paused += _mss_Paused;
    _mss.SampleRequested += _mss_SampleRequested;
    MediaEncodingProfile outputProfile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Ntsc);
    outputProfile.Audio = null;
    return await _transcoder.PrepareMediaStreamSourceTranscodeAsync(_mss, output.AsRandomAccessStream(), outputProfile);
    void _mss_Paused(MediaStreamSource sender, object args)
    throw new NotImplementedException();
    void _mss_Starting(MediaStreamSource sender, MediaStreamSourceStartingEventArgs args)
    args.Request.SetActualStartPosition(new TimeSpan(0));
    /// <summary>
    /// This is derived from the sample in "Windows 8.1 Apps with Xaml and C# Unleashed"
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="args"></param>
    void _mss_SampleRequested(MediaStreamSource sender, MediaStreamSourceSampleRequestedEventArgs args)
    if (_frameCurrent == c_frames) return;
    var deferral = args.Request.GetDeferral();
    byte[] frameBuffer;
    try
    frameBuffer = new byte[_frameSizeBytes];
    this._random.NextBytes(frameBuffer);
    catch
    throw new Exception("Sample source ran out of RAM");
    args.Request.Sample = MediaStreamSample.CreateFromBuffer(frameBuffer.AsBuffer(), TimeSpan.FromTicks(_transcodePositionTicks));
    args.Request.Sample.Duration = TimeSpan.FromTicks(_frameDurationTicks);
    args.Request.Sample.KeyFrame = true;
    _transcodePositionTicks += _frameDurationTicks;
    _frameCurrent++;
    deferral.Complete();
    Again, I can't see any reason why this shouldn't work. You'll note it mirrors pretty closely the sample in the Windows 8.1 Apps With Xaml Unleashed book (Chapter 14). The difference is I'm feeding the samples to a transcoder rather than a MediaElement (which,
    again should be no issue).
    Thanks again for any suggestions!
    Peter

  • How to find out CPU and memory usage for an instance?

    Hi DBA Gurus,
    How to find out CPU usage and memory usage for an instance?
    Any information is appreciated!
    Thank you!
    Robert

    you can calculate cpu usage by adding fallowing three factors which you can get from v$sysstat
    1. Parse CPU time : This represents the percentage of CPU time spent parsing SQL statements. Parse time CPU can be a strong indication that an application has not been well tuned. High parse time CPU usually indicates that the application may be spending too much time opening and closing cursors or is not using bind variables.
    2. Recursive CPU time : Sometimes, to execute a SQL statement issued by a user, the Oracle Server must issue additional statements. Such statements are called recursive calls or recursive SQL statements. For example, if you insert a row into a table that does not have enough space to hold that row, the Oracle Server makes recursive calls to allocate the space dynamically if dictionary managed tablespaces are being used.
    Recursive calls are also generated due to the inavailability of dictionary info in the dictionary cache, firing of database triggers, execution of DDL, execution of SQL within PL/SQL blocks, functions or stored procedures and enforcement of referential integrity constraints
    3. Other CPU time : This represents the percentage of time spent looking for buffers, fetching rows or index keys, etc. Generally, \"Other\" CPU should represent the highest percentage of CPU time out of the total CPU time used.
    total memory used you can calculate adding
    total_agrigate_area+sga
    memory usage on os level you can know by fallowing commands
    vmstat 5 20 depending upon os

  • Unnesting XML and memory tables

    Post Author: Guy Jeffery
    CA Forum: Data Integration
    Hi,
    I'm having issues with unnesting incoming XML messages within a real time job. The XML is being partially unnested into intermediate memory tables, and the intermediate memory tables are used to populate physical database tables. This works fine on a small scale - if I only have a few physical tables to populate, it works as planned. However, when I increase the complexity of the job, the job will begin to execute and then just stop and 'hang'. There are no error messages, and the log for that job has a blue tick next to it - but the job never completes.
    I've had a look through the technical help file with BODI, and searched this forum, but can't find anything which mentions the situation above. Is it likely to be a memory issue? Or is there some upper limit on the number of objects used within a real time BODI job?
    Has anyone experienced these issues before, and found a resolution? Any suggestions would be greatly appeciated, as I need a solution pretty urgently. Thanks in advance.
    Guy

    Post Author: bhofmans
    CA Forum: Data Integration
    Guy,
    In real-time jobs, the whole job is executed in one al_engine process, this includes all data processing, but also the memory tables. It's started once and stays active the whole time to treat incoming messages.
    This is different for batch jobs where each data flow is a seperate process, and data flows are started in series or parallel depending on the job design, once finished processing they disappear again.
    So for your real-time job this means the whole processing can only use a maximum of 2 GB of memory (upper limit for 32-bit processes). Upgrading to DI 11.7 would give you more options like using pageable cache which will use disk space as additional memory to overcome the 2 GB limitation. But the first thing to check would be the amount of memory used - I'm just assuming here you need more then 2 GB, you can easily check this via the Windows task manager. Which DI versions are you using ? Is this on Windows ?
    - Ben.

Maybe you are looking for

  • Purchase Order Through DTW

    Hi All, I have created a template for purchase order, But while importing its picking only of the items and taking the rest of the amount as negative in the discount field. When I corrected the LineNum in the template, its showing "Cannot retrive tax

  • Problem connecting to OIM instance with the Design Console

    Hello, I've got questions about how to use the design console to connect to an OIM instance. I'm not the one who has set up the instance and the one who did cannot help me much. He did give me root access on the machine though. So first, I'm wonderin

  • I want to get IOS 6.1.4 back

    Hi everyone! I have been having an Iphone 5 for year. I worked fine and great and so smoothly. I enjoy this device. However I had installed few weeks ago IOS 7 and it worked worse than previous one. 1) an Interface is not smooth and does not look gre

  • Attached document in pdf & saving information on it..

    Is it possible to save data on the attachment document within a pdf ( I use a button action/link set to open the "attachment doc" )?? I need to be able to open click on the button to have the credit application open... allow users to fill it out and

  • Photos are not dispayed correctly

    All the pictures taken holding my camera vertically (portrait) are shown on the wrong side on my Iphone even if I rotated them on the computer before, Does anybody have a solution to that? Many thanks