Whether our application caused the memory leak

whether have the command to find out whether our application caused the memory leak !
We are using Jdev10g + JHeadstart(Release 9.0.5.1, BC4J + Struts + JSP) to build our enterprise application,
but when the application running some days in our Application Server(RedHat AMD64, with 8GB RAM), the memory consumed was growth seriously in production environment (one OC4J instance will caused almost 2G memory ulilization after running 2 days) that is caused us to restart the instance each day ! we doubt and worry
about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
issue and which program is the major murderer for memory.

Ting,
Unfortunately there is no 'command' that will show you the location of a memory leak. First I would scrutinizing your code for any obvious 'leaks'. Then, you should obtain some statistics about the usage of your system. One important aspect is how long a HttpSession usually lives. If you have thousands of users that stay online the entire day and never 'time out', and if you have users on the system 24 hours a day, then the sheer number of HttpSessions might be a problem.
JHeadstart 9.0.x tends to have rather 'heavy' session objects. This can easily be solved by adding some actions to clear up DataObjects and DataObjectSets of previous 'Groups' when entering a new Group. A good place would be between the 'DynamicActionRouter' and the 'ActionRouters'. Just before entering the 'EmployeeActionRouter', you could remove all DataObjects and DataObjectSets that might be left on the Session by actions of the other ActionRouters.
Also it would be interesting to see if the garbage collector can do its thing when the system is less busy. For instance, if your application has a smaller load during the weekend, what is the memory usage on Sunday at midnight compared to, say, Friday at noon. Has the memory load dropped consistently with the decreased number of online users, or does too much memory stay allocated? If so, then there's more going on than just HttpSession objects.
If all this does not lead to a solution, I suggest using a profiling tool such as OptimizeIt to investigate the memory usage of the application in detail.
Kind regards,
Peter Ebell
JHeadstart Team

Similar Messages

  • Find out whether our application caused the memory leak

    whether have the command to find out whether our application caused the memory leak !
    We are using Jdev10g + BC4J + Struts + JSP to build our enterprise application,
    but when the application running some days in our Application Server(RedHat AS3-86, with 4GB RAM), the memory consumed is serious ! we doubt and worry
    about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
    issue and which program is the major murderer for memory.

    The second scenario is, as we perform some deployment activity on 10g, the memory usage chart shows a sharp consumption of memory about 1.5GB .the loss memory almost be display in "other" legend chart !
    Please give us some advice , thanks in advance

  • How to define the memory leak in stability test

    Hi
    Usually, we run our system with 70% CPU load for 72 hours for stability test (on solaris 10), because some plugin of our system is using mtmalloc, and we use prstat to monitor the memory of each plugin. But because of the complex memory usage of our application, we don't know when the application will use the Max memory, and because of the "mtmalloc", the memory showed by "prstat" will not released but continually increased.
    So fro the test point of view, there is the risk of memory leak, but actually, there may be no memory leak, so my question is how to define the memory leak in such condition.

    kevin wrote:
    Thank you for the input and all the info.
    isn't java heap the same as memory allocated to the java process in my weblogic
    starup script ?The heap is sized by the -Xmx and -Xms parameters you pass on the java
    command-line. The permanent generation is separate.
    >
    let me also download jprobe and try to run it and see what it gives me.
    I'd start by running with -verbose:gc. I'd want to know whether you're
    running out of heap or permgen space.
    -- Rob
    kevin
    Rob Woollen <[email protected]> wrote:
    Unfortunately memory leaks are not fun to track down even with tools.
    I'd first suggest determining whether you're running out of space in
    the
    permanent area (where classes are loaded), or you've exhausted the java
    help space.
    I'd start by adding -verbose:gc. Look at the gc messages right before
    you hit the OutOfMemoryError. If there's plenty of space left, I'd
    suspect you're running out of perm space. Search these newsgroups and
    the web for MaxPermSize, and you should see plenty of info.
    If you're running out of java heap, tools like jprobe and OptimizeIt
    are
    helpful. If you can tell me a little more about your application and
    how you're testing it, I can offer some more tips.
    -- Rob
    kevin wrote:
    Iam new to JAVA and weblogic. I have an application that runs out ofmemory time
    and again.
    please let me know how to pin point this problem and moreover, howto interpret
    or understand that there is a problem. I have downloaded JPROFILE tool,but it
    is very confusing to understand what is goin on in this tool.
    If somebody can let me know how to interpret and understand the memoryleak, that
    will be great !!!
    thank you.

  • By any chance long living filestream object cause unmanaged memory leak?

    Hi,
    I am running my application where in I have one file stream object which live for long duration, say its life time is equivalent to life time of application. So by any chance this kind of object causes unmanaged memory leak in the application. Because when
    I see private bytes for my application, it is higher than the all bytes in heap counter. That mean there is a unmanaged memory leak. So does such filestream object cause such behaviour?
    Thanks and Regards,
    Lucas

    What makes you think it's the file stream that leaks unmanaged memory? There could be other parts of your applications that do that.
    FileStream doesn't usually allocate unmanaged memory. Its internal buffer is a GC heap allocated byte[] array. The only unmanaged memory allocation that I know of in FileStream is a OVERLAPPED structure used for async I/O. If you use BeginRead/Write make
    sure you call EndRead/Write correctly, otherwise that structure may be leaked.
    @Joel Engineer: "When a stream uses ASCII encoding under certain cases nulls are added to the data for block alignment."
    FileStream doesn't have anything to do with text encoding and I've told you that before. Next time when I run into a post that makes such a claim I'll simply delete it. This display of ignorance has lasted more than enough.

  • [InDesign CS3] how to find the reason of the memory leaks?

    Hi all,
    I'm working with InDesign CS3. I wrote a plug-in and loaded it into InDesign in debug mode. After I closed the application, I got a console window showing memory leaks as following:
    Leaks! 52 leaks, 716804 bytes
    Press any key to continue . . .
    Does anybody know how to find the reason of the memory leaks? Thanks a lot!
    Nicole

    Thanks Dave. I'm using Windows, and I also tried MemoryTracker. I got a Leaks.txt which shows the detail of memory leaks as following. But I really can't understand it. Any help? Thanks.<br /><br />Leaks!  7 leaks, 455252 bytes<br /><br />65036 bytes at: 7B22FF8<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01C96DEC     BIBGetVersion cannot be found in any module!<br />     01C96E60     BIBGetVersion cannot be found in any module!<br />     01C979E4     cannot find address in any module!<br />     0131F511     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     0131F4C4     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     00EDBC7E     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     00EDBFBE     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     00EDC558     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     1002C26E     cannot find address in any module!<br />     1002BFB9     cannot find address in any module!<br />     00401644     cannot find address in any module!<br />     00405146     cannot find address in any module!<br />     00404EBD     cannot find address in any module!<br />     7C817067     RegisterWaitForInputIdle cannot be found in any module!<br />65036 bytes at: 7B32E38<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01C96DEC     BIBGetVersion cannot be found in any module!<br />     01BB149B     cannot find address in any module!<br />     01BB4C62     cannot find address in any module!<br />     00EDBCE3     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     00EDBFBE     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     00EDC558     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     1002C26E     cannot find address in any module!<br />     1002BFB9     cannot find address in any module!<br />     00401644     cannot find address in any module!<br />     00405146     cannot find address in any module!<br />     00404EBD     cannot find address in any module!<br />     7C817067     RegisterWaitForInputIdle cannot be found in any module!<br />65036 bytes at: 7B52AB8<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01C96DEC     BIBGetVersion cannot be found in any module!<br />     02331A7A     cannot find address in any module!<br />     0236E7CD     cannot find address in any module!<br />     43726F6C     cannot find address in any module!<br />65036 bytes at: 7C93D80<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     02331F36     cannot find address in any module!<br />     02367F85     cannot find address in any module!<br />     02415DB4     cannot find address in any module!<br />     3F800000     cannot find address in any module!<br />     02416799     cannot find address in any module!<br />     FFFFFF11     cannot find address in any module!<br />65036 bytes at: 7CD6028<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01CE1C14     cannot find address in any module!<br />     01DD9346     CTGetVersion cannot be found in any module!<br />     01D9B052     CTGetVersion cannot be found in any module!<br />     01D9B189     CTGetVersion cannot be found in any module!<br />     01D9BB21     CTGetVersion cannot be found in any module!<br />     01D9BD0C     CTGetVersion cannot be found in any module!<br />     01D9CE96     CTGetVersion cannot be found in any module!<br />     01D9CEFF     CTGetVersion cannot be found in any module!<br />     01DDBEA2     CTGetVersion cannot be found in any module!<br />     01DDC214     CTGetVersion cannot be found in any module!<br />     01DDC7C6     CTGetVersion cannot be found in any module!<br />65036 bytes at: 16D68200<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01BB178C     cannot find address in any module!<br />     01BCE7C8     cannot find address in any module!<br />     01BCEE13     cannot find address in any module!<br />     01BD28C5     cannot find address in any module!<br />     01BD4CB7     cannot find address in any module!<br />65036 bytes at: 20B68F88<br />     4172627C     MemoryPool::GetNonPoolSizePeak cannot be found in any module!<br />     00EDC1CB     K2Internals::K2VectorBase<HolderPtr<IPMUnknown>,K2Allocator<HolderPtr <IPMUnknown> > >::fill_insert cannot be found in any module!<br />     01C9C74F     cannot find address in any module!<br />     01CE1C14     cannot find address in any module!<br />     01D2F1A1     cannot find address in any module!<br />     01D6F789     CTGetVersion cannot be found in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!<br />     07BFB464     cannot find address in any module!

  • Possible causes for memory leak in Java and Tomcat

    I would like to enquire what are the typical mistakes done by programmers that will cause memory leak in Java and Tomcat.

    Please refer the below site. It will give more points about the memory leak and how to rectify it.
    http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_20981562.html?cid=336

  • How to quickly and accurately find out the memory leak points?

    Hi, all.I have added a option -XX:+HeapDumpOnOutOfMemoryError in the bootstarp script of my application.
    The application has been run for one day and the OOM error was thrown again. So I downloaded the hprof file and used MAT to parse it.
    But after seeing the leak suspects I still have no idea what's wrong and what's the possible leak point.
    Can anyone shard some experience how to find out the memory leak points quickly and accurately?
    It would be more nice if you can take a loot at the leak supects.
    Thanks,
    SuoNayi

    Furthermore, when I try to dump the thread stack, I can see the following errors/warns:
    Thread 12135: (state = BLOCKED)
    - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
    Error occurred during stack walking:
    sun.jvm.hotspot.utilities.AssertionFailure: Only used on C2 x86
         at sun.jvm.hotspot.utilities.Assert.that(Assert.java:15)
         at sun.jvm.hotspot.code.CodeBlob.getLinkOffset(CodeBlob.java:193)
         at sun.jvm.hotspot.runtime.amd64.AMD64Frame.senderForCompiledFrame(AMD64Frame.java:297)
         at sun.jvm.hotspot.runtime.amd64.AMD64Frame.sender(AMD64Frame.java:213)
         at sun.jvm.hotspot.runtime.Frame.sender(Frame.java:184)
         at sun.jvm.hotspot.runtime.Frame.realSender(Frame.java:189)
         at sun.jvm.hotspot.runtime.VFrame.sender(VFrame.java:102)
         at sun.jvm.hotspot.runtime.VFrame.javaSender(VFrame.java:129)
         at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:50)
         at sun.jvm.hotspot.tools.JStack.run(JStack.java:41)
         at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
         at sun.jvm.hotspot.tools.JStack.main(JStack.java:58)

  • Can't find the memory leak in Managed Object

    Hey guys...I am trying to find the memory leak that Instruments says I have in this section of code setting up a managed object:
    oCurrentSection = (Section*) [NSEntityDescription insertNewObjectForEntityForName:@"Section" inManagedObjectContext:[[CoreDataManager sharedData] oManagedObjectContext]];
    oCurrentSection.nsSectionName = [attributeDict objectForKey:@"name"];
    oCurrentSection.nsImgUrl = [attributeDict objectForKey:@"imgURL"];
    oCurrentSection.nsDesc = [attributeDict objectForKey:@"desc"];
    oCurrentSection.iOrder = [NSNumber numberWithInt: [[attributeDict objectForKey:@"order"] intValue]];
    Can anyone help me out?

    Thanks everyone! That makes a lot more sense. Yes, kjon, I do come from windows. But please don't reference my troubled past. Actually, I typically use "ps aux | sort -n +3 | tail -1" rather than simply "ps aux" - I just wanted to make sure I wasn't missing something by looking at only the top memory-user. Glad to know there's no massive memory leak in my system
    Procyon, what's wrong with a huge swap? Wouldn't you do it too if you were given a system with 200GB hdd more than necessary and told to make a webserver?
    [root@norpass ~]# df -H
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 7.9G 1.1G 6.8G 14% /
    none 1.1G 0 1.1G 0% /dev/shm
    /dev/sda1 40M 9.9M 28M 27% /boot
    /dev/sda4 238G 4.5G 234G 2% /home

  • We have 2 versions of Portuguese in our application. The problem is only for Brazilian Portuguese and the other one is working just fine. Locale for portugese-brazil (pt-BR) is not working

    We have 2 versions of Portuguese in our application. The problem is only for Brazilian Portuguese and the other one is working just fine.
    Locale for portugese-brazil (pt-BR) is not working.

    No. Something else is going on.
    Your son may be hogging all the bandwidth but your wireless network should never simply disappear. Moreover, if your son isn't doing anything the available bandwidth for other devices should remain unaffected.
    I suspect that something is miswired, and from what you describe I suspect that link is between the Extreme and the "other computer".
    The way to accomplish what you propose is
    Modem > Ethernet cable to Extreme's WAN port
    Extreme's LAN ports > wired Ethernet devices.
    There should be nothing but an Ethernet cable linking an Extreme LAN port and any other wired device. If you run out of available LAN ports on the Extreme, you need to by an "Ethernet switch" - they are not expensive, but don't call it a "splitter" or you will only confuse yourself. The switch would be connected to one of the Extreme's LAN ports, and you would connect additional devices to it. You can also use one of your Expresses for that purpose, assuming it is the current generation model with two Ethernet ports.

  • What about the memory leak Bug in foreach tag

    Hi,
    does anybody knows if this bug is resolved already ?
    http://issues.apache.org/bugzilla/show_bug.cgi?id=25623.
    I see memory leaks in our application, and deeper check with YourKit profiler show that the objects retained in the jstl tags?
    Any help?

    Thanks for the info.
    The bug is in 'WONT FIX' status which is a shame.
    ram.

  • Web Service data source report causes Java memory leak

    Crystal Report designer fails to preview a report whose data source is a WSDL web service.  This happens when the Java run time process has exceeded the memory limit specified in the CRConfig.xml file.  The Java memory is never released by Crystal Reports until the Crystal Reports Designer is closed.  Version is Crystal reports 2008 (product version 12.2.4.507).
    This error also occurs in the Crystal Reports Viewer when used in a Microsoft .NET application (framework 3.5) referencing CrystalDecisions.CrystalReports.Engine.dll v12.0.2000.0, CrystalDecisions.Enterprise.Framework.dll v12.0.1100.0, CrystalDecisions.Enterprise.InfoStore.dll v12.0.1100.0, CrystalDecisions.ReportSource.dll v12.0.2000.0, CrystalDecisions.Shared.dll v12.0.2000.0
    I load the ReportDocument object based on the location of the .rpt file and then set the ReportSource object of the CrystalReportViewer control:
    string FullReportName = "TestFile.rpt";
    ReportDocument reportDoc = new ReportDocument();
    reportDoc.Load(FullReportName, OpenReportMethod.OpenReportByTempCopy);
    this.crystalReportViewer1.ReportSource = reportDoc;
    reportDoc.Close();
    reportDoc.Dispose();
    GC.Collect();
    The code displays the report in the report viewer.  However, every time the report is refreshed the Java runtime memory increases until the application cannot display the results.  The error messages are "Failed to retrieve data from the database." followed by "Cannot determine the queries necessary to get data for this report. Details: Unexpected error".  If you try to refresh the data once again the following errors occur: "Failed to retrieve data from the database." then "Cannot determine the queries necessary to get data for this report. Details: Schema file is invalid   Java heap space".
    Increasing the java heap space in the CRConfig.xml file merely prolongues the onset of this error.
    Is there a service pack or hot fix for this???
    PLEASE HELP.

    Many thanks for your help.  This solved the issue for our .NET code, however the leak is still present in the report designer.  I was also wondering if you could help further: because of the limits on the java memory process is there a way to ensure that a separate java process is started for each report that is loaded in my report viewers collection?  Essentially the desktop application that i have created uses a tab control to display each type report, so each tab goes through the following code when displaying a report and closing a tab:
    Is there a way to ensure that a different Java process is kicked off each time that I display a different report?  My current code in c# always uses the same Java process so the memory ramps up.  The code to load the report and then dispose of the report through closing the tab (and now the Java process) looks like this:
        private void LoadCrystalReport(string FullReportName)
          ReportDocument reportDoc = new ReportDocument();
          reportDoc.Load(FullReportName, OpenReportMethod.OpenReportByTempCopy);
          this.crystalReportViewer1.ReportSource = reportDoc;
        private void DisposeCrystalReportObject()
          if (crystalReportViewer1.ReportSource != null)
            ReportDocument report = (ReportDocument)crystalReportViewer1.ReportSource;
            foreach (Table table in report.Database.Tables)
              table.Dispose();
            report.Database.Dispose();
            report.Close();
            report.Dispose();
            GC.Collect();
    Thanks

  • Itunes 7 Application error - the memory could not be "read"

    Hi guys.
    I just bought my first ipod and i upgrated itunes.
    but now itune just doesn't work!!!
    i getting this message:
    the instruction at "0x1000257a" referenced memory at "0x00000000". The memory could not be "read".
    I tried to uninstalled but it didn't help.
    I so frustrated, what sould i do...

    okay, the broken QT will be causing at least some of the itunes grief.
    let's try this first.
    head into your Add/Remove programs. uninstall your existing QuickTime.
    if Add/Remove won't let you uninstall QuickTime, download and install the Windows Installer CleanUp utility. then use it to clear any existing QuickTime installation configuration information from your PC:
    Description of the Windows Installer CleanUp Utility
    Next, we’ll manually remove leftover program files and folders.
    1. On the Start menu, click My Computer (or double-click My Computer on the Desktop).
    2. In My Computer, open Local Disk.
    3. Open Program Files.
    4. Right-click on the QuickTime folder and click Delete from the shortcut menu.
    5. Navigate to C:\Windows\system32\.
    6. Remove the files QuickTime.qts and QuicktimeVR.qtx.
    7. Restart your computer.
    next, we'll get a fresh copy of QuickTime into your PC by doing a repair install of itunes. (switch off antivirus and antispyware applications prior to the install.)
    go into Add/Remove and select itunes. click "Change" and then click "Repair".
    if the repair install goes through okay, restart the PC and try launching itunes again. does it launch properly now?

  • Why on close am I geting " firefox.exe -Application error - The memory could not be "written" "?

    Why on close am I geting " firefox.exe -Application error "The instruction at "0x00000000" reference menory at "0x00000000". The memory could not be "written" Click OK to terminate."?
    This is on Window XP
    A program White Smoke was loaded into this unit about 3 month ago and a popup to buy started appearing 1 week ago. I unistalled the program and i found virus that was removed.
    The unit will not allow a system restore also.

    You do not need to start Firefox to disable the Java Quick Starter, you can do that via the Java Control Panel (Control Panel > Java > Advanced)
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Can ANYONE spot the memory leak??

    Hi, I have some code here, and there is a SERIOUS memory leak. Basically, I realized the leak was there when a report tried to execute this 100,000+ times and it bogged the system down to a crawl. Can anyone spot the leak? I will explain the variables below the code:
    char* getDescription(char* chFlag, char* chDEID, char* chKey, int keysize)
    //first, we need to allocate new Byte arrays....
    jbyteArray JchFlag = (*env1)->NewByteArray(env1,1);
    jbyteArray JchDEID = (*env1)->NewByteArray(env1,2);
    jbyteArray JchKey = (*env1)->NewByteArray(env1,40);
    //next, we need to put the correct info in those byte arrays....
    (*env1)->SetByteArrayRegion(env1,JchFlag,0,1,(jbyte*)chFlag); (*env1)->SetByteArrayRegion(env1,JchDEID,0,2,(jbyte*)chDEID); (*env1)->SetByteArrayRegion(env1,JchKey,0,40,(jbyte*)chKey);
    getDescriptionID =(*env1)->GetMethodID(env1,myjclass,"getDescription","([B[B[BI)Ljava/lang/String;");
    result              =(jstring)((*env1)->CallObjectMethod(env1,myjobject,getDescriptionID,JchFlag,JchDEID,JchKey,keysize))  ;   
        returnvalue = NULL;
        if(result == NULL)
           strcpy(holder1, "**********Error Finding Description**********");
        else { //now, we convert the jstring to a char *, so we can return the proper type...                       
                returnvalue=(char*)((*env1)->GetStringUTFChars(env1,result,&isCopy)) ;
                strcpy(holder1,returnvalue);           
                if(isCopy == JNI_TRUE)                    
                    (*env1)->ReleaseStringUTFChars(env1,result,returnvalue);                         
    (*env1)->DeleteLocalRef(env1,result);
    return holder1;
    //return description;
    }//end getDescription function
    -myjclass is global, it gets its value in the initialization.
    -any variables that are not declared in this function are, of course, globally defined.

    Hello Friends,
    I had also tried to use the ReleaseStringUTFChars after making the check of whether it does a copy or not.
    For me in Windows, it works fine most of the time. But when I go on increasing the no. of strings in a Vector of objects to more than 500 or something , then it occasionally fails.
    Just before ReleaseStringUTF, I do have the copied string in char* .
    Soon after Releasing, I do get a junk in the character array.
    I dont know why it happens like this.
    Please advice.
    Everyone suggest ReleaseStringUTF.
    But why it fails in Windows.
    And any one know about how it will behave in Alpha.
    It totally fails in Alpha.
    I could not get the string at all.
    Please help
    LathaDhamo

  • Why does system exec cause a memory leak to occur?

    Sorry if this has been posted before, but I can't quite figure out why this VI is causing a gigantic memory leak (losing nearly 500K of memory a second). It's a simple system exec call, and I even trivialized everything in order to try and discover the problem.
    Does anyone see a huge problem here? I've tried calling up taskkill afterward as well, though that seemed to make little difference.
    If you don't trust my trivial program (and you probably shouldn't), I've also included the source files for the program - it's a one-line C++ program that returns immediately.
    Any insight is greatly appreciated.
    Thanks!
    Attachments:
    Dilution.vi.zip ‏11 KB

    Try putting a wait - even a 0 second wait - in your loop and see if it makes a difference.  Without a wait, LabVIEW will try to run that loop as fast as possible, possibly so fast that it never yields time to free resources.

Maybe you are looking for

  • When starting a new project in elements 7 I can't change settings.

    Even when I close an open project, the box pops up, and asks if I would like to save changes. It won't let me make a selection. I have to close the program through task manager. Any ideas? Up to date, and reinstalled twice.

  • "An error occurred while installing Adobe AIR"

    I am running Vista Home Premium SP1, and I keep getting the following error while trying to reinstall Air. After the install, I get a dialog box telling me Air installed successfully. When I click OK, I get a second box telling me: "An error occurred

  • Error opening report as webservice when there's parameters!

    I followed the instructions in the developer's guide: "Publishing and Consuming a Report as a Web Service" I am using VS2008 and Crystal Reports 2008. I have a web application with 1 report in it called CrystalReport1.rpt and this report is published

  • Google ActiveSync Exchange Error 403

    Hello, It all started today, while my Z10 was running brillantly, it started to have a few errors and crashing, took it back to the shop today and got a replacement (Wonderful), so setting up all my accounts, email, calender, contacts ect, i came acr

  • Just got a replacement. If I restore from backup, will 4.0.2 be put on?

    I just picked up my replacement for my other phone. If I restore from a backup (my old one was updated to 4.0.2) will my new one automatically have that on there also? or will I manually need to update it.