Stack Overflow in External Interface call

Hi - I'm trying to make a call to he javascript function present in my aspx viz external inerface. I have 3 such calls. One of the call is always erroring out with error
Error: Error #1023: Stack overflow occurred.
    at flash.external::ExternalInterface$/_toJS()
    at flash.external::ExternalInterface$/_objectToJS()
    at flash.external::ExternalInterface$/_toJS()
    at flash.external::ExternalInterface$/_objectToJS()
I checked the syntax and everything looks fine and similar to other calls but this one always fails. Can someone point me as to what could be going wrong? Pls treat this as urgent.

I pass a object only. I dont know how to pass 5 diff params to a JS.this is how I do it. Instead of 2 here, the other call had 5 parms.
var javascriptFunction:String = "function name";
                    var signinObject:Object = new Object();
                    signinObject.param1= <<param1>>;
                    signinObject.param2= <<param2>>;
                    if(ExternalInterface.available)
                        // call the javascript function!
                        trace("b4 calling JS .");
                        ExternalInterface.call(javascriptFunction, signinObject);

Similar Messages

  • External interface.call is not working

    hi, i am trying to call one java script function in
    actionscript by using External interface.call method. but its not
    working .can u pls tell me why this happend

    "angadala" <[email protected]> wrote in
    message
    news:gmpc58$g9p$[email protected]..
    > skill status.mxml
    >
    >
    > <mx:Script>
    > <![CDATA[
    > if (ExternalInterface.available) {
    > ExternalInterface.call(getDataFromXml);
    > }
    >
    > it is javascript
    > <script type="javascript">
    > var data = new Array();
    > data[0]=[1,2,3];
    > function getData()
    > {
    > return data;
    > }
    > </script>
    > </head>
    > <body>
    > <div id="SkillStatus">
    > <p>Alternative content</p>
    > </div>
    >
    > </body>
    > </HTML>
    >
    1) Your JavaScript function name and the function name you
    are calling
    don't match.
    2) On the Flex side, you are calling a JS function that I
    think you are
    expecting to return a value, but not assigning the result of
    the value to a
    function.

  • External interface memory leak?

    Hello,
    I am embedding the flash player inside a Visual C++
    application. My program uses the external interface extensively.
    The external interface is called several times a second ( ~20 fps )
    each time a ~1k XML string is passed to the flash player.
    During execution the program increases its memory by ~10 Mega
    each hour. I have used the Umdh tool to try to locate the problem.
    It points to the line where the container program uses the external
    interface to call a function inside the swf movie.
    Below is a typical output of the Umdh tool:
    + 3396588 ( 3405883 - 9295) 261991 allocs BackTrace12EF
    + 261276 ( 261991 - 715) BackTrace12EF allocations
    ntdll!RtlpNtMakeTemporaryKey+000074D0
    ntdll!RtlInitializeSListHead+00010D08
    ntdll!wcsncat+00000224
    FlDbg9c!DllUnregisterServer+0010261A
    FlDbg9c!DllUnregisterServer+0010263C
    FlDbg9c!DllUnregisterServer+0000F1B7
    myProgram!CZFlash::CallFunction+0000004D (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \zflash\zflash.cpp, 255)
    myProgram!MainDialogProc+000012A2 (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \w32\maindlg.cpp, 2324)
    USER32!GetDC+0000006D
    USER32!PrivateExtractIconExW+000002B2
    USER32!PrivateExtractIconExW+000000FE
    USER32!DefDlgProcW+00000022
    USER32!GetDC+0000006D
    USER32!GetDC+0000014F
    USER32!IsWindowUnicode+000000A1
    USER32!CallWindowProcW+0000001B
    COMCTL32!Ordinal11+00000328
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    The System.totalMemory value of the flash player ranges from
    2.2 Mbyte to 3.2. I tried using memory leak detection software like
    IBM's Purify but couldn't find the problem.
    I also tried to disable the BSTR caching by setting the
    environment variable OANOCACHE, but the memory of my program
    continues to increase.
    Below is my C++ code. The m_iflash object is a pointer to the
    ActiveX of the flash player.
    wstring CZFlash::CallFunction(wstring call_string)
    BSTR pcall_string = SysAllocString(call_string.c_str());
    BSTR presponse = NULL;
    HRESULT status = m_iflash->CallFunction(pcall_string,
    &presponse);
    SysFreeString(pcall_string);
    if (status != S_OK)
    if (presponse != NULL)
    SysFreeString(presponse);
    return L"";
    wstring sresponse(presponse);
    SysFreeString(presponse);
    return sresponse;
    Currently the swf movie contains only action script that
    displays the System.totalMemory value and an empty function that
    the external interface calls.
    Any help will be appreciated.
    Thanks in advance,
    Amit

    Hello,
    Thanks for coming to National Instruments Discussion Forum.
    Can you give us more details about your application? Basically, I can’t find your main VI for your User Interface. Can you also give us the different steps to do to run your application and reproduce your problem?
    Generally speaking, your code on your block diagram have to be displayable in one screen.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/

  • Getting stack overflow exception whilst reading from HashMap

    hi,
    We are getting stack oveflow exception exception whilst reading from the HashMap.
    Following are few details about the code
    We have a swing based client and Session beans and Entity beans deployed on Weblogic Server.
    When the server is started, a session bean method queries to data base and creates a java object for each row in the data base.This java object is then stored in HashMap. These java objects have all get/set methods . and it has attributes of primitive data type as well as other java objects.This Hahsmap is then returned to client.
    When client calls this method and the method processes succesfuly , but when tries to return the HashMap, it gives Stack overflow exception.
    Looking at the stack trace i think this exception is thrown when the HashMap.readObject() methods is being invoked.
    does any body have any idea about this ? a quick help is much appriciated.

    Stack overflow is often caused by infinity loops No, an infinite loop would be like while (true) {
        // stuff
    } That doesn't cause stack overflow.
    or
    recursive method calls.Bingo.

  • External Interface and Apple OS X Security Updates since 28 July 2010

    Ever since the OS X and Safari updates from 28 July onward, we have been unable to send data from Flash player to Javascript and out to Unity 3D.  From the alert() statements I have made, it appears as if the communication is being blocked at the Flash level.  In other words, the browser is either no longer accepting the external interface calls from Flash, or Flash is blocking them internally.  Calls from the browser to Flash are still functional.
    The Flash version number is 10.1.82.76 on both old (non updated machines) and newly updated (doesn't work).  Our application works on Windows fine.  On OS X systems that have not had the updates, it also works fine.
    We purchased a new iMac tonight to test and the communication works fine:
    Mac OS X 10.6.3
    Safari 4.0.5 (6531.22.7)
    On another machine the system worked fine a week ago:
    Mac OS X 10.6.4
    Safari 5.0 (6533.16)
    After the update to the following, it does not work:
    Mac OS X 10.6.4
    Safari 5.0.1 (6533.17.8)
    Anyone experiencing anything like this?  Anyone experiencing ANY trouble with Flash and those updates?
    Any and all information will help.

    A number of folks have posted similar crashing-related reports with that same system.
    http://www.macworld.com/article/2062783/cures-for-a-panicking-mid-2010-macbook-p ro.html
    You may wish to contact Apple support.

  • Popup only comes after the Externla Interface call is compete.

    Hi,
    I am calling a function define in javascript using the EternlaInterface.call method. Before the call I am trying to show a popup, below is the code
                myProgressBar = ProgressComponent(PopUpManager.createPopUp(DisplayObject(myParent),ProgressComponent,true ));
                PopUpManager.centerPopUp(myProgressBar);           
                if (ExternalInterface.available) {
                    returnValue = ExternalInterface.call("execute", sqlStr);                  
    But the issue here is that the popup is displayed only once the external interface.call is complete.
    Thanks,
    Yumga

    Hi Yumga,
    flash is single-threaded and all code and drawing occurs in the same thread (call it main thread). Your block of code has to be executed fully before screen is updated. So you wan't be able to see any screen update before code returns because there is no render state.
    I think that - if you want to show screen update (e.g. information to user) - you need to to either:
    - defer external call execution - so it happens after screen is updated (you could use callLater for that:
    This method accepts a function pointer as an argument. The method then puts the function pointer on a queue, so that the function is called the next time the player dispatches either a render event or an enterFrame event.
    http://livedocs.adobe.com/flex/3/html/help.html?content=performance_04.html
    - or make your external call to javascript asynchronous (by providing callback method in actionscript, etc),
    hth,
    kind regards,
    Peter

  • Stack overflow in JNI call

    Hi,
    I am doing a wrapper with JNI for a Windows library of image compression. I have a test program running correctly in C. This program compress data and it can move a lot of memory. If I call this program from a JNI functions I obtain a JNI error:
    An unrecoverable stack overflow has occurred.
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_STACK_OVERFLOW (0xc00000fd) occurred at PC=0x5FF88497
    Function=unpack_data+0x189D7
    Library=C:\WINDOWS\system32\NCSEcw.dll
    This error is produce inside my compression library. I try to adjust the parameters (-Xms -Xmx -Xss) of the JVM but in any case before the process ends it shows this exception. I have done other JNI interfaces and I never found with this problem before. Can anybody help me?
    Thanks in advance.

    I found in this forum a piece of code with a same kind problem but It is simpler than mine. I have proved this program in Windows and it produce the same error. In Linux it runs but if I enlarge the array largebuf it ends with the same error. In Linux I can reserve until 2 MB (in windows +-256K). Is there any way to increase the stack size in a jni call?.
    #include <stdio.h>
    #include <jni.h>
    #include "test.h"
    int myprint2(int a, int b){
         char extrabuf[100];
         printf("got here next\n");
         extrabuf;
         return 0;
    int myprint(int a, int b){
         char largebuf[260000];
         printf("got here\n");
         myprint2(1,1);
         largebuf;
         return 0;
    JNIEXPORT jint JNICALL Java_test_init(JNIEnv *env, jobject obj){
         myprint(1,1);
         return 1;
    test.java
    public class test{
         public native int init();
         public static void main(String []args){
              new test();
         public test(){
              System.loadLibrary("Nat");
              System.out.println(this.init());
    }

  • Stack overflow when calling a DLL

    I have developped a DLL in Ada.
    I tried to call a function of this DLL from a C++ executable.
    My program crashed because of a stack overflow.
    Then, I increased the stack size of my program (linker option), and now it
    works.
    Calling this DLL through the call library function from a 6.0 Labview
    program causes the same stack overflow.
    How could I increase the stack size of my Labview program ?
    Thanks.

    Hi,
    I have never come across this issue but here are a few things you can try:
    1) Change the Calling Convention between C and StdCall(WINAPI). The main difference between the two calling conventions has to do with when the stack is cleaned up. In one method, the stack is cleaned earlier than in the other method.
    2) Call your dll with LabVIEW 7.0. You can find the evaluation version of the latest version at http://www.ni.com/labview
    Good luck
    Feroz

  • Stack overflow (0xC00000FD) at EIP=0x01B13469

    Hello, 
    I am working on a large project and sometimes the LabView shuts down with the error message:  Stack overflow (0xC00000FD) at EIP=0x01B13469 (that is tha last one I got). I am not able to identify the generator of this error. ( Maybe someone can do it from the error message above).  It is possible to catch this error ???? 

    charlie87 wrote:
    Hello, 
    I am working on a large project and sometimes the LabView shuts down with the error message:  Stack overflow (0xC00000FD) at EIP=0x01B13469 (that is tha last one I got). I am not able to identify the generator of this error. ( Maybe someone can do it from the error message above).  It is possible to catch this error ???? 
    This is a fatal error. As to catching it, Windows does it already for you, that is why you see the dialog. Trying to catch it yourself by some means wouldn't add anything as it is ABSOLUTELY unsafe to continue the process after this error. It could eat your breakfast, or the harddisk or something else!!
    Something in your application is using huge stack space. This could be in LabVIEW itself, if you use some form of very strange VI settings, but since the LabVIEW VI execution itself is not stack based it is unlikely that the large project in itself would be the cause of it. Most likely you make use of some external code library somewhere, that has huge stack space requirements, either by allocating huge buffers on the stack (a very bad thing to do) or by calling functions recursively without a safe upper bound (just as a bad thing to do).
    Also you should qunatify what a large project means. I have done projects in LabVIEW with about 1000 VIs and more already 15 years ago.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Delete Intransit from APO which Loaded by PI from external interface

    Hi all,
    I am facinf a problem in deleting the Order created by External Interface.
    We are loading Inransit as PO Mamo (ATP Category AH). Now we need to delete all the Record with AH ATP categoy before we reload new intransit to APO.
    Problem is we are not able to delete those order as those are not in Live Cache.
    We try using transaction /n/sapapo/bp2 but every time its throwing error "SAP APO system Q51CLNT100 has been declared as an SAP R/3 system.
    and even i try deleting from /SAPAPO/RLCDEL. but its not deleting those order.
    Can some one suggest what to do.
    What all the option that we can try to delete the intransit.
    Thanks & Regards,
    Amit Sharma

    Hi Amit,
    You can use BAPI to delete AH ATP Category.
    1. Read all Purchase Documents from BAPI_POSRVAPS_GETLIST3 for product u2013 location for AH Type ATP Category only.
    2.Get the ORDID on the selection made.
    3.Call BAPI_POSRVAPS_REMOVEITEMS and load the list of order no. and then delete it.
    Please try this.
    Thanks,
    Dipankar

  • Is there a way to run an existing PS-JS script using external interface

    I have several previously written Photoshop JS scripts which I'd like to run through buttons on PS panels, much like the example for the HelloWorld introduction. I assume that--using external interface--I'll somehow be able to fire off these script files. Is this a correct assumption?
    Thanks!

    Certainly, but not with external interface.
    Have a look at the cookbooks. There are examples of how to use the root host object to call directly into extendscript.

  • Memory leak in external interface SetReturnValue?

    I'm having trouble with a memory leak in my application. I'm
    hoping someone out there can help me find a fix or workaround, or
    tell me what I'm doing wrong.
    The leak seems to be coming from the flash external
    interface; specifically, IShockwaveFlash.SetReturnValue(String). My
    application is written in Visual Basic 2008, connecting to Flash
    9.0.124.0 (activex version).
    I've written a fairly simple flash/VB program pair to
    illustrate the problem.
    The SWF contains a button, 2 dynamic text fields, and the
    ActionScript 2 code below.
    The VB project contains a Form with a AxShockwaveFlash object
    and the VB code below.
    When this program is run, and the button is clicked a lot
    (10's of thousands of times), the application's memory creeps up
    and never seems to fall back down. If the string passed to
    SetReturnValue is longer, memory is consumed faster. But if the
    call to SetReturnValue is commented-out, the application's memory
    usage remains stable.
    If anyone has any suggestions on how to proceed, I'd be
    grateful.
    (By the way: I'm using a freeware program called DoItAgain to
    automate the button pressing.)

    I have developed two simple Java and corresponding
    C++ classes. Use code tags when you post your code.
    You are missing a lot of error checking. JNI calls, every single one, will usually be followed by some sort of error checking. Any that access classes, methods, fields or allocate object must be followed by checks for java exceptions.
    You will need to reduce your code to a smaller sample. Otherwise it is unlikely anyone will look at it.
    You also need to specify how you know that a memory leak is occurring.

  • Stack overflow error

    Hi..
    I have problem with this code.
       class test
           test tt=new test();   //1
           String name1;
        test() {}
        test(String i)
              name1=i;
             //tt=new test();    //2
       public static  void main(String arg[]){
                  test t1=new test("kj"); //3
    }  When I use line 2 (nstead of line 1 ) for initializing the ref variable iam not having any problem.
    But if i use as in line 1 iam getting stack overflow error..
    I thought tht calling a constructor recursivley results in a stack overflow error..
    But iam instantiating t1 with a one arg constructor (line 3) for which tt (line 1)is intialized,then where is the recursion happening..
    can any one pls clear..
    Thnx.
    mysha..

    please use [code][/code] tags around your code - makes it much easier to read.
    I think you have it - consider this code:public class StackOverflower {
        private StackOverflower so = new StackOverflower();
        public static void main(String[] args) {
            StackOverflower mySO = new StackOverflower();
    }Running this will overflow the stack since creation of an instance of StackOverflower requires creation of an instance of StackOverflower. This code though:public class NonStackOverflower {
        private NonStackOverflower nso = null;
        public NonStackOverflower() {
        public NonStackOverflower(String s) {
            this.nso = new NonStackOverflower();
        public static void main(String[] args) {
            NonStackOverflower myNSO = new NonStackOverflower();
    }Won't, since the creation of a new NonStackOverflower is not required to create a new NonStackOverflower instance.
    Did that make sense? I may have gotten confused and failed to illustrate your situation with my code...
    Good Luck
    Lee

  • "Stack overflow" & "out of memory"

    Hello,
    I have an issue with javascript code : with my own navigation, which includes additional javascript, I have either a "out of memory" error on the declaration of "var strUrl = http://..." in the CommonOpener_CreateExtObject method, or a "stack overflow" error on the onload="document.PCC.RaiseWindowEvent(event);" event handling in the <body> tag.
    When I save the page as HTML and remove the onload event, no error happens anymore.
    I think I could remove the onload event generation by modifying the C# code, but it would certainly disable some other feature (I think this event is managing PEI calls or something else).
    Any idea on how to fix this ?
    P.S : I'm on a .NET platform, I'm going to try to recompile my nav on a java platform to see if it works...

    Sebastien,
    - Are you using 5.0.1 or 5.0.2?
    - Are you by any chance trying to extend the Isomorphic navigation (under 5.0.2, it's called "legacy")?
    I would carefully review the pluggable nav you're using and double-check you're including all the necessary javascript in the JavaScriptIncludes() method to make sure you're basically adding everything properly.
    The isomorphic nav was particularly hard to extend because it required you add a special DHTML element to close off the menus being inserted. If you base your work off of our new jsportalmenus nav, it's much easier to work with and more reliable: it injects javascript into a named DOM element, which in our case is just a <TD id='name'></TD>; the menu gets inserted in the table cell.
    At a minimum, try debugging your javascript bug using Microsoft's script debugger (downloadable from microsoft.com). You should be able to determine precisely why there is a failure; comapre your code to the original nav you started from and carefully pick out what could be different.
    The onload events and the PCC are critical to normal function of the portal. Sgutting that off isn't an option, in my mind. If you wanted to, you'd need to do some pretty major surgery on the portal, and thaqt wouldn't upgrade, either.
    David Phipps
    Plumtree Software

  • How do I fix a stack overflow?

    Hi,
    Well I hope I am posting this in the right section of topics.
    I am new to programing.At the moment I am sudying loops in Java.
    I did something that has caused
    a "stack overflow" in my computer(Whatever that is).
    Is this really bad for my computer, and how do I fix it?
    thanks.

    Just to add a little more..
    The Stack is a special area of memory in the virtual machine. It stores variables that fall in and out of scope. When methods are called, the values of variables are often placed on the stack. The problem with a stack overflow arises when a method calls itself, either directly or indirectly, and never stops doing so. This could be called 'uncontrolled recursion'.
    When this happens, the stack will fill up until the method can no longer be called, and at this point a StackOverflowError will be thrown.
    It is important to note that this will not do bad things to your machine, because the stack is quite small (circa 256KB ?). If you don't catch the Error with a catch(Throwable) statement, the VM will exit automatically - all you have to do is fix the bug.

Maybe you are looking for