Re: [Jepp-users] jep.close() exits my application
Brought to you by:
mrjohnson0
From: Fabrice I. <il...@ma...> - 2014-01-10 13:20:47
|
Hi! I think I solved my issue using 1) The problem was that the console.py was still active when the jep was closed. So I just added a way to interrupt the console inputStream so it can finish properly. Then I close the jep in the same thread the jep was launched. Thanks for the support! Fabrice Le 09/01/2014 23:52, Tijs Wickardt a écrit : > > Hi Fabrice, > > I guess there are 2 options to solve this: > > 1)Make all jep calls from the same thread, or > > 2)Use the python threading module to wait for other threads > > I use (and recommend) option 1. > > For example, when run from an Eclipse plugin, I do all Jep calls from > the gui thread: > > Display.getDefault().asyncExec(new Runnable() { > > @Override > > public void run() { > > StopPythonInterpreter(); > > } > > If you need background work, you can always use the python threading > module to spawn a new python thread. > > Before exiting jep, do your own python logic to ensure other threads > are done ( a join() , or an Event(), whatever you want). > > Hope this helps, cheers TW > > *From:*Fabrice Ilponse [mailto:il...@ma...] > *Sent:* donderdag 9 januari 2014 15:45 > *To:* jep...@li... > *Subject:* [Jepp-users] jep.close() exits my application > > Hello, > > I get the error "/Fatal Python error: Py_EndInterpreter: thread > still has a frame/" when I try to call /jep.close()/ > I do not see what I'm doing wrong. On google it said that this > comes from a test on /tstate->frame != NULL/ in the native python > library. The problem with this error is that my application is ended > brutally. > In my case, I'm running jep in a job but closing it by an action > outside this job (graphical button). > This does not occur in my other example which does not use a job. > > Does anyone know what is happening and if I must call some other > jep method a clear things before closing it? > > Regards, > Fabrice > > > ------------------------------------------------------------------------ > Bertus Groothandel & Distributie B.V. > Akeleibaan 59 > 2908KA Capelle aan den IJssel > The Netherlands > > Op al onze transacties zijn onze Algemene Verkoop- en > Leveringsvoorwaarden van toepassing. Deze voorwaarden treft u aan op > de achterzijde van onze factuur en op onze website www.bertus.com. > Andersluidende voorwaarden worden uitdrukkelijk afgewezen. > > Our General Sales and Delivery Conditions apply to all transactions. > Please find these general conditions on the back of our invoice and on > our website www.bertus.com. The applicability of any other general > conditions is expressly rejected. > Registered in Rotterdam No. 24156512 > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users |