Crash on start-up

What’s The Bug?

Crash on start-up

How To Reproduce It

Crash on start-up

The Expected Behavior

Open on start-up

Additional Context:

This crash log indicates a runtime error in a Go program, specifically related to the Badger database, which is a key-value store written in Go. Let’s break down the key parts of this log to understand what’s going wrong:

  1. Panic Message - Index Out of Range:

    • panic: runtime error: index out of range [3] with length 0
    • This message indicates that the program attempted to access an index (in this case, index 3) in a slice or array, but the length of the slice or array is 0. This is a common runtime error in Go and suggests that the program is trying to access data that doesn’t exist or has not been initialized properly.
  2. Recovery Attempt:

    • The log shows an attempt to recover from this panic with information about the file that caused the issue: File Info: [ID: 8, Size: 18210643, Zeros: 18210643].
    • The file is not encrypted (isEncrypted: false) and lacks checksum and index information (checksumLen: 0, indexLen: 0, index: []).
    • This suggests that the program might be trying to work with a database file that is empty or corrupted.
  3. Stack Trace:

    • The stack trace points to the specific functions in the code where the error occurred. Notably, it highlights*Table).initIndex and*Table).readTableIndex.
    • These functions are part of the Badger database’s handling of table indexes. The error appears to occur when the program attempts to initialize or read the table index.
  4. Possible Causes:

    • The issue could be due to a corrupted or empty database file. Since the file size is significant (18210643 bytes) but it’s filled with zeros, it suggests the file might be corrupted.
    • The program might not be handling empty or uninitialized data correctly, leading to an attempt to access an index in an empty array.
  5. Resolution Steps:

    • Verify the integrity of the database files used by the application.
    • Ensure that the program correctly checks for empty or null values before attempting to access array or slice indexes.
    • Review the initialization process of the database to ensure that all necessary data structures are properly set up.

In summary, the crash is caused by an attempt to access an index in an empty or uninitialized data structure, likely related to the handling of a database table in the Badger key-value store. The resolution involves both checking the integrity of the database files and reviewing the code for proper handling of empty or uninitialized data.


Windows 11


Windows 11

Anytype Version


Technical Information

Can’t open Anytype

I’m having same problem. Thanks for reporting it quick