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

BambooTracker crashes at startup #180

Closed
freq-mod opened this issue Jan 23, 2020 · 25 comments
Closed

BambooTracker crashes at startup #180

freq-mod opened this issue Jan 23, 2020 · 25 comments

Comments

@freq-mod
Copy link
Contributor

After downloading latest dev build (commit 1354972) BambooTracker won't start, throwing the following error dialog two times:
An unknown error occured.
vector::_M_range_check:__N (which is 15) >= this -> size() (which is 15)
OS is Windows 10 x64.

@rerrahkr
Copy link
Member

Thanks for your report. I can't reproduce it on my Windows 10 x64.
15 is the number of tracks, so something might be wrong in the pattern editor or the order list. Maybe it is caused by 82f036c and 4eee752...
Would you mind testing dev builds before and after these commits?

@freq-mod
Copy link
Contributor Author

4eee752 - crash, throws error only once rather than twice though
82f036c - throws error, but starts

@rerrahkr
Copy link
Member

I suppose 4e34ed8 will run fine.

I think there are inappropriate conditions of for loop about the index of tracks in repainting these views.

@rerrahkr
Copy link
Member

I added index check in for loop at ccd8b3e. Could you check the dev build again?

@freq-mod
Copy link
Contributor Author

It still won't start.
But, on another computer, also with Windows 10 (Enterprise LTSB) it works fine, starting without any error dialog.
I have no idea, what's going on then.

@rerrahkr
Copy link
Member

Could you please test builds before 82f036c? I want to know from which commit the error is occurred. Sorry for having you check again and again.

@freq-mod
Copy link
Contributor Author

4e34ed8 works flawlessly.
If I have a bit of time tomorrow, I will play around with gdb/other debugger to investigate the crash

@freq-mod
Copy link
Contributor Author

freq-mod commented Jan 26, 2020

Now, since da04f4c there are no error dialogs, but application doesn't start anyway.
GDB reveals: Program received signal SIGSEGV, Segmentation fault. 0x00495800 in ?? ()
(gdb) bt #0 0x00495800 in ?? () #1 0x00000000 in ?? ()

@rerrahkr
Copy link
Member

I don't know exactly what the cause is from GDB log, but it may be happened the segmentation fault by calling that Configuration config_ methods before the reference is set. I'll try to avoid it by setting a dummy configuration at initializer of these views.

@rerrahkr
Copy link
Member

I'll try to avoid it by setting a dummy configuration at initializer of these views.

I changed it at a79e978.

@freq-mod
Copy link
Contributor Author

That didn't help, sadly.
Program received signal SIGSEGV, Segmentation fault. 0x00495ae0 in ?? ()

@Ikalou
Copy link

Ikalou commented Jan 26, 2020

Same here on Windows 10 Pro 1909:

  • 0.3.3.36 opens without any issues
  • 0.3.3.37+ have the assertion failure (vector::_M_range_check) and sometimes segfault on startup

Sorry I don't have more information at this time.

@rerrahkr
Copy link
Member

78fb2db, change to start the audio stream after initial module load.

I also work on at fix-crash-at-launch branch about this issue, and check changes from 82f036c in detail. At 285cba5, I commented out order/pattern's show&resize events called immediately after launch. Is there a problem with dev build?

@freq-mod
Copy link
Contributor Author

With 285cba5, there is some improvement - no error dialogs, window appears, but crashes to desktop after ~1 second. GDB: (gdb) bt
#0 0x004347e0 in ?? ()
#1 0x0040e0f8 in ?? ()
#2 0x00554352 in ?? ()
#3 0x00730072 in ?? ()
#4 0x0061005c in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

78fb2db was the same as earlier builds - tracker won't even start.

@rerrahkr
Copy link
Member

At 1d701ef, Changed the maximum of horizontal slider to only be called once in onSongLoaded() while constructor is running.
69fcf1c is commented out initialization of slider maximum.

@freq-mod
Copy link
Contributor Author

freq-mod commented Jan 27, 2020

Both 1d701ef and 69fcf1c work! Thank you!

@rerrahkr
Copy link
Member

rerrahkr commented Jan 27, 2020

It seems the problem with the order of method calls. Next we try to check show/resize events.
7aa79b0 is only masked resizeEvent, and ac2d19f is masked showEvent.
They calls the function setting maximum of horizontal slider too. I think that it is probably necessary to modify the execution order of the function.

EDIT: I added 9c58da6, it is masked not only showEvent, but also hasShown_ flag which is used to skip slider max change when views haven't shown yet.

@freq-mod
Copy link
Contributor Author

All three of them don't start, crashing with segfault.

@rerrahkr
Copy link
Member

It is most likely due to the pointer of core module bt_ referencing before being set in each editor.
af41a73, I added instance checks about the core pointer (like paintEvent in OrderListPanel and PatternEditorPanel). In this commit, showEvent is removed because slider maximum is initialized in onSongLoaded.

@freq-mod
Copy link
Contributor Author

af41a73 - white application window apeears for ~ 2 seconds or so, then crashes to desktop with segfault.

@rerrahkr
Copy link
Member

I modify source to check that a song has loaded when calling slider max change at 06ee845.

@freq-mod
Copy link
Contributor Author

Now it launches just fine.

@rerrahkr
Copy link
Member

Okay, the issue seems to be finally solved. At b640863, I did squash-merge the commits in fix-crash-at-launch to master. Could you please check if this dev build works fine?

@freq-mod
Copy link
Contributor Author

Yes it does. Thank you so much!

@rerrahkr
Copy link
Member

And thank you too for much help!

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