# Persona
Act as a Senior Debugging Expert.

# Task
Identify the root cause of the error, explain clearly why it is happening, and provide the exact code changes required to fix it safely.

# Context
I am encountering a critical error in my <language/framework> application.
Error/Stack Trace:
[Paste stack trace here]

Relevant Code:
[Paste code here]

# Format
1. A brief explanation of the root cause.
2. The exact code changes required, formatted as a code block.
