The changelog file has version 1.3.0 as the latest and the file dates from july 2008. I have spent the morning working on getting the latest SVN revision up and running on my workstation. So far the new version is crashing on the following call:
stub = axis2_stub_create_MyService() This may be because I need to regenerate the stubs. Unfortunately, due to some limitations of the C version of the autogenerator with respect to abstract base types, it takes about 5 hours to create the full bug-free set of C files for my company's WSDL, so I may be forced to leave this issue alone and use logging and hunting through the code to find a way around this problem. I have learned one more thing about this problem. The DllMain function is called with DLL_PROCESS_DETACH message after the Axis2/C internal process calls axutil_thread_pool_exit_thread(th_pool, thd); (the last function call in the code I attached to my first message in this thread). When I step through the code with the debugger, the app does not crash because all uses of env have a chance to execute before the DLL unloads while I move the execution pointer forward slowly. I may be able to get around the problem by delaying the unload of the DLL and recreating the env for each web service call. Any help is greatly appreciated Carl -----Message d'origine----- De : Manjula Peiris [mailto:[EMAIL PROTECTED] Envoyé : lundi, octobre 27, 2008 11:05 À : Apache AXIS C User List Objet : Re: RE : early env cleanup in asynchronous mode What is the Axis2/C version you are using ? Can you ran the client through a memory profiling tool like valgrind and sent us the traces? On Mon, 2008-10-27 at 10:14 -0400, Lefrancois, Carl wrote: > Thanks for your reply, Supun > > I am hesitant to raise a Jira right away for two reasons: my version > of Axis2/C is a few months old and I believe this behaviour may be > right, and it is me who is calling the wrong function. Are we sure > there is a bug here? > > Has anyone on the list made a client which uses the same env for many > web service calls in asynchronous mode? Maybe in this mode we need to > create a new env for each call? > > If I cannot find a better function and no one replies saying this > should work, then a Jira could be a good idea. I think this > functionality is something Axis2/C should support. > > > -Carl > > > -----Message d'origine----- > De : Supun Kamburugamuva [mailto:[EMAIL PROTECTED] > Envoyé : samedi, octobre 25, 2008 00:37 > À : Apache AXIS C User List > Objet : Re: early env cleanup in asynchronous mode > > > Recently I got this error. But not sure what is happening exactly. > Need to have a thorough look. Please create a Jira. > > Supun. > > > On Sat, Oct 25, 2008 at 12:27 AM, Lefrancois, Carl > <[EMAIL PROTECTED]> wrote: > > Hello all, > > No doubt my problem is due to user error, but I'm not sure what to try > next to fix this problem. > > I am working to implement asynchronous mode client calls in a project > which is already fairly mature and works well in blocking mode. When > my DLL is loaded, I initialise the Axis2/C environment, and I free the > environment on unload of the DLL. In between I can make many web > service calls in blocking mode. > > What is happening now is that I used code from the echo_non_blocking.c > sample to implement asynchronous mode but I get an access violation > because the env is freed inside the function which calls my > on_complete callback. After this function is completed my application > still tries to use the same env. > > Can someone point out which function to call so I can make use of the > asynchronous callbacks and still keep the same environment between > calls? > > > > > here is the code I am using: > ====================================================================== > == > ============================= > /* Send request */ > svc_client = axis2_stub_get_svc_client (stub, axis2_env ); > AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive > INITIÉ---\n"); ******* I see this in the log > axis2_svc_client_send_receive_non_blocking(svc_client, axis2_env, > payload, callback); > AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive > RETOURNÉ---\n");******* I see this in the log > > /** Wait till callback is complete. Simply keep the parent thread > running > until our on_complete or on_error is invoked */ > while (count < 15) > { > if (isComplete) > { > /* We are done with the callback */ > break; > } > AXIS2_LOG_INFO(axis2_env->log, "\n---AXIS DORT---\n"); > ******* I see this in the log > AXIS2_SLEEP(1); > AXIS2_LOG_INFO(axis2_env->log, "\n---AXIS SE RÉVEILLE---\n"); > ******* crash happens here after on_complete.. Axis2_env is freed! > count++; > } > > if (!(count < 15)) > { > AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive > COMPLÉTÉ TIMEOUT---\n"); **** never see this in log > *lpiEtatTraitement = ETAT_TRAITEMENT_TIMEOUT; > } > else > { > AXIS2_LOG_INFO(axis2_env->log, "\n---appel d'axis2 send receive > COMPLÉTÉ OK---\n"); **** never see this in log > } > ====================================================================== > == > ============================= > > > axis2_status_t AXIS2_CALL OnRatingStubOpComplete( struct > axis2_callback * callback, const axutil_env_t * env) > { > AXIS2_LOG_INFO(axis2_env->log, > "\n---OnRatingStubOpComplete()---\n"); ******* I see this in > the log > isComplete = 1; > return AXIS2_SUCCESS; > } > > ====================================================================== > == > ============================= > > ... In the trace execution goes into op_client.c here: > > if (args_list->callback) > { > axis2_callback_invoke_on_complete(args_list->callback, th_env, > args_list->op_client->async_result); **** calls my on_complete > function above > axis2_callback_set_complete(args_list->callback, th_env, > AXIS2_TRUE); > } > > /* clean up memory */ > axis2_async_result_free(args_list->op_client->async_result, > th_env); > > axis2_op_ctx_free(op_ctx, th_env); > > th_pool = th_env->thread_pool; > > AXIS2_FREE(th_env->allocator, args_list); > > if (th_env) > { > axutil_free_thread_env(th_env); > th_env = NULL; > } > axutil_thread_pool_exit_thread(th_pool, thd); > ***** this frees my env! as shown in my log > return NULL; > } > > ====================================================================== > == > ============================= > > > > > So can someone tell me, is axis2_svc_client_send_receive_non_blocking > the wrong function to use if I want to make many service calls with > one environment? > > > Carl Lefrançois > Analyste / Programmeur > Larochelle Groupe Conseil > > Tél. : 514-282-6817, poste 4548 > Couriel : [EMAIL PROTECTED] > _____ > > "Ce message est confidentiel, à l'usage exclusif du destinataire > ci-dessus et son contenu ne représente en aucun cas un engagement de > la part de AXA, sauf en cas de stipulation expresse et par écrit de la > part de AXA. Toute publication, utilisation ou diffusion, même > partielle, doit être autorisée préalablement. Si vous n'êtes pas > destinataire de ce message, merci d'en avertir immédiatement > l'expéditeur." > > "This e-mail message is confidential, for the exclusive use of the > addressee and its contents shall not constitute a commitment by AXA, > except as otherwise specifically provided in writing by AXA. Any > unauthorized disclosure, use or dissemination, either whole or > partial, is prohibited. If you are not the intended recipient of the > message, please notify the sender immediately." > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
