godotengine / godotengine/godot

Linux: Blender process not stopping on Godot-Exit

Open
#97,429 3 comments 0 reactions 0 assignees View on GitHub
bug platform:linuxbsd topic:thirdparty
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot v4.3.stable

### System information

Godot v4.3.stable - KDE neon 6.1 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 (nvidia; 535.183.01) - AMD Ryzen 5 5500 (12 Threads)

### Issue description

After exiting Godot my Blender process stays alive.
Below a sample output of `ps -ef | grep blender` after exiting Godot.

```
user 840681 1998 0 00:31 ? 00:00:01 /snap/blender/5374/blender --background --python-expr import bpy, sys, threading from xmlrpc.server import SimpleXMLRPCServer req = threading.Condition() res = threading.Condition() info = None export_err = None def xmlrpc_server(): server = SimpleXMLRPCServer(('127.0.0.1', 6011)) server.register_function(export_gltf) server.serve_forever() def export_gltf(opts): with req: global info info = ('export_gltf', opts) req.notify() with res: res.wait() if export_err: raise export_err # Important to return a value to prevent the error 'cannot marshal None unless allow_none is enabled'. return 'BLENDER_GODOT_EXPORT_SUCCESSFUL' if bpy.app.version < (3, 0, 0): print('Blender 3.0 or higher is required.', file=sys.stderr) threading.Thread(target=xmlrpc_server).start() while True: with req: while info is None: req.wait() method, opts = info if method == 'export_gltf': try: export_err = None bpy.ops.wm.open_mainfile(filepath=opts['path']) if opts['unpack_all']: bpy.ops.file.unpack_all(method='USE_LOCAL') bpy.ops.export_scene.gltf(**opts['gltf_options']) except Exception as e: export_err = e info = None with res: res.notify()
```

### Steps to reproduce

* Open Godot Project, which uses Blender imports
* Close Godot and see the process list, i.e. `ps -ef | grep blender`

### Minimal reproduction project (MRP)

-

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by opening a Godot project that uses Blender imports, closing Godot, and checking `ps -ef | grep blender` as described. Trace the Blender import process lifecycle and shutdown handling; done means the Blender process no longer remains alive after Godot exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, cpp, linux
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.