0

Sorry for my english. I get the message of "too much recursion", and i think is in the ajax, here is the code:

function procesarPdf(carpeta,idRevista,dirarchivo,paginaProcesar,nombreArchivo){        
            $.ajax({
                type:"POST",
                url:'php/procesar_pdf.php',
                data:{carpeta:carpeta,revista:idRevista,archivo:dirarchivo,paginaProcesar:paginaProcesar,nombreArchivo:nombreArchivo},
                async:false,
                cache:false,
                success: function(data) {
                    var datos = data;           
                    if(datos.terminado==false){

                        procesarPdf(datos.carpeta,datos.idRevista,datos.archivo,datos.paginaAProcesar,datos.nombreArchivo);

                    } else {

                        alert("Finish process");
                        quitarEspera(); 
                    }
                }
            });
        }

I use pdf to process images to get images and thumbnails whit the file procesar_pdf.php.

When sucess i call again the function to continue the process and i use progressbar of jquery to see the progress, but when the progress is in 50% or 56% or 65%, the firebug throw me the message of "too much recursion" with other error how "css.Fn" or "showHide(this,arguments)".

I dont know the error, please tell me if know the error.

1
  • Very Thanks!!! work 100% Commented Jul 8, 2014 at 21:04

2 Answers 2

0

You are calling the function

procesarPdf(datos.carpeta,datos.idRevista,datos.archivo,datos.paginaAProcesar,datos.nombreArchivo);

from within the function procesarPdf - too much recursion would indicate that this is happening many times. Each time a function calls a function a new frame is added to the stack, and there is a limit to how deep the stack can be. You should pursue an alternate strategy for continuing the processing, especially if you want to do it synchronously.

Sign up to request clarification or add additional context in comments.

Comments

0

Without seeing the rest of your code, it looks like you might be recursively calling the procesarPdf() too many times in whatever you are doing. Here is a post that gets at the root of why another user was having a similar issue and getting the same error.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.