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

'cln' crash #350

Open
FaZz321 opened this issue May 30, 2024 · 2 comments
Open

'cln' crash #350

FaZz321 opened this issue May 30, 2024 · 2 comments

Comments

@FaZz321
Copy link

FaZz321 commented May 30, 2024

Noticed that pushing "cln" button causes a crash with 'signal 11' in one of my abandoned projects. (can be reproduced in 1.04)

Also, doesn't 'cln' mean 'clean'? I think 'seq' does what 'cln' should (not sure).

Module:
https://disk.yandex.ru/d/8nfnO_smpmvN7Q

@FaZz321 FaZz321 changed the title 'cln' crash. 'cln' crash May 30, 2024
@lmnoop
Copy link
Contributor

lmnoop commented May 30, 2024

"Cln" means clone. It clones the current pattern to the next unused pattern number and inserts that into the sequence. "Seq" only does the latter.

@coderofsalvation
Copy link
Contributor

I've been testing this with a debug build, and added a printf at ModuleEditor::seqCurrentOrderPosition:

  if (clone)
  {   
    // now clone pattern       
    printf("dest %i src %i\n",(int)dstPatternIndex,(int)srcPatternIndex);
    module->phead[dstPatternIndex] = module->phead[srcPatternIndex];                                                                                                                          
  }

gdb gives this backtrace

dest 256 src 160

Thread 1 "milkytracker" received signal SIGSEGV, Segmentation fault.
0x00007ffff76b232e in free () from /nix/store/j0by58xwyc66f884x0q8rpzvgpwvjmf2-glibc-2.38-77/lib/libc.so.6
(gdb) bt
#0  0x00007ffff76b232e in free () from /nix/store/j0by58xwyc66f884x0q8rpzvgpwvjmf2-glibc-2.38-77/lib/libc.so.6
#1  0x00000000004f72dd in TXMPattern::operator= (this=0x751740, src=...) at /home/leon/projects/MilkyTracker/src/milkyplay/XModule.cpp:1179
#2  0x00000000004266d7 in ModuleEditor::seqCurrentOrderPosition (this=this@entry=0x6e7eb0, index=<optimized out>, clone=clone@entry=true)
    at /home/leon/projects/MilkyTracker/src/tracker/ModuleEditor.cpp:933
#3  0x00000000004a1818 in Tracker::handleEvent (this=0x723740, sender=0x118c9b0, event=<optimized out>) at /home/leon/projects/MilkyTracker/src/tracker/Tracker.cpp:1007
#4  0x000000000051c021 in PPButton::handleButtonRelease (this=0x118c9b0, event=0x7fffffff6960, postEvent=eCommand, rMouseDown=<optimized out>, lMouseDown=<optimized out>)
    at /home/leon/projects/MilkyTracker/src/ppui/Button.cpp:309
#5  0x000000000051d0a9 in PPButton::dispatchEvent (this=0x118c9b0, event=0x7fffffff6960) at /home/leon/projects/MilkyTracker/src/ppui/Button.cpp:233
#6  0x000000000051e654 in PPContainer::dispatchEvent (this=0x118c5b0, event=0x7fffffff6960) at /home/leon/projects/MilkyTracker/src/ppui/Container.cpp:116
#7  0x000000000051e654 in PPContainer::dispatchEvent (this=0xd00e80, event=0x7fffffff6960) at /home/leon/projects/MilkyTracker/src/ppui/Container.cpp:116
#8  0x00000000004bef80 in RaiseEventSerialized (event=0x7fffffff6960) at /home/leon/projects/MilkyTracker/src/tracker/sdl/SDL_Main.cpp:152
#9  RaiseEventSerialized (event=0x7fffffff6960) at /home/leon/projects/MilkyTracker/src/tracker/sdl/SDL_Main.cpp:147
#10 translateMouseUpEvent (mouseButton=<optimized out>, localMouseX=<optimized out>, localMouseY=<optimized out>) at /home/leon/projects/MilkyTracker/src/tracker/sdl/SDL_Main.cpp:432
#11 0x0000000000412a68 in main (argc=<optimized out>, argv=<optimized out>) at /home/leon/projects/MilkyTracker/src/tracker/sdl/SDL_Main.cpp:1050

I was hoping somebody with c++/operator-overloading experience could figure this one out

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