SAPNWRFC SDK 7.11 Memory Leak
I am using the SAPNWRFC library (version 711, patch 86, changelist 1160156) for a .NET-based appliaction (using C#) on a Windows x86 platform.
My problem is that there seems to be memory leak in the SAPNWRFC library when acting as a RFC Client :
Whenver a connection handle becomes invalid due to an ABAP runtime failure or an ABAP message (in these cases the SAP backend system closes the connection ) i am automatically trying to re-establish the client connection using the RfcOpenConnection() methodl. I also use RfcCloseConnection() to make sure that all allocated memory resources are released before i open a new connection via RfcOpenConnection().
But nevertheless everytime the above scenario occurs the memory usage goes up.
Does somebody know how to handle this problem respectively how to release resources allocated to a client connection properly.
I have the same problem. iTunes will eat up 80gb of space if I leave it running; eventually I have to force quit it, and slowly after that the hard drive space returns.
I wasn't sure if it was choking on the search tool, but I have a fairly large library also, so it would make sense.
Anyone got any good fixes for this?
Similar Messages
-
Memory Leak in BI SDK with XMLA Connector ?
Hi,
I am using BI SDK 3.5 with XMLA Connector. I noticed that in com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection class, the LocalTransaction object is rollbacked when the close() method is called.
This makes a call to the endTransaction() method of Repository class with "true" parameter and leads to informations storage into a RepositoryDBMemory instance.
The only way I found to avoid this is to call the endTransaction() method with "false" as parameter, which is what is done in commit() method of the LocalTransaction class.
So, I tried to commit the transaction before closing the connection but in XMLA mode, the getLocalTransaction() method throws an BIResourceException so it is impossible to commit it. This is the first issue.
Second issue: it seems that data hold by the DataSetContentHandler is not freed. I tried using SAP Parser, Xerces, Java Parser but it has no effect. I hava a MDX query that returns 13000 lines, the XML file size is about 15Mo.
In a for loop with 10 operations, it leads to a OutOfMemory error quickly (only 7 iterations OK with -Xmx256m -Xms256m options). On each iteration, the memory grows about 25 to 30Mo !
For the first point, I do not call the close method on the connection object and it is garbage collected (but, in my opinion, it is quite strange not calling the close() method on a connection object).
For the second one (DataSetContentHandler), I have no idea. Has someone already encounter this problem ? The Netbeans profiler tells me it is this object that holds all java.lang.String objects. Is it right ?
I saw in DataSetContentHandler class that it has two static fields: one for the row cursor of the dataset, the other one for column cursor. Why ? Is it OK in a multi-threaded context ?
<b>This is urgent as we will not put the project in production mode with such a memory leak ! We must find the problem very quickly.</b>
Thanks in advance for any help you might give to me !
Regards,
David Degardin (Ubik-Ingenierie)I found the same thing. Tracing the execution back I found the only place this function was called was as part of the setup, so you shouldn't have to worry about it getting called multiple times and leaking memory. The trouble seems to be when the AudioPlayer dealloc method is called, the memory is not cleaned up.
My fix was to modify the dealloc in AudioQueueObject to check to see if audioLevels is nil and, if not, free it. This seems to have fixed the problem. -
Hi,
I've recently launched an application that interacts with Lync Clients using Lync SDK (2010 or 2013)
It seems to me I've done something very wrong, because once I'm attached to the Lync SDK, the process memory starts growing without any limit. I wrote a basic test application to debug this, but the memory still seems to be leaking. The process used memory
grows by 100-300 KB for every conversation added - even though i do not even subscribe to any Lync events. I doubt this leak has a limit, bug I stopped checking at ~120MB
Call to the .NET Garbage Collector does not seem to solve this.
Here is the code I am using to test this:
class Program
static LyncClient _LyncClient;
static void Main(string[] args)
_LyncClient = LyncClient.GetClient();
Console.ReadLine();
Has anyone noticed this leak before?
Thanks,The history actually relates to an accessor method. I seemed to have misunderstood the documentation ("Accessor Methods"), the retain shouldn't be there.
I'll give it ago without retain and see what happens. -
SslIoRead memory leak in NSOutputStream (iPhone SDK)
Hi, I am using NSOutputStream to write email to smtp server. I used TLSv1 as security protocol. I found that everytime I open such a output stream and output as TLSv1, there is about 36k memory leak from a call "sslIoRead". Perfermance tool aslo link it to something like this in the code:
[outputStream setProperty:NSStreamSocketSecurityLevelTLSv1 forKey:NSStreamSocketSecurityLevelKey]
Anyone as the same experience, how can I fix it?
Thank you very much.Added code in a more readable fashion:
CGImageRef blockRef = CGImageCreateWithImageInRect([img CGImage], CGRectMake(imgWidth - clipx, clipy,texsize,texsize));
CGContextRef spriteContext = CGBitmapContextCreate(spriteData, tex_size, tex_size, 8, tex_size * 4, CGImageGetColorSpace(blockRef), kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CGContextDrawImage(spriteContext, CGRectMake(0,0,(CGFloat)tex_size, (CGFloat)tex_size), blockRef);
glGenTextures(1, &texref);
glBindTexture(GLTEXTURE2D, texref);
glTexImage2D(GLTEXTURE2D, 0, GL_RGBA, 512, 512, 0, GL_RGBA, GLUNSIGNEDBYTE, spriteData);
glTexParameterx(GLTEXTURE2D, GLTEXTURE_MINFILTER, GL_LINEAR);
glTexParameterx(GLTEXTURE2D, GLTEXTURE_MAGFILTER, GL_LINEAR);
CGImageRelease(blockRef);
CGContextRelease(spriteContext); -
Memory Leaks Unresponsive Mouse
2009 8 core Mac Pro w/ 24 GB of RAM, ATI Radeon 4870, and a SeriTek PCIe eSATA card (card only has drives connected when running a manual drive clone). When running Toast 10 or Parallels 9, my RAM will fill up (I use a program called Menu Meters to monitor stuff). This machine worked just fine under OS 10.9 and earlier - no issues like this at all. ClamXAV will also completely fill the RAM up (the meter will be full green, instead of part green, then mostly grey when Toast or Parallels fills it up). I have to use Terminal to purge it so that the machine is usable.
The other thing that happens is that sometimes when the computer wakes up or I am in the middle of doing something, the mouse will still move, but the dock will not pop open and the left button the mouse doesn't respond. The right button will open the right click menu, but will not respond normally at all. I have tried a different Magic Mouse, but the problem is the same.
I thought that it may be a problem with the factory RAM and the Kingston RAM not playing nicely together. So I ran it with just the factory 8 GB and then ran it with the Kingston 16 GB - the problem persists no matter which RAM is installed. All of the RAM also passes the memory tests in Rember and TechTool.
So, I need to find out if someone thinks that maybe the bluetooth module may be going bad causing the mouse issues. I also need to find out what is causing the memory leaks. I followed the steps that someone gave on this site to boot into safe mode, repair permissions, reset PRAM, then reset SMC (or the other way around - I did it like they said to). It did nothing to fix the problem.
I need some guidance here. As I stated early on, the machine worked perfectly with OS 10.9. I have WAY too much software that I use, so doing a completely fresh install is out of the question - I don't have time to reload everything. This problem is annoying and I know that I am not the only one having these issues. Any input will be greatly appreciated. Thanks in advance.Here is the EtreCheck report:
Problem description:
Memory leaks when using Toast 10 or Parallels 9. Mouse also become unresponsive (it will move, but left button does not work and dock will not pop open - mouse problem happens independent of the RAM being filled up - different mouse was tried with same result).
EtreCheck version: 2.1.5 (108)
Report generated January 9, 2015 at 9:20:59 PM MST
Click the [Support] links for help with non-Apple products.
Click the [Details] links for more information about that line.
Click the [Adware] links for help removing adware.
Hardware Information: ℹ️
Mac Pro (Early 2009) (Verified)
Mac Pro - model: MacPro4,1
2 2.26 GHz Quad-Core Intel Xeon CPU: 8-core
24 GB RAM Upgradeable
DIMM 1
4 GB DDR3 ECC 1066 MHz ok
DIMM 2
4 GB DDR3 ECC 1066 MHz ok
DIMM 3
2 GB DDR3 ECC 1066 MHz ok
DIMM 4
2 GB DDR3 ECC 1066 MHz ok
DIMM 5
4 GB DDR3 ECC 1066 MHz ok
DIMM 6
4 GB DDR3 ECC 1066 MHz ok
DIMM 7
2 GB DDR3 ECC 1066 MHz ok
DIMM 8
2 GB DDR3 ECC 1066 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en2: 802.11 a/b/g/n
Video Information: ℹ️
ATI Radeon HD 4870 - VRAM: 512 MB
AL2216W 1680 x 1050 @ 60 Hz
System Software: ℹ️
OS X 10.10.1 (14B25) - Uptime: 2:4:35
Disk Information: ℹ️
HL-DT-ST BD-RE WH12LS39
HL-DT-ST DVDRAM GH24NS90
SAMSUNG HD103SJ disk1 : (1 TB)
EFI (disk1s1) <not mounted> : 210 MB
OS 10.10.1 (disk1s2) / : 999.35 GB (410.30 GB free)
Recovery HD (disk1s3) <not mounted> [Recovery]: 650 MB
SAMSUNG HD103SJ disk2 : (1 TB)
EFI (disk2s1) <not mounted> : 210 MB
Extra Storage (disk2s2) /Volumes/Extra Storage : 999.86 GB (554.20 GB free)
SAMSUNG HD103SJ disk3 : (1 TB)
EFI (disk3s1) <not mounted> : 210 MB
Extra Storage 2 - Scratch (disk3s2) /Volumes/Extra Storage 2 - Scratch : 999.86 GB (39.54 GB free)
WDC WD5001AALS-00LWTA0 disk0 : (500.11 GB)
EFI (disk0s1) <not mounted> : 210 MB
BOOTCAMP (disk0s2) /Volumes/BOOTCAMP : 499.90 GB (275.71 GB free)
USB Information: ℹ️
Shuttle Technology Inc. E-USB Bridge
Sony C6606
Apple, Inc. Keyboard Hub
Apple Inc. Apple Keyboard
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Firewire Information: ℹ️
Apple Computer, Inc. iSight 200mbit - 400mbit max
Gatekeeper: ℹ️
Anywhere
Kernel Extensions: ℹ️
/Applications/Hotspot Shield.app
[not loaded] com.anchorfree.tun (1.0) [Support]
/Applications/Parallels Desktop.app
[not loaded] com.parallels.kext.hidhook (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.hypervisor (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.netbridge (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.usbconnect (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.vnic (9.0 24251.1052177) [Support]
/Applications/TechTool Deluxe.app
[not loaded] com.micromat.iokit.ttpatadriver (5.0.0) [Support]
[not loaded] com.micromat.iokit.ttpfwdriver (5.0.0) [Support]
/Applications/TechTool Protogo/Protogo Applications/TechTool Pro 7.app
[not loaded] com.micromat.driver.spdKernel (1 - SDK 10.8) [Support]
[not loaded] com.micromat.driver.spdKernel-10-8 (1 - SDK 10.8) [Support]
/Applications/Temperature Monitor 4.94/Temperature Monitor 4.94.app
[not loaded] com.bresink.driver.BRESINKx86Monitoring (8.0) [Support]
/Applications/Toast 11 Titanium/Spin Doctor.app
[not loaded] com.hzsystems.terminus.driver (4) [Support]
/Applications/Toast 7 Titanium/Toast Titanium.app
[not loaded] com.roxio.TDIXController (1.6) [Support]
/Library/Extensions
[loaded] at.obdev.nke.LittleSnitch (4216 - SDK 10.8) [Support]
/System/Library/Extensions
[loaded] com.SiliconImage.driver.Si3132 (1.2.5) [Support]
[not loaded] com.devguru.driver.SamsungComposite (1.2.63 - SDK 10.6) [Support]
[not loaded] com.microsoft.driver.MicrosoftMouse (8.2) [Support]
[not loaded] com.roxio.BluRaySupport (1.1.6) [Support]
/System/Library/Extensions/MicrosoftMouse.kext/Contents/PlugIns
[not loaded] com.microsoft.driver.MicrosoftMouseBluetooth (8.2) [Support]
[not loaded] com.microsoft.driver.MicrosoftMouseUSB (8.2) [Support]
/System/Library/Extensions/ssuddrv.kext/Contents/PlugIns
[not loaded] com.devguru.driver.SamsungACMControl (1.2.63 - SDK 10.6) [Support]
[not loaded] com.devguru.driver.SamsungACMData (1.2.63 - SDK 10.6) [Support]
[not loaded] com.devguru.driver.SamsungMTP (1.2.63 - SDK 10.5) [Support]
[not loaded] com.devguru.driver.SamsungSerial (1.2.63 - SDK 10.6) [Support]
Startup Items: ℹ️
HP IO: Path: /Library/StartupItems/HP IO
SiCoreService: Path: /Library/StartupItems/SiCoreService
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[running] at.obdev.LittleSnitchUIAgent.plist [Support]
[loaded] com.coupons.coupond.plist [Support]
[running] com.micromat.TechToolProAgent.plist [Support]
[loaded] com.oracle.java.Java-Updater.plist [Support]
[invalid?] com.parallels.mobile.prl_deskctl_agent.launchagent.plist [Support]
[invalid?] com.parallels.mobile.startgui.launchagent.plist [Support]
[not loaded] com.teamviewer.teamviewer.plist [Support]
[not loaded] com.teamviewer.teamviewer_desktop.plist [Support]
Launch Daemons: ℹ️
[running] at.obdev.littlesnitchd.plist [Support]
[loaded] com.adobe.fpsaud.plist [Support]
[loaded] com.bombich.ccc.plist [Support]
[loaded] com.hp.lightscribe.plist [Support]
[running] com.micromat.TechToolProDaemon.plist [Support]
[loaded] com.microsoft.office.licensing.helper.plist [Support]
[loaded] com.oracle.java.Helper-Tool.plist [Support]
[invalid?] com.parallels.mobile.dispatcher.launchdaemon.plist [Support]
[failed] com.parallels.mobile.kextloader.launchdaemon.plist [Support] [Details]
[not loaded] com.teamviewer.teamviewer_service.plist [Support]
User Launch Agents: ℹ️
[loaded] com.facebook.videochat.[redacted].plist [Support]
[loaded] com.google.keystone.agent.plist [Support]
[running] com.nchsoftware.expressinvoice.agent.plist [Support]
[loaded] uk.co.markallan.clamxav.clamscan.plist [Support]
[loaded] uk.co.markallan.clamxav.freshclam.plist [Support]
User Login Items: ℹ️
iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
SMARTReporter Application (/Applications/SMARTReporter/SMARTReporter.app)
BetterSnapTool Application (/Applications/BetterSnapTool.app)
smcFanControl Application (/Applications/smcfancontrol_2_2_2/smcFanControl.app)
Android File Transfer Agent Application (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
Internet Plug-ins: ℹ️
JavaAppletPlugin: Version: Java 8 Update 25 Check version
FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
Default Browser: Version: 600 - SDK 10.10
AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 [Support]
CouponPrinter-FireFox_v2: Version: 5.0.3 - SDK 10.6 [Support]
AdobePDFViewer: Version: 11.0.06 - SDK 10.6 [Support]
Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
QuickTime Plugin: Version: 7.7.3
SharePointBrowserPlugin: Version: 14.4.6 - SDK 10.6 [Support]
iPhotoPhotocast: Version: 7.0 - SDK 10.8
Safari Extensions: ℹ️
AdBlock [Installed]
F.B. Purity - Cleans Up Facebook [Installed]
OpenIE [Installed]
3rd Party Preference Panes: ℹ️
Déjà Vu [Support]
Flash Player [Support]
FUSE for OS X (OSXFUSE) [Support]
Java [Support]
MacFUSE [Support]
MenuMeters [Support]
Microsoft Mouse [Support]
MouseLocator [Support]
NTFS-3G [Support]
TechTool Protection [Support]
Time Machine: ℹ️
Time Machine not configured!
Top Processes by CPU: ℹ️
48% plugin-container
39% fontd
6% firefox
5% WindowServer
4% bluetoothaudiod
Top Processes by Memory: ℹ️
928 MB firefox
412 MB plugin-container
258 MB mds_stores
180 MB iTunes
129 MB Finder
Virtual Memory Information: ℹ️
19.38 GB Free RAM
3.11 GB Active RAM
1.88 GB Inactive RAM
1.38 GB Wired RAM
2.40 GB Page-ins
0 B Page-outs
Diagnostics Information: ℹ️
Jan 9, 2015, 07:16:57 PM Self test - passed
Jan 8, 2015, 11:37:48 AM /Library/Logs/DiagnosticReports/ClamXav_2015-01-08-113748_[redacted].cpu_resour ce.diag [Details]
Jan 8, 2015, 11:21:46 AM /Users/[redacted]/Library/Logs/DiagnosticReports/Preview_2015-01-08-112146_[red acted].crash -
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 -
We are implementing an AIR application that loads thumbnails
from the hard drive and uploads them to a remote server.
When bringing in large images, for example, when importing
five 2MB files into Image objects:
Flex reports that it is using 55MB
Windows reports using 220 Meg (viewing memory usage of
adl.exe in task manager)
After deletion of these image objects, the memory stays
allocated!! It is released when the application is closed.
Two issues I see:
1. Huge memory usage for image objects (I understand that JPG
files are exploded into BMPs). It limits our ability to load 10's
or 100's of images.
2. Bad Memory leak
OTHER THINGS WE TRIED:
1. Displaying images as inline html IMG tags.. Same memory
usage!
2. Taking a snapshot of the image and displaying that.
Problem, used way to much CPU
I hope these issues will be fixed before release time or we
are hosed.
PLATFORM: Windows XP Professional, service pack 2Hi
Have you tried the FB3 profiler to investigate why memory is
not getting deallocated?
You can use the loitering objects panel to track the back
references for the objects in memory. If you find that image object
is not being referenced by anything else. Can you file a bug at
http://bugs.adobe.com/flex
with a small test case.
Also as you know that jpg will be translated into bitmap. The
amount of memory required will be determined by the pixels in the
image. Each pixel will be 4K
Thanks,
Gaurav Jain
Flex SDK Team -
Panic 4, memory leak ?
Hello
The past days ever since i installed memory clean ultie from the appstore and did a clean my macbook
seems to crash right after i did the memory clean i removed the program from my applications
so i dont know wether this is actually the problem of it or something else,
could someone please help me
Thanks
Anonymous UUID: 994A3363-0967-182E-8576-4F17EFE52307
Thu Mar 5 10:34:30 2015
*** Panic Report ***
panic(cpu 4 caller 0xffffff802df6f8f5): "zalloc: zone map exhausted while allocating from zone kalloc.8192, likely due to memory leak in zone vm objects (1555451040 total bytes, 6481032 elements allocated)"@/SourceCache/xnu/xnu-2782.10.72/osfmk/kern/zalloc.c:2521
Backtrace (CPU 4), Frame : Return Address
0xffffff813c20bc00 : 0xffffff802df2fe41
0xffffff813c20bc80 : 0xffffff802df6f8f5
0xffffff813c20bdb0 : 0xffffff802df38581
0xffffff813c20bde0 : 0xffffff802df17f70
0xffffff813c20be10 : 0xffffff802df33f27
0xffffff813c20be40 : 0xffffff802df18a93
0xffffff813c20be90 : 0xffffff802df293bd
0xffffff813c20bf10 : 0xffffff802e0059fa
0xffffff813c20bfb0 : 0xffffff802e036ea6
BSD process name corresponding to current thread: fontworker
Mac OS version:
14C109
Kernel version:
Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64
Kernel UUID: DCF5C2D5-16AE-37F5-B2BE-ED127048DFF5
Kernel slide: 0x000000002dc00000
Kernel text base: 0xffffff802de00000
__HIB text base: 0xffffff802dd00000
System model name: MacBookPro10,1 (Mac-C3EC7CD22292981F)
System uptime in nanoseconds: 14888473755958
vm objects:1555451040
vm object hash entri:253897840
VM map entries:522873920
pv_list:34381824
vm pages:130325312
kalloc.16:101163568
kalloc.32:1205568
kalloc.64:5640768
kalloc.128:7450624
kalloc.256:5550080
kalloc.512:121769984
kalloc.1024:3108864
kalloc.2048:2310144
kalloc.4096:3276800
kalloc.8192:9052160
mem_obj_control:101560272
ipc ports:2876000
threads:1572000
x86 fpsave state:1101568
uthreads:1075200
vnodes:11085360
namecache:2863968
HFS node:14616336
HFS fork:4448256
decmpfs_cnode:1233792
ubc_info zone:2794704
vnode pager structur:1272600
compressor_pager:404197376
compressor_segment:5669424
Kernel Stacks:2654208
PageTables:174948352
Kalloc.Large:33339717
Backtrace suspected of leaking: (outstanding bytes: 385680)
0xffffff802df6fcf6
0xffffff802dfb654d
0xffffff802dfaa435
0xffffff802df9ca95
0xffffff802e01a974
last loaded kext at 7107757443: com.apple.driver.AppleGraphicsDevicePolicy 3.7.7 (addr 0xffffff7fb0b33000, size 45056)
last unloaded kext at 152019224354: com.apple.iokit.IOEthernetAVBController 1.0.3b3 (addr 0xffffff7faf5ae000, size 28672)
loaded kexts:
com.avatron.AVExFramebuffer 1.7
com.avatron.AVExVideo 1.7
com.globaldelight.driver.BoomDevice 1.1
com.driver.LogJoystick 2.0
com.apple.driver.AppleHWSensor 1.9.5d0
com.apple.filesystems.autofs 3.0
com.apple.driver.AGPM 100.15.5
com.apple.driver.ApplePlatformEnabler 2.1.7d1
com.apple.driver.X86PlatformShim 1.0.0
com.apple.driver.AudioAUUC 1.70
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.3.2f6
com.apple.iokit.IOBluetoothSerialManager 4.3.2f6
com.apple.driver.AppleMikeyHIDDriver 124
com.apple.driver.AppleOSXWatchdog 1
com.apple.driver.AppleMikeyDriver 269.25
com.apple.driver.AppleHDA 269.25
com.apple.driver.AppleUpstreamUserClient 3.6.1
com.apple.driver.AppleMCCSControl 1.2.11
com.apple.GeForce 10.0.2
com.apple.driver.AppleLPC 1.7.3
com.apple.driver.AppleSMCLMU 2.0.7d0
com.apple.driver.AppleMuxControl 3.8.6
com.apple.driver.AppleSMCPDRC 1.0.0
com.apple.driver.AppleThunderboltIP 2.0.2
com.apple.driver.AppleIntelHD4000Graphics 10.0.2
com.apple.driver.AppleIntelFramebufferCapri 10.0.2
com.apple.iokit.IOUserEthernet 1.0.1
com.apple.Dont_Steal_Mac_OS_X 7.0.0
com.apple.driver.AppleHWAccess 1
com.apple.driver.AppleHV 1
com.apple.driver.AppleUSBTCButtons 240.2
com.apple.driver.AppleUSBTCKeyboard 240.2
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 35
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCIBlockStorage 2.7.0
com.apple.driver.AppleUSBHub 705.4.2
com.apple.driver.AppleSDXC 1.6.5
com.apple.driver.AirPort.Brcm4360 910.26.12
com.apple.driver.AppleAHCIPort 3.1.0
com.apple.driver.AppleUSBEHCI 705.4.14
com.apple.driver.AppleUSBXHCI 710.4.11
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleACPIButtons 3.1
com.apple.driver.AppleRTC 2.0
com.apple.driver.AppleHPET 1.8
com.apple.driver.AppleSMBIOS 2.1
com.apple.driver.AppleACPIEC 3.1
com.apple.driver.AppleAPIC 1.7
com.apple.driver.AppleIntelCPUPowerManagementClient 218.0.0
com.apple.nke.applicationfirewall 161
com.apple.security.quarantine 3
com.apple.security.TMSafetyNet 8
com.apple.driver.AppleIntelCPUPowerManagement 218.0.0
com.apple.kext.triggers 1.0
com.apple.iokit.IOBluetoothHostControllerUSBTransport 4.3.2f6
com.apple.iokit.IOSerialFamily 11
com.apple.driver.DspFuncLib 269.25
com.apple.kext.OSvKernDSPLib 1.15
com.apple.driver.AppleSMBusController 1.0.13d1
com.apple.driver.AppleHDAController 269.25
com.apple.iokit.IOHDAFamily 269.25
com.apple.driver.AppleSMBusPCI 1.0.12d1
com.apple.nvidia.driver.NVDAGK100Hal 10.0.2
com.apple.nvidia.driver.NVDAResman 10.0.2
com.apple.driver.AppleBacklightExpert 1.1.0
com.apple.driver.AppleGraphicsControl 3.8.6
com.apple.driver.X86PlatformPlugin 1.0.0
com.apple.driver.IOPlatformPluginFamily 5.8.1d38
com.apple.iokit.IONDRVSupport 2.4.1
com.apple.iokit.IOAcceleratorFamily2 156.6
com.apple.AppleGraphicsDeviceControl 3.8.6
com.apple.iokit.IOSurface 97
com.apple.iokit.IOGraphicsFamily 2.4.1
com.apple.iokit.IOBluetoothFamily 4.3.2f6
com.apple.driver.AppleSMC 3.1.9
com.apple.iokit.IOAudioFamily 203.3
com.apple.vecLib.kext 1.2.0
com.apple.iokit.IOSCSIArchitectureModelFamily 3.7.3
com.apple.iokit.IOUSBUserClient 705.4.0
com.apple.driver.AppleUSBMultitouch 245.2
com.apple.iokit.IOUSBHIDDriver 705.4.0
com.apple.driver.AppleUSBMergeNub 705.4.0
com.apple.driver.AppleUSBComposite 705.4.9
com.apple.driver.CoreStorage 471.10.6
com.apple.driver.AppleThunderboltDPInAdapter 4.0.6
com.apple.driver.AppleThunderboltDPAdapterFamily 4.0.6
com.apple.driver.AppleThunderboltPCIDownAdapter 2.0.2
com.apple.driver.AppleThunderboltNHI 3.1.7
com.apple.iokit.IOThunderboltFamily 4.2.1
com.apple.iokit.IO80211Family 710.55
com.apple.driver.mDNSOffloadUserClient 1.0.1b8
com.apple.iokit.IONetworkingFamily 3.2
com.apple.iokit.IOAHCIFamily 2.7.5
com.apple.iokit.IOUSBFamily 710.4.14
com.apple.driver.AppleEFINVRAM 2.0
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.driver.AppleEFIRuntime 2.0
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 300.0
com.apple.kext.AppleMatch 1.0.0d1
com.apple.driver.AppleKeyStore 2
com.apple.driver.AppleMobileFileIntegrity 1.0.5
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.DiskImages 396
com.apple.iokit.IOStorageFamily 2.0
com.apple.iokit.IOReportFamily 31
com.apple.driver.AppleFDEKeyStore 28.30
com.apple.driver.AppleACPIPlatform 3.1
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOACPIFamily 1.4
com.apple.kec.Libm 1
com.apple.kec.pthread 1
com.apple.kec.corecrypto 1.0
Model: MacBookPro10,1, BootROM MBP101.00EE.B07, 4 processors, Intel Core i7, 2.7 GHz, 8 GB, SMC 2.3f36
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (7.15.159.13.12)
Bluetooth: Version 4.3.2f6 15235, 3 services, 19 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM256E, 251 GB
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4those programs i removed alll but boom but i deaxtivated i found out my memory seems to be high my, frontworker is at 5.47 gb in memory
here is some details of a etrecheck
Problem description:
frontworker
kernel_task
EtreCheck version: 2.1.8 (121)
Report generated 5 Mar 2015 11:26:00 GMT+10
Download EtreCheck from http://etresoft.com/etrecheck
Click the [Click for support] links for help with non-Apple products.
Click the [Click for details] links for more information about that line.
Hardware Information: ℹ️
MacBook Pro (Retina, 15-inch, Early 2013) (Technical Specifications)
MacBook Pro - model: MacBookPro10,1
1 2.7 GHz Intel Core i7 CPU: 4-core
8 GB RAM Not upgradeable
BANK 0/DIMM0
4 GB DDR3 1600 MHz ok
BANK 1/DIMM0
4 GB DDR3 1600 MHz ok
Bluetooth: Good - Handoff/Airdrop2 supported
Wireless: en0: 802.11 a/b/g/n
Battery Health: Normal - Cycle count 25
Video Information: ℹ️
Intel HD Graphics 4000
Color LCD spdisplays_2880x1800Retina
NVIDIA GeForce GT 650M - VRAM: 1024 MB
System Software: ℹ️
OS X 10.10.2 (14C109) - Time since boot: 0:51:19
Disk Information: ℹ️
APPLE SSD SM256E disk0 : (251 GB)
EFI (disk0s1) <not mounted> : 210 MB
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
Macintosh HD (disk1) / : 249.77 GB (147.49 GB free)
Encrypted AES-XTS Unlocked
Core Storage: disk0s2 250.14 GB Online
USB Information: ℹ️
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Thunderbolt Information: ℹ️
Apple Inc. thunderbolt_bus
Gatekeeper: ℹ️
Anywhere
Kernel Extensions: ℹ️
/Library/Extensions
[loaded] com.avatron.AVExFramebuffer (1.7 - SDK 10.9) [Click for support]
[loaded] com.avatron.AVExVideo (1.7 - SDK 10.9) [Click for support]
[loaded] com.driver.LogJoystick (2.0 - SDK 10.8) [Click for support]
[not loaded] com.logitech.driver.LogiGamingMouseFilter (1 - SDK 10.8) [Click for support]
[not loaded] com.razer.common.razerhid (10.85 - SDK 10.9) [Click for support]
[not loaded] foo.tap (1.0) [Click for support]
[not loaded] foo.tun (1.0) [Click for support]
[not loaded] org.virtualbox.kext.VBoxDrv (4.2.12) [Click for support]
[not loaded] org.virtualbox.kext.VBoxNetAdp (4.2.12) [Click for support]
[not loaded] org.virtualbox.kext.VBoxNetFlt (4.2.12) [Click for support]
[not loaded] org.virtualbox.kext.VBoxUSB (4.2.12) [Click for support]
/System/Library/Extensions
[loaded] com.globaldelight.driver.BoomDevice (1.1 - SDK 10.9) [Click for support]
/Users/[redacted]/Library/Services/ToastIt.service/Contents/MacOS
[not loaded] com.roxio.TDIXController (2.0) [Click for support]
Startup Items: ℹ️
tap: Path: /Library/StartupItems/tap
tun: Path: /Library/StartupItems/tun
VirtualBox: Path: /Library/StartupItems/VirtualBox
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[loaded] com.divx.dms.agent.plist [Click for support]
[loaded] com.divx.update.agent.plist [Click for support]
[loaded] com.oracle.java.Java-Updater.plist [Click for support]
[running] com.razer.rzupdater.plist [Click for support]
[running] com.razerzone.rzdeviceengine.plist [Click for support]
[not loaded] com.teamviewer.teamviewer.plist [Click for support]
[not loaded] com.teamviewer.teamviewer_desktop.plist [Click for support]
[failed] org.macosforge.xquartz.startx.plist [Click for support]
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist [Click for support]
[loaded] com.github.dnscrypt-osxclient.DNSCryptAfterboot.plist [Click for support]
[failed] com.github.dnscrypt-osxclient.DNSCryptConsoleChange.plist [Click for support]
[loaded] com.github.dnscrypt-osxclient.DNSCryptControlChange.plist [Click for support]
[loaded] com.github.dnscrypt-osxclient.DNSCryptNetworkChange.plist [Click for support]
[loaded] com.oracle.java.Helper-Tool.plist [Click for support]
[loaded] com.oracle.java.JavaUpdateHelper.plist [Click for support]
[loaded] com.teamviewer.Helper.plist [Click for support]
[not loaded] com.teamviewer.teamviewer_service.plist [Click for support]
[loaded] net.sourceforge.MonolingualHelper.plist [Click for support]
[loaded] org.macosforge.xquartz.privileged_startx.plist [Click for support]
User Launch Agents: ℹ️
[loaded] com.adobe.ARM.[...].plist [Click for support]
[loaded] com.valvesoftware.steamclean.plist [Click for support]
[not loaded] org.virtualbox.vboxwebsrv.plist [Click for support]
User Login Items: ℹ️
iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
Flux Application (/Applications/Flux.app)
SpeechSynthesisServer Application (/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks /SpeechSynthesis.framework/Versions/A/SpeechSynthesisServer.app)
MacLWSLauncher UNKNOWN (missing value)
Spark Daemon Application Hidden (/Users/[redacted]/Documents/Software/Spark.app/Contents/SharedSupport/Spark Daemon.app)
Logitech Gaming Software UNKNOWN Hidden (missing value)
OpenDNS Updater Application Hidden (/Applications/OpenDNS Updater.app)
AdobeResourceSynchronizer Application Hidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
Internet Plug-ins: ℹ️
JavaAppletPlugin: Version: Java 8 Update 31 Check version
nplastpass: Version: 2.0.15 [Click for support]
OVSHelper: Version: 1.1 [Click for support]
Default Browser: Version: 600 - SDK 10.10
AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Click for support]
FlashPlayer-10.6: Version: 16.0.0.305 - SDK 10.6 [Click for support]
DivX Web Player: Version: 3.2.4.1250 - SDK 10.6 [Click for support]
Flash Player: Version: 16.0.0.305 - SDK 10.6 [Click for support]
QuickTime Plugin: Version: 7.7.3
SharePointBrowserPlugin: Version: 14.0.0 [Click for support]
AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Click for support]
DirectorShockwave: Version: 12.1.3r153 - SDK 10.6 [Click for support]
Safari Extensions: ℹ️
AdBlock
RoboForm
Adblock Plus
WOT
LastPass
3rd Party Preference Panes: ℹ️
DNSCrypt [Click for support]
Flash Player [Click for support]
Java [Click for support]
Time Machine: ℹ️
Time Machine not configured!
Top Processes by CPU: ℹ️
69% JavaApplicationStub
65% fontd
26% fontworker
17% Google Chrome
10% WindowServer
Top Processes by Memory: ℹ️
799 MB fontworker
137 MB Google Chrome
120 MB Finder
103 MB mds_stores
103 MB JavaApplicationStub
Virtual Memory Information: ℹ️
39 MB Free RAM
1.87 GB Active RAM
1.79 GB Inactive RAM
1.96 GB Wired RAM
6.57 GB Page-ins
17 MB Page-outs
Diagnostics Information: ℹ️
Mar 5, 2015, 10:34:30 AM /Library/Logs/DiagnosticReports/Kernel_2015-03-05-103430_[redacted].panic [Click for details]
Mar 5, 2015, 10:34:28 AM Self test - passed
Mar 4, 2015, 11:31:34 PM /Library/Logs/DiagnosticReports/Kernel_2015-03-04-233134_[redacted].panic [Click for details]
Mar 4, 2015, 10:06:37 PM /Library/Logs/DiagnosticReports/steam_osx_2015-03-04-220637_[redacted].hang
Mar 4, 2015, 08:12:45 PM /Library/Logs/DiagnosticReports/com.apple.WebKit.WebContent_2015-03-04-201245_[ redacted].cpu_resource.diag [Click for details]
Mar 4, 2015, 02:22:38 PM /Library/Logs/DiagnosticReports/fontd_2015-03-04-142238_[redacted].cpu_resource .diag [Click for details]
Mar 4, 2015, 10:30:34 AM /Library/Logs/DiagnosticReports/fontd_2015-03-04-103034_[redacted].cpu_resource .diag [Click for details]
Mar 4, 2015, 10:27:47 AM /Library/Logs/DiagnosticReports/Kernel_2015-03-04-102747_[redacted].panic [Click for details]
Mar 3, 2015, 02:22:40 PM /Library/Logs/DiagnosticReports/fontd_2015-03-03-142240_[redacted].cpu_resource .diag [Click for details]
Feb 27, 2015, 08:19:00 PM /Library/Logs/DiagnosticReports/Kernel_2015-02-27-201900_[redacted].panic [Click for details]
Feb 14, 2015, 07:59:51 PM /Library/Logs/DiagnosticReports/Kernel_2015-02-14-195951_[redacted].panic [Click for details] -
Dears,
I have an application which have pages, each page has its content from text, images and external swfs.
I load page only if user navigate to it, by the time, more navigation by user occures and more pages loaded.
I don't kill ( also I couldn't kill, no destroy in as3 ) pages, becuse i need them when user go back again to it, specially that pages have interactive content which user can deal with it, like questions, so I need prevoius pages which user enterd, its content and user's data.
The big problem is the Memory leak, the application becomes heavy , what can i do ?
Also, if I should kill pages with its content and use GC, How can i do that ? - there is a long life and events of objects in my application.
thank you in advance,
hebaI use Flash Builder , flex sdk 4.5, flash player 11.4, and windows 7 64bit
thank you, -
Memory leak during insert on PocketPC 2002
We've built an application using an Oracle Lite 5.0.1 database using an ODBC interface. We've stolen most of the code from:
C:\OraHome1\Mobile\Sdk\wince\samples\ODBC\sample.cpp
We've found that there appears to be a memory leak during inserts (haven't fully analyzed updates/gets). The thing leaks roughly X bytes per insert where numBytesInInsertString < X < (2.5 * numBytesInInsertString)
Has anyone else seen this? It becomes really apparent during out load from XML method where we walk through an xml document and perform roughly 7000 inserts in a row (commit at the end). The memory leak is not coming from the XML stuff, already tested for that.
Paul Runstedler
Intrexa Corp.I've went back to the sample to confirm my suspicions and sure enough there is memory being leaked. I loaded up the sample workspace in "[ORACLEHOME]\Mobile\Sdk\wince\samples\ODBC" and modified the sample.cpp code ever so slightly. Instead of performing one insert, one update and one select, it performs 5 iterations of 2000 inserts and skips over the updates and deletes. I've placed some memory reporting functionality after each iteration of inserts to report the free memory and this is what I get
After Connection and creation of table Free: 19742720 Used: 8237056
After iteration 1, 2000 inserts Free: 19439616 Used: 8540160
After iteration 2, 2000 inserts Free: 19509248 Used: 8470528
After iteration 3, 2000 inserts Free: 19439616 Used: 8540160
After iteration 4, 2000 inserts Free: 19509248 Used: 8470528
After iteration 5, 2000 inserts Free: 19283968 Used: 8695808
After commit Free: 19283968 Used: 8695808
As you can see, there is a loss of about 458700 bytes (about half a meg) over the 5 iterations. Thats about 46 bytes per insert. Not a lot for single insert, but this will eventually cripple any application that wants to perform a high number of inserts.
Any help would be appreciated.
Thanks,
Paul Runstedler
Intrexa Corp.
PS: The following is the modified method in sample.cpp
BOOL CSampleApp::InitInstance()
COLiteDB db;
MEMORYSTATUS memInfo;
CString message;
if (db.Connect())
db.Execute (_T ("CREATE TABLE TT (COL1 VARCHAR2(40), COL2 VARCHAR2 (50))"));
if (*db.GetError())
AfxMessageBox (db.GetError());
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After Connection and creation of table Free: %d Used: %d\n"),
memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
CString insertString;
for( int j = 0; j < 5; j ++ ) {
for( int i = 0; i < 2000; i ++ ) {
insertString.Format( _T("INSERT INTO TT VALUES (\'TESTINGTESTING123%d\', \'TEST2ANDBLAJHBLAJBLAJKBJAJAJAJAJJAJAJAJAJA\')") );
db.Execute (insertString);
if (*db.GetError()) {
AfxMessageBox (db.GetError());
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After iteration %ld, 2000 inserts Free: %d Used: %d\n"),
(j+1), memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
#if 0
db.Execute (_T ("UPDATE TT SET COL2 = 'TESTING ORACLE LITE' WHERE COL1='TEST1'"));
if (*db.GetError())
AfxMessageBox (db.GetError());
CSQLResult* pres = db.Execute (_T ("SELECT * FROM TT"));
if (pres != NULL)
const CRowObj* pobj = pres->Fetch();
while (pobj)
CString str = (LPCTSTR)pobj->GetAt (0);
str += TEXT (" ");
str += (LPCTSTR)pobj->GetAt (1);
AfxMessageBox (str);
pobj = pres->Fetch();
delete pres;
#endif
if( db.Commit() != TRUE ) {
AfxMessageBox( _T("couldn't commit") );
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After commit Free: %d Used: %d\n"),
memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
} -
Memory leak while debugging but not in release version
I have an Adobe AIR application that must load and unload multiple external swfs, and it must run for hours.
I had an issue where there was a memory leak. I tried all kinds of fixes, including rolling back SDKs and Adobe Runtime,
but every time I tested in Flashbuilder, the memory would climb, and with each unload a FlexLoader would stay in memory.
Finally I tried creating a release build, and low and behold the memory did not climb. It stayed the same even under stress testing.
So evidently, the memory leak had to do with debug version, and once it was a release version, the leak disappeared.UPDATE: The problem was with the external swfs being loaded into the main application.
If I compiled them in debug, they leaked. In release version they did not. -
NewDirectByteBuffer memory leak
I ve coded a new JNI program , when i try to use NewDirectByteBuffer function ,
i get memory leak on my program , when i cancel NewDirectByteBuffer function call everything is going ok after that i ve added DeleteLocalRef function may stop memory leak but its not...Whats the problem can be ? Is it a bug ?
I'm using Java 6 SDK AMD64bit edition
static JNIEnv *pEnv = NULL;
g_pVM->AttachCurrentThread( (VOID**)&pEnv,NULL );
jobject objectByteBuffer = pEnv->NewDirectByteBuffer(pBuffer,lBufferSize);
pEnv->CallVoidMethod(g_ObjListener,g_methodID,objectByteBuffer);
pEnv->DeleteLocalRef(objectByteBuffer);I want to build a library and pass that ByteBuffer to external users'If it was me I would try to get rid of that requirement. But otherwise....
Finalize would be required but only as a fail safe. You should not document that you have such a fail safe. Rather you should document that the users must correctly call a cleanup method when they are through. And document it in such a way to make it obvious how it must work with exceptions as well.
If this really is a library, where you are unlikely to be able to assist the users, then you might want to provide an optional way to track how many buffers have been allocated and cleaned. Thus the users will have a primitive way to validate correct clean up. -
Who can help me? is it a issue of Memory leak?
First , I have a poor English, sorry!
I have a project , and the project has two States, click the button to change the State.
I run the Application, I can see the memory is 39MB. After I change the State several times,
and the memory increases to 43MB.
My Application has a s:TextInput and s:TextArea, when I change the focus between them,
I find the memory increase to 55MB, and continue increasing if you do the same action.
In my surprise, if I use mx:TextInput and mx:TextArea, the problem is disappeared.
I doubt this is a memory leak, I test the TourDeFlex, and it has the same problem.
My environment is Flex SDK 4.1, and air 2.6.
Finally I paste my Source here:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:ns1="*" currentState="S2" height.S1="455">
<fx:Script>
<![CDATA[
protected function button1_clickHandler(event:MouseEvent):void
this.currentState="S2";
protected function button2_clickHandler(event:MouseEvent):void
this.currentState="S1";
]]>
</fx:Script>
<s:states>
<s:State name="S1"/>
<s:State name="S2"/>
</s:states>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<s:Button includeIn="S1" x="47" y="318" label="按钮" click="button1_clickHandler(event)"/>
<s:ComboBox includeIn="S1" x="47" y="84"/>
<mx:DataGrid includeIn="S1" x="47" y="151">
<mx:columns>
<mx:DataGridColumn headerText="列 1" dataField="col1"/>
<mx:DataGridColumn headerText="列 2" dataField="col2"/>
<mx:DataGridColumn headerText="列 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
<s:TextArea includeIn="S2" x="52" y="71"/>
<s:TextInput includeIn="S2" x="52" y="25"/>
<s:Button includeIn="S2" x="52" y="258" label="按钮" click="button2_clickHandler(event)"/>
</s:WindowedApplication>You can use the profiler to determine if there is a leak. Because of the
way Garbage Collection works, memory can grow if it gets fragmented, but
will eventually reach an upper limit if there is no leak. -
Querying BOE security - getObjectPrincipals() has memory leak?
Hi,
I am querying the BOBJ Enterprise security and noticed that when I introduce the getObjectPrincipals() method in my code, my program consumes a great deal of additional memory, and will eventually fail due to insufficient heap space as the code iterates through the reports. The issue does seem to be tied to specifically this method, as the memory is handled fine with everything else the same. Is there a known memory leak with this method? I am currently testing against XI R2 SP2 and noticed in release notes for SP5 there was a documented memory leak with a similiar method in the COM SDK - getAnyPrincipals().
Can anyone shed any light on this? I can provide code samples too if need be...
Thanks!Thanks for the responses guys.
Ruben - I did try to use remove() for both of my iterators in use (the first of which contains all principals who have rights for the given InfoObject, and the 2nd contains all of the explicit security rights for the principal) - this unfortunately didn't have any affect on the memory usage. What I tried was as follows:
ISecurityInfo objSecurityInfo = boInfoObject.getSecurityInfo();
IObjectPrincipals objPrincipals = objSecurityInfo.getObjectPrincipals(); //THIS I BELIEVE TO HAVE MEMORY LEAK
Iterator objPrincipalIterator = objPrincipals.iterator();
//retrieve rights applied to object
while (objPrincipalIterator.hasNext())
...get security Role information for each principal
//now get explicit rights information
ISecurityRights objPrincipalExpRights = objPrincipal.getRights();
Iterator objPrincipalExpRightsIterator = objPrincipalExpRights.iterator();
while (objPrincipalExpRightsIterator.hasNext()
..process explicit rights
objPrincipalExpRightsIterator.remove();
obPrincipalIterator.remove();
Ted,
I was already batching the # of InfoObjects to retrieve security information for, but just to be sure I greatly decreased this number and did not see any improvement in memory usage. I actually worked a case with SAP on this question, and they confirmed there was a memory leak with the getObjectPrincipals() method. They confirmed this was fixed for XI R2 in SP5 for the .Net and COM SDKs, but not for Java. Is there anything else I can try? Using getObjectPrincipals(1) for only explicit rights works great as far as memory consumption, but only exposes users with custom roles and I need to retrieve principals with any type of role.
Thanks! -
CS3 - Create24bitRGBPreview: Memory leak?
Hi
I use Create24bitRGBPreview to create a preview in my plugin (SDK sample PnlTrvCustomView). When I do this, I have memory leaks after finishing Indesign. I delete my allocated buffer, but there is always a leak. I don't find another possibility for the leaks. When I don't show the preview, it is OK.
Any ideas?
What could be wrong?
I have the same effect in the SDK sample! Any workarounds?
Thanks
HansHave you tried setting the memory allocated to Photoshop to 55% or less? You are probably starving other processes running outside Photoshop.
Reduce the memory states to no more than 20.
Is your scratch disk a fast internal one? Most external drives are too slow. You keep saying "plenty of space" but bear in mind that the scratch files will need about 10x the original file size and this soon mounts up to a lot of gigs.
With that computer you are hitting the limits for working with files of that size.
Maybe you are looking for
-
Crash Restarts - Varying Opinions from Genius Bar
I'm experiencing intermittent Restarts and have been in to the Genius Bars several times and get different opinions on the issue. I've been told my hard drive was going, so I relaced it. Didn't fix it. I was then told it was a software issue caused b
-
In weblogic 10.3, is it possible to set java arguments by using the console only? I tried to put: -DmyArg=XXX inside the Arguments section of my weblogic server under the tab "Server start". However, when I start the server and look at the logs, the
-
Cron job : how to run scripts as cron job
Hi friend, Sorry one very small question .. Can someone tell me how can i run scripts as cron job .. on HP UX. thanks ashish
-
Printing With Airport Extreme - Results thru PCs Better than thru Macs
I don't get it. My Airport Extreme works beautifully when printing from the Windows XP desktop connected thru it by a LAN or from the Windows Vista laptop connected wirelessly. However, when I try to print from either my my MacBook Pro or Mac Mini (b
-
I've production order with qty 5 and I use CO12 to confirm. I've two Operations 0000 and 0010..I confirm both ops for yield qty 4 and scrap 1 qty..I get warning messages..Is there any way, I can remove these warning messages? thnx