Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash When loading Module (2.0 Latest, Includes Dev Build) #126

Closed
N-SPC700 opened this issue May 12, 2019 · 4 comments
Closed

Crash When loading Module (2.0 Latest, Includes Dev Build) #126

N-SPC700 opened this issue May 12, 2019 · 4 comments

Comments

@N-SPC700
Copy link

N-SPC700 commented May 12, 2019

I recently updated from 1.6 of BambooTracker to 2.0 latest. I got curious and opened the newest demo module by SuperJetSpade(SJS), and listened through it. Then, I went and opened my module to continue working on something I was doing from a prior version. Program crashed, and error windows made Alt+F4 unable to close it, unless I closed it through Task Manager. After replicating, I can give the steps required to break BambooTracker.

  1. Load the Underwater Ruins module by SJS.
  2. Go to pattern frame 0F, and play it (doesn't matter how long).
  3. Attempt to load my module.
  4. BambooTracker should give an error related to vectors.
    Edit: The error is vector::_M_range_check: __n (which is 13) >= this->size() (which is 5)

The module I use, which happened to break BT:
Sophia (Take 2).zip

@OPNA2608
Copy link
Member

OPNA2608 commented May 13, 2019

Can be reproduced with the demo modules breeze2608.btm and any of the other two demos.

  1. Pick 2 modules, one has to be at least 2 Order list entries longer than the other one
  2. Load the longer module
  3. Move to an index in the Order view that's bigger than or equal to the smaller module's last Order index + 2
  4. Attempt to load the smaller module

Example:

  1. breeze2608.btm (0x20) and Lotus.btm (0x17, shorter by 9)
  2. Load breeze2608.btm
  3. Go to any Order index between 0x19 and 0x20
  4. Attempt to load Lotus.btm

Error:
grafik

I think this is a problem with updating/resetting the current position [inside the Order View], as the vertical scroll bar of the Order List also doesn't correctly update its position when loading another module.
grafik
Pressing the down arrow of the scroll bar here results in the Order index jumping down to where it was on the old module (13 here) + 1
grafik

It's likely that somewhere, the Order position is not being updated correctly resulting in it trying to point to an Order entry that is beyond the new module's list.
(Weirdly, if it's just off by 1 it loads fine and the view even jumps to the last order instead of the start? Something doesn't look right there either.)

Edit: Weirdly, BambooTracker can recover itself from the error on my end (Linux) and doesn't need to be forcibly killed, clicking away the error results in it dropping both modules and loading back into an empty setup like after startup.

@N-SPC700
Copy link
Author

In 2.0(.11?) dev, you can kill it by closing the errors. Oddly enough 2.0 release doesn't, which requires intervening by Task Manager.

@rerrahkr
Copy link
Member

Thanks for reports, @N-SPC700, @OPNA2608.
I missed position initialization in the order list when loading a new song, so I fixed it at f2c05a8.

Oddly enough 2.0 release doesn't, which requires intervening by Task Manager.

it doesn't occur on my windows 10, that's strange...

@rerrahkr
Copy link
Member

rerrahkr commented Sep 7, 2019

Since I have already fixed a bug on loading module, I close this issue.

@rerrahkr rerrahkr closed this as completed Sep 7, 2019
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

No branches or pull requests

3 participants