Multiple KeyErrors leading to segfaults with custom properties I know that Segmentation Fault is some sort of memory error having to do with C and C++ - beyond that I don't really know how to handle it. I read up on this error through this post on stackoverflow, and this post on multi-file registering/unregistering but still don't have much of a clue.
I am experimenting with custom properties, sliders and operators. Everything as far as I can tell is accessing what it is supposed to (as in, I adjust the slider and the appropriate object's value is updated) but I am getting a bajillion KeyError's and then Blender crashes with a segfault.
Code
# Functions/Callbacks

    def get_rotate_cam(self):
        return self[&quot;Rotate Camera&quot;]
    
    def set_rotate_cam(self, value):
        self[&quot;Rotate Camera&quot;] = value
    
    def update_rotate_cam(self, context):
        for obj in bpy.context.selected_objects:
            bpy.ops.opject.select_pattern(pattern=&quot;Camera&quot;)
            obj.rotation_euler[0] = get_rotate_cam_x(self)

#Property Group

    class SliderProperties(bpy.types.PropertyGroup):
        bpy.types.Scene.rotCam = FloatProperty(
            name=&quot;Rotate Camera&quot;,
            description=&quot;Rotate the camera with the slider&quot;
            default=0,
            min=0,
            max=360,
            update=update_rotate_cam,
            get=get_rotate_cam,
            set=set_rotate_cam
        )

#Panel

    class EditStuff(bpy.types.Panel):
        bl_label = &quot;Edit&quot;
        bl_space_type = &quot;VIEW_3D&quot;
        bl_region_type = &quot;TOOLS&quot;
        bl_context = &quot;objectmode&quot;
    
        def draw(self, context):
            layout = self.layout
            layout.prop(bpy.context.scene, &quot;rotCam&quot;)

# Registration


    def register():
        bpy.utils.register_module(__name__)
    def unregister():
        bpy.utils.unregister_module(__name__)
    
    if __name__ == &quot;__main__&quot;:
        register()

So I am clearly doing something super inefficient here, I'm just not sure what it is. What is also throwing me off is when I use the custom slider once, clear the terminal, I don't get the KeyError any more. That has me thinking that it is some sort of initialization or context shenanegains going on. Hanging pointer maybe? Just not sure.
I also have a similar set up with compositor nodes to adjust things like shadows. Everything works correctly, I can adjust the shadows, but the KeyError makes Blender crash.
Thanks for the help!
I might be mis-interpretting your question but, this works:

import bpy
import math

def update_rotate_cam(self, context):
    v = bpy.context.scene.rotCam
    bpy.data.objects['Camera'].rotation_euler.x = math.radians(v)

class SliderProperties(bpy.types.PropertyGroup):
    bpy.types.Scene.rotCam = bpy.props.FloatProperty(
        name="Rotate Camera",
        description="Rotate the camera with the slider",
        default=0,
        min=0,
        max=360,
        update=update_rotate_cam,
    )

class EditStuff(bpy.types.Panel):
    bl_label = "Edit"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        layout.prop(bpy.context.scene, "rotCam")

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


In python a safe way to access items using a key is often done this way:

# returns None if key isn't found 
v = some_collection.get(key_name) 

# or provide the fallback value if not found
v = some_collection.get(key_name, fallback)