**System Information**
Operating system: Windows 10, 64 bit
Graphics card: Nvidia Geforce 1080, Nvidia Geforce 1070
**Blender Version**
Broken: 3.2.2
Worked: probably never, noticed this since 2.8
**Short description of error**
Hello there! I've been writing my own addons and stumbled upon a really bad problem, namely constant random crashes when using print() function to debug python scripts I am writing. It happens randomly but quite consistently, especially if you are using **for loops**. At a certain point blender just crashes with the following message, while trying to give out print() message:
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FFFB0DC78B6
Module : python310.dll
Thread : 00002cd8
Or something along those lines. It's been haunting me since I've tried blender in 2.8 and I don't know the reason why it does that on different PCs using Windows. If somebody does, please.
**Exact steps for others to reproduce the error**
1 - Open console window to track print() output
2 - Add some objects to the scene, for example 5-6 bones and enter edit mode
Write a lil script that goes somethin' like this:
```
import bpy
def get_selected_bones():
"""Get all selected bones in the viewport"""
self.selected_bones = bpy.context.selected_bones
return self.selected_bones
sel_bones = get_selected_bones()
for bone in sel_bones:
print(bone.name)
# I think this should work? Yeah, it should.
```
Run the script several times (remember to have console turned on, although it happens with it turned off too). It might crash on your first time, it might crash on your second, third, fifth. It's always random, but it's always a print() output that crashes blender with Error : EXCEPTION_ACCESS_VIOLATION message on WIN 10.