<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: No more handles (SWT Error) while batch processing .gdb in python in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527164#M7196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi marek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apologies for the&amp;nbsp;late response. it indeed looks like that&amp;nbsp;the export dialog is leaking OS handles, i hope there is time to fix this for 2017.1. for now, let's look at the possible workarounds:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;increase OS handles: there seems to be some advanced ways to increase the OS handle limit (e.g.&amp;nbsp;&lt;A class="link-titled" href="https://stackoverflow.com/questions/9723470/whats-the-upper-limit-on-gdi-objects-for-one-process-in-windows-7" title="https://stackoverflow.com/questions/9723470/whats-the-upper-limit-on-gdi-objects-for-one-process-in-windows-7" rel="nofollow noopener noreferrer" target="_blank"&gt;What's the upper limit on GDI objects for one process in Windows 7? - Stack Overflow&lt;/A&gt;&amp;nbsp;). i doubt you'll be able to tweak your system to get up to 500k exports. also, this is not an CityEngine setting, it is an OS setting and might have undesired side-effects on your workstation.&lt;/LI&gt;&lt;LI&gt;restarting CE (part 1): looks like the best workaround for now (although slow). if a script called "startup.py" is present in the workspace root, it will execute automatically at startup (&lt;A class="link-titled" href="http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/python/python_scripting04.html" title="http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/python/python_scripting04.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Help&lt;/A&gt;).&amp;nbsp;you can use system properties to communicate with the script (e.g. to specify where to continue working):&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 16px;"&gt;f&lt;/SPAN&gt;or example, you&amp;nbsp;start CityEngine with: "CityEngine -vmargs -Dfoo=bar"&lt;/LI&gt;&lt;LI&gt;in python, run this:&lt;BR /&gt;from java.lang import System&lt;BR /&gt;print&amp;nbsp;System.getProperty("foo") # this will print "bar"&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;restarting CE (part 2): to shutdown CE correctly please use this script (we are working on a more convenient way):&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from java &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; lang
from org.corebounce.threads &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; ExecDomain
from org.corebounce.threads &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; Exec
from org.eclipse.swt &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; SWT
from org.corebounce.rcp &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; Restart

class SWTThread(lang.&lt;SPAN class="" style="color: #910091;"&gt;Runnable&lt;/SPAN&gt;):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def run(unused):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doit()

 def swt(cmd):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global doit
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doit = cmd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecDomain.SWT.schedule(SWTThread(), Exec.SYNC)

# shutdown
swt(lambda: Restart.saveAndExit(False))&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;changing your workflow: is there a way you can increase the number of objects (500) per exporter run to decrease the number of export runs?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps a bit,&lt;/P&gt;&lt;P&gt;simon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: if you are interested in new things in CE 2017.1, feel free to sign up to the 2017.1 beta program:&amp;nbsp;&lt;A class="link-titled" href="https://earlyadopter.esri.com/project/home.html?cap=57ba5da90b5549f4bbac3c85599ae441&amp;amp;tab=1" title="https://earlyadopter.esri.com/project/home.html?cap=57ba5da90b5549f4bbac3c85599ae441&amp;amp;tab=1" rel="nofollow noopener noreferrer" target="_blank"&gt;Welcome to our Feedback Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:58:14 GMT</pubDate>
    <dc:creator>SimonHaegler</dc:creator>
    <dc:date>2021-12-11T22:58:14Z</dc:date>
    <item>
      <title>No more handles (SWT Error) while batch processing .gdb in python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527161#M7193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am processing large number of .gdb files the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;load 500 .gdb objects in CE&lt;/LI&gt;&lt;LI&gt;process these 500 objects&lt;/LI&gt;&lt;LI&gt;export them as .gdb&lt;/LI&gt;&lt;LI&gt;repeat&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;during this process, CE briefly displays and closes import and export gdb dialog windows as it should but after few iterations (the above process is repeated ~500 times)&amp;nbsp;It hangs up on one of these dialog windows and the script stops, UI freezes thus CE is irresponsible and I can't do anything with it other than close it. When I restart it, everything works as it should after I run the script again and it does another 500 iterations..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem that it displays is on the following screenshots - I am unable to post .logs of all the errors because UI is frozen at this state so I cannot open "save log" dialog window but I migh be able to make screenshots of all of them if it is necesarry:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="354698" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/354698_pastedImage_1.png" style="width: 620px; height: 197px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="354699" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/354699_pastedImage_2.png" style="width: 620px; height: 401px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was searching about this "no more handles SWT error" and found out that it's a common eclipse bug that has something to do with limited number of handles that OS provides to eclipse and when these handles run out an error occours or maybe it's a memory problem but I have 32GB and CE only uses 9GB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this is not CE-related bug and more like Eclipse-related but I would like to ask if anybody has any idea how to fix it or workaround:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Possible solutions that I can think of:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;increase number of handles that OS provides somehow (maybe edit something in CityEngine.ini)&lt;/LI&gt;&lt;LI&gt;make CE cleanup itself&amp;nbsp;&lt;SPAN&gt;after &lt;/SPAN&gt;&lt;SPAN&gt;some iterations&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(~400) by using some python code (maybe run garbage collector etc..)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;force CE to close after some iterations&amp;nbsp;(~400) &amp;nbsp;and then start again and continue where it left - and repeat - &lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;this can work - I can restart CE but I don't know how to force it to run a specific script after startup&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 08:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527161#M7193</guid>
      <dc:creator>MarekDekys</dc:creator>
      <dc:date>2017-05-31T08:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: No more handles (SWT Error) while batch processing .gdb in python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527162#M7194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which version of CityEngine are you using? we already fixed a number of handle leaks for CE2017.0 and are currently trying to reproduce your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the mean time and if you have the time, you could sign up for the 2017.0 beta and try again:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://earlyadopter.esri.com/callout/?callid=%7BB1E44416-F933-4C21-931F-90BE9A732613%7D" title="https://earlyadopter.esri.com/callout/?callid=%7BB1E44416-F933-4C21-931F-90BE9A732613%7D"&gt;Esri CityEngine&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 11:38:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527162#M7194</guid>
      <dc:creator>SimonHaegler</dc:creator>
      <dc:date>2017-06-13T11:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: No more handles (SWT Error) while batch processing .gdb in python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527163#M7195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was working with 2016.1 in that time. Now, when 2017.0. (final, non-beta) came out, I tested it again and I believe I have same (or similiar) error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this error happens while&amp;nbsp;exporting meshes of very large area into small tiles in .obj format. No more handles (SWT Error) occoured after around 10k exports (maybe this is the max limit of handles that OS provides to CE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the entire area has about 90k tiles - so 90k exports for one layer. If we export several layers for one small tile, by multiplying this number, we can end up&amp;nbsp;having&amp;nbsp;about 500k exports in total. which means restarting it for 50times or more depending where the automatic process stopped working which can take weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to solve this? maybe increase the number of handles for CE or to decrease handle usage?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the error log (I changed the long path of our original python script location to C:\python_script.py for better readability):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;eclipse.buildId=unknown&lt;BR /&gt;java.version=1.7.0_80&lt;BR /&gt;java.vendor=Oracle Corporation&lt;BR /&gt;BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=cs_CZ&lt;BR /&gt;Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault -data @noDefault -clean&lt;/P&gt;&lt;P&gt;Error&lt;BR /&gt;Mon Jul 31 20:22:43 CEST 2017&lt;BR /&gt;No more handles (PyException) - &lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt; File "C:\python_script.py", line 327, in &amp;lt;module&amp;gt;&lt;BR /&gt; export_meshes(return_coords(xx,yy,x,y),xx_yy,x_y,"mesh")&lt;BR /&gt; File "C:\python_script.py", line 247, in export_meshes&lt;BR /&gt; ce.export(ce.getObjectsFrom(ce.scene, ce.isGraphLayer), exportSettings)&lt;BR /&gt; File "C:\Users\WORKER\.CityEngine\2017.0R.win32.win32.x86_64\jythonCache\jscripting\CE.py", line 434, in export&lt;BR /&gt; PythonBridge.invoke3(None, 'CE', 'export', (objects), (settings), _jbool(interactive))&lt;BR /&gt; at org.python.pydev.jython.PythonBridge$MethodInfo.invoke(Unknown Source) &lt;BR /&gt; at org.python.pydev.jython.PythonBridge.invoke(Unknown Source) &lt;BR /&gt; at org.python.pydev.jython.PythonBridge.invoke3(Unknown Source) &lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source) &lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) &lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;/P&gt;&lt;P&gt;org.python.pydev.jython.ScriptError: org.python.pydev.jython.ScriptError: No more handles&lt;/P&gt;&lt;P&gt;at org.python.core.Py.JavaError(Py.java:516)&lt;BR /&gt; at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)&lt;BR /&gt; at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)&lt;BR /&gt; at org.python.core.PyObject.__call__(PyObject.java:373)&lt;BR /&gt; at org.python.core.PyObject.__call__(PyObject.java:377)&lt;BR /&gt; at jscripting.CE$py.export$24(C:\Users\WORKER\.CityEngine\2017.0R.win32.win32.x86_64\jythonCache\jscripting\CE.py:434)&lt;BR /&gt; at jscripting.CE$py.call_function(C:\Users\WORKER\.CityEngine\2017.0R.win32.win32.x86_64\jythonCache\jscripting\CE.py)&lt;BR /&gt; at org.python.core.PyTableCode.call(PyTableCode.java:165)&lt;BR /&gt; at org.python.core.PyBaseCode.call(PyBaseCode.java:301)&lt;BR /&gt; at org.python.core.PyBaseCode.call(PyBaseCode.java:157)&lt;BR /&gt; at org.python.core.PyFunction.__call__(PyFunction.java:368)&lt;BR /&gt; at org.python.core.PyMethod.__call__(PyMethod.java:151)&lt;BR /&gt; at org.python.pycode._pyx1327.export_meshes$10(C:\python_script.py:255)&lt;BR /&gt; at org.python.pycode._pyx1327.call_function(C:\python_script.py)&lt;BR /&gt; at org.python.core.PyTableCode.call(PyTableCode.java:165)&lt;BR /&gt; at org.python.core.PyBaseCode.call(PyBaseCode.java:184)&lt;BR /&gt; at org.python.core.PyFunction.__call__(PyFunction.java:380)&lt;BR /&gt; at org.python.pycode._pyx1327.f$0(C:\python_script.py:277)&lt;BR /&gt; at org.python.pycode._pyx1327.call_function(C:\python_script.py)&lt;BR /&gt; at org.python.core.PyTableCode.call(PyTableCode.java:165)&lt;BR /&gt; at org.python.core.PyCode.call(PyCode.java:18)&lt;BR /&gt; at org.python.core.Py.runCode(Py.java:1312)&lt;BR /&gt; at org.python.core.Py.exec(Py.java:1356)&lt;BR /&gt; at org.python.pycode._pyx1328.f$0(&amp;lt;string&amp;gt;:1)&lt;BR /&gt; at org.python.pycode._pyx1328.call_function(&amp;lt;string&amp;gt;)&lt;BR /&gt; at org.python.core.PyTableCode.call(PyTableCode.java:165)&lt;BR /&gt; at org.python.core.PyCode.call(PyCode.java:18)&lt;BR /&gt; at org.python.core.Py.runCode(Py.java:1312)&lt;BR /&gt; at org.python.core.Py.exec(Py.java:1356)&lt;BR /&gt; at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)&lt;BR /&gt; at org.python.pydev.jython.JythonPlugin.exec(Unknown Source)&lt;BR /&gt; at org.python.pydev.jython.JProcess.run(Unknown Source)&lt;BR /&gt;Caused by: org.python.pydev.jython.ScriptError: No more handles&lt;BR /&gt; at org.python.pydev.jython.PythonBridge$MethodInfo.invoke(Unknown Source)&lt;BR /&gt; at org.python.pydev.jython.PythonBridge.invoke(Unknown Source)&lt;BR /&gt; at org.python.pydev.jython.PythonBridge.invoke3(Unknown Source)&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt; at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)&lt;BR /&gt; ... 30 more&lt;BR /&gt;Caused by: org.eclipse.swt.SWTError: No more handles&lt;BR /&gt; at org.eclipse.swt.SWT.error(SWT.java:4387)&lt;BR /&gt; at org.eclipse.swt.SWT.error(SWT.java:4276)&lt;BR /&gt; at org.eclipse.swt.SWT.error(SWT.java:4247)&lt;BR /&gt; at org.eclipse.swt.internal.ImageList.copyWithAlpha(ImageList.java:179)&lt;BR /&gt; at org.eclipse.swt.internal.ImageList.set(ImageList.java:409)&lt;BR /&gt; at org.eclipse.swt.internal.ImageList.add(ImageList.java:70)&lt;BR /&gt; at org.eclipse.swt.widgets.Button._setImage(Button.java:126)&lt;BR /&gt; at org.eclipse.swt.widgets.Button.setImage(Button.java:943)&lt;BR /&gt; at org.corebounce.adapters.ObjectAdapterFactory.createPoint3DUI(Unknown Source)&lt;BR /&gt; at org.corebounce.adapters.ObjectAdapterFactory.createInputField(Unknown Source)&lt;BR /&gt; at org.corebounce.adapters.ObjectAdapterFactory.createInputFields(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.AdaptableInspector.createInputFields(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.AdaptableInspector.createPartControl(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.AbstractInspector.createPartControl(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.Inspector.createUIElements(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.Inspector.updateUI(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.Inspector.setInput(Unknown Source)&lt;BR /&gt; at org.corebounce.inspectors.Inspector.setInput(Unknown Source)&lt;BR /&gt; at com.procedural.ceui.wizards.ExportSettingsPage.createControl(Unknown Source)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1246)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1238)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1227)&lt;BR /&gt; at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1225)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)&lt;BR /&gt; at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)&lt;BR /&gt; at org.corebounce.ui.WizardUtilities$ScriptWizardDialog.buttonPressed(Unknown Source)&lt;BR /&gt; at com.procedural.ceattribute.ScriptInterfaceExport.export(Unknown Source)&lt;BR /&gt; at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt; at org.python.pydev.jython.PythonBridge$MethodInfo$1.run(Unknown Source)&lt;BR /&gt; at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)&lt;BR /&gt; at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)&lt;BR /&gt; at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)&lt;BR /&gt; at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)&lt;BR /&gt; at org.corebounce.rcp.CBDisplay.readAndDispatch(Unknown Source)&lt;BR /&gt; at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)&lt;BR /&gt; at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)&lt;BR /&gt; at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)&lt;BR /&gt; at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)&lt;BR /&gt; at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)&lt;BR /&gt; at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)&lt;BR /&gt; at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)&lt;BR /&gt; at com.procedural.cityengine.release.Application.start(Unknown Source)&lt;BR /&gt; at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)&lt;BR /&gt; at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)&lt;BR /&gt; at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)&lt;BR /&gt; at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)&lt;BR /&gt; at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt; at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)&lt;BR /&gt; at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)&lt;BR /&gt; at org.eclipse.equinox.launcher.Main.run(Main.java:1438)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 08:42:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527163#M7195</guid>
      <dc:creator>MarekDekys</dc:creator>
      <dc:date>2017-08-01T08:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: No more handles (SWT Error) while batch processing .gdb in python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527164#M7196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi marek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apologies for the&amp;nbsp;late response. it indeed looks like that&amp;nbsp;the export dialog is leaking OS handles, i hope there is time to fix this for 2017.1. for now, let's look at the possible workarounds:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;increase OS handles: there seems to be some advanced ways to increase the OS handle limit (e.g.&amp;nbsp;&lt;A class="link-titled" href="https://stackoverflow.com/questions/9723470/whats-the-upper-limit-on-gdi-objects-for-one-process-in-windows-7" title="https://stackoverflow.com/questions/9723470/whats-the-upper-limit-on-gdi-objects-for-one-process-in-windows-7" rel="nofollow noopener noreferrer" target="_blank"&gt;What's the upper limit on GDI objects for one process in Windows 7? - Stack Overflow&lt;/A&gt;&amp;nbsp;). i doubt you'll be able to tweak your system to get up to 500k exports. also, this is not an CityEngine setting, it is an OS setting and might have undesired side-effects on your workstation.&lt;/LI&gt;&lt;LI&gt;restarting CE (part 1): looks like the best workaround for now (although slow). if a script called "startup.py" is present in the workspace root, it will execute automatically at startup (&lt;A class="link-titled" href="http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/python/python_scripting04.html" title="http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/python/python_scripting04.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Help&lt;/A&gt;).&amp;nbsp;you can use system properties to communicate with the script (e.g. to specify where to continue working):&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 16px;"&gt;f&lt;/SPAN&gt;or example, you&amp;nbsp;start CityEngine with: "CityEngine -vmargs -Dfoo=bar"&lt;/LI&gt;&lt;LI&gt;in python, run this:&lt;BR /&gt;from java.lang import System&lt;BR /&gt;print&amp;nbsp;System.getProperty("foo") # this will print "bar"&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;restarting CE (part 2): to shutdown CE correctly please use this script (we are working on a more convenient way):&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from java &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; lang
from org.corebounce.threads &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; ExecDomain
from org.corebounce.threads &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; Exec
from org.eclipse.swt &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; SWT
from org.corebounce.rcp &lt;SPAN class="" style="color: #000091;"&gt;import&lt;/SPAN&gt; Restart

class SWTThread(lang.&lt;SPAN class="" style="color: #910091;"&gt;Runnable&lt;/SPAN&gt;):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def run(unused):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doit()

 def swt(cmd):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global doit
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doit = cmd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecDomain.SWT.schedule(SWTThread(), Exec.SYNC)

# shutdown
swt(lambda: Restart.saveAndExit(False))&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;changing your workflow: is there a way you can increase the number of objects (500) per exporter run to decrease the number of export runs?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps a bit,&lt;/P&gt;&lt;P&gt;simon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: if you are interested in new things in CE 2017.1, feel free to sign up to the 2017.1 beta program:&amp;nbsp;&lt;A class="link-titled" href="https://earlyadopter.esri.com/project/home.html?cap=57ba5da90b5549f4bbac3c85599ae441&amp;amp;tab=1" title="https://earlyadopter.esri.com/project/home.html?cap=57ba5da90b5549f4bbac3c85599ae441&amp;amp;tab=1" rel="nofollow noopener noreferrer" target="_blank"&gt;Welcome to our Feedback Community&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:58:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/no-more-handles-swt-error-while-batch-processing/m-p/527164#M7196</guid>
      <dc:creator>SimonHaegler</dc:creator>
      <dc:date>2021-12-11T22:58:14Z</dc:date>
    </item>
  </channel>
</rss>

