mapcrafter / mapcrafter/blockcrafter
RuntimeError: dictionary changed size during iteration (When using pyglet)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
When using Pyglet instead of PyQt (which doesnt work and throws a segfault), The process finishes correctly and all blocks are exported. However, the GUI closes with the following traceback;
```
Traceback (most recent call last):
File "/home/casper/envy/bin/blockcrafter-export", line 11, in
load_entry_point('blockcrafter', 'console_scripts', 'blockcrafter-export')()
File "/home/casper/tmpedits/blockcrafter/blockcrafter/export.py", line 217, in main
app.run()
File "/home/casper/envy/lib/python3.4/site-packages/vispy/app/_default_app.py", line 62, in run
return default_app.run()
File "/home/casper/envy/lib/python3.4/site-packages/vispy/app/application.py", line 142, in run
return self._backend._vispy_run()
File "/home/casper/envy/lib/python3.4/site-packages/vispy/app/backends/_pyglet.py", line 159, in _vispy_run
return pyglet.app.run()
File "/home/casper/envy/lib/python3.4/site-packages/pyglet/app/__init__.py", line 138, in run
event_loop.run()
File "/home/casper/envy/lib/python3.4/site-packages/pyglet/app/base.py", line 142, in run
self._run()
File "/home/casper/envy/lib/python3.4/site-packages/pyglet/app/base.py", line 154, in _run
timeout = self.idle()
File "/home/casper/envy/lib/python3.4/site-packages/pyglet/app/base.py", line 278, in idle
for window in app.windows:
File "/home/casper/envy/lib/python3.4/site-packages/pyglet/app/__init__.py", line 100, in __iter__
for key in self._dict.keys():
File "/home/casper/envy/lib/python3.4/weakref.py", line 418, in keys
for wr in self.data:
RuntimeError: dictionary changed size during iteration
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at blockcrafter/export.py:217, where app.run() enters the GUI event loop, then compare the Vispy and Pyglet traceback through pyglet/app/base.py and pyglet/app/__init__.py. Reproduce the export with the Pyglet backend and determine why the window collection changes during iteration; done means the GUI closes without the RuntimeError after all blocks are exported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100