Skip to content

Conversation

@stubbornick
Copy link

Changes Proposed:

  • Fixed vector out-of-bounds access in AHBot buyer functionality

Issues Addressed:

  • The crash occurs due to unsafe vector access in the AHBot buyer functionality, causing a std::out_of_range exception:
    terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 2968787162) >= this->size() (which is 0) Caught signal 6

Tests Performed:

  • Built and tested on AzerothCore commit f332b0714077d7578e9bbe18951cefb330ec5052
  • Tested in-game with AHBot buyer functionality enabled
  • Verified that the server no longer crashes during AHBot buy operations

How to Test the Changes:

  1. Enable the AHBot module and specifically the buyer functionality.

  2. Set bids per interval higher than the actual auction count for each auction house:

    .ah bidsperinterval 2 4 
    .ah bidsperinterval 6 4 
    .ah bidsperinterval 7 4 
    
  3. Create test conditions:

    • Ensure there are fewer player auctions than the bidsperinterval count
    • Make sure there are no AHBot-created auctions
  4. Wait for the next AHBot cycle and verify:

    • The server doesn't crash during buy operations
    • The buy operations complete successfully

@Helias Helias merged commit 60d80b8 into azerothcore:master Mar 9, 2025
1 check passed
icemansparks added a commit to Merkerhood/mod-ah-bot that referenced this pull request Mar 14, 2025
icemansparks added a commit to Merkerhood/mod-ah-bot that referenced this pull request Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants