The cursor app crashes consistently on windows 11

hii. the app crashes a lot - even when I make new chat


instances

Getting the same problem! On a Mac here-just started ocurring today, even though I’ve been a cursor user for a while

The window terminated unexpectedly (reason: ‘crashed’, code: ‘5’)

Ack, thank you both for reporting this. What version of the app are you on?

Would also be helpful to see a screenshot for the mac error

Could you confirm whether the error persists after you do the following:

  1. Clear all your local Cursor data by deleting the following folder:
  • Mac: rm ~/Library/Application\ Support/Cursor
  • Windows: rd -r %UserProfile%\AppData\Roaming\Cursor\Cache; rd -r %UserProfile%\AppData\Local\Programs\Cursor\Cache
  1. Close and reopen Cursor. You’ll have to redo the onboarding flow. You might want to reimport your VSCode settings.

This will help us locate the bug. Apologies about this and really appreciate you both reporting this.

If the error persists after following Michael’s instructions, could you run:

cursor --crash-reporter-directory /path/to/workspace (You’ll need to have the cursor command installed. If it is not installed, please run cmd+shift+p > “Shell command install cursor command”)

Then look for a *.dmp file in that directory and send it to us

alright, i’ll do this now and circle back.

1 Like

Thank you!

hi Michael, this worked for me. Thanks for the wonderful support! Love your product

ok update.

  1. after deleting my cache folder, i still run into the crashing.
  2. so I proceeded to run cursor --crash-reporter-directory "C:\Users\redacted\CrashReports in an elevated cmd instance and I got a dmp file. how do I send it over?

Send it to hi@cursor.so or aman@cursor.so

Actually, there are two cache folders on windows. Just updated the command.

Our suspicion is that you ran into a bug where a large file got added into your cache. We will push a fix soon!

Also, would be useful if you could run this python script and report back the results

import os
import json
import sqlite3
from collections import defaultdict

# replace with your app name
app_name = "Cursor"
search_dir = os.path.join(os.getenv("HOME"), "Library", "Application Support", app_name, "User", "workspaceStorage")

good_dir = None
for root, dirs, files in os.walk(search_dir):
    if 'workspace.json' in files:
        with open(os.path.join(root, 'workspace.json')) as f:
            data = json.load(f)
            folderUri: str = data['folder']
            if folderUri.endswith('everysphere'):
                print(f"Found 'everysphere' in {root}")
                good_dir = root
                break

# Next we open {root}/state.vscdb

if good_dir is None:
    print("No good directory found")
    exit(1)

db_path = os.path.join(good_dir, 'state.vscdb')
conn = sqlite3.connect(db_path)

# Now we can query the database for the files we want
c = conn.cursor()
execution = c.execute("SELECT LENGTH(value) as size, key FROM ItemTable ORDER BY size DESC LIMIT 10;")
results = execution.fetchall()
results = [(size, key) for size, key in results]
for size, key in results:
    print(size, key)
# instead print the size in mb (from bytes)
for size, key in results:
    print(f"{size/1024/1024:.2f}mb {key}")


# Investigate workspace user key
BAD_KEY = 'src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.workspaceUser'

c.execute("SELECT value FROM ItemTable WHERE key = ?;", (BAD_KEY,))
result, = c.fetchone()
actual_data = json.loads(result)

print()
def get_bad_dict_size(d: dict):
    for k, v in d.items():
        print(len(json.dumps(v)), k)
def get_bad_list_of_dicts_size(l: list[dict]):
    key_sizes = defaultdict(int)
    for d in l:
        for k, v in d.items():
            key_sizes[k] += len(json.dumps(v))

    for k, v in key_sizes.items():
        print(v, k)

print()
get_bad_dict_size(actual_data)
print()
get_bad_list_of_dicts_size(actual_data['persistentChatMetadata'])