Skip to content

[Bug] "/ah cancel" corrupts database and prevents server from starting #8

@spexce

Description

@spexce

https://pastebin.com/e1eqhL9J

Mod Version:
AuctionHouse 1.2.3 (NeoForge 1.21.1)

Environment:

  • All The Mods 10 (NeoForge 21.1.203)
  • Database: default auctionhouse.db (SQLite)

Steps to Reproduce

  1. Start server with a fresh auctionhouse.db.
  2. List an item on the AuctionHouse.
  3. Run /ah cancel. (Items are removed from the AH as expected.)
  4. Restart the server.

Expected Behavior

  • Items are canceled/returned.
  • Database remains valid.
  • Server restarts without issue.

Actual Behavior

  • On next restart, AuctionHouse throws errors:
    • [SQLITE_NOTADB] File opened that is not a database file
    • Failed to create tables
    • Failed to get most recent ID
  • Server spams log on startup; AuctionHouse fails to load; DB is unrecoverable without manual reset.

Impact

  • Server no longer able to start after being stopped
  • Entire AuctionHouse system becomes unusable.
  • Admin must delete/rename auctionhouse.db to let the server start again (all auctions lost).

Notes

  • Issue is 100% reproducible on a clean install.
  • Appears that /ah cancel is leaving the database in an invalid state (possibly writing corrupt rows or incomplete transactions).
  • Workaround: Do not use /ah cancel. Let listings expire naturally, or reset DB manually if a wipe is needed.

Request

  • Investigate /ah cancel transaction handling.
  • Add safety checks to prevent DB corruption.
  • Consider adding a safe “clear auctions” admin command as an alternative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions