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

[bug] [crash] [std] Mojibake-like (or just unusual, non-ASCII characters) in the track title crash the SNES Tracker Debugger #183

Open
KungFuFurby opened this issue Jun 10, 2021 · 0 comments
Labels

Comments

@KungFuFurby
Copy link

Describe the bug
Mojibake-like titles are crashing the SNES Tracker Debugger. Specifically, this is actually caused when setting the window title, as the ultimate cause of the crash is a NSInternalInconsistencyException.

To Reproduce

  1. Load a SPC file (any title with a non-ASCII character will probably do the trick).
  2. Program immediately crashes.
    Here's the log as far as what happens:

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
abort() called
terminating with uncaught exception of type NSException

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff2e7b9657 __exceptionPreprocess + 250
1   libobjc.A.dylib                     0x00007fff676355bf objc_exception_throw + 48
2   CoreFoundation                      0x00007fff2e7e27f8 +[NSException raise:format:arguments:] + 88
3   Foundation                          0x00007fff30ed4e7d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4   AppKit                              0x00007fff2b9fe564 -[NSWindow setTitle:] + 185
5   libSDL2-2.0.0.dylib                 0x0000000101a377c2 Cocoa_SetWindowTitle + 105
6   SPC Debugger                        0x000000010172fdf3 _ZN5BaseD11start_trackEiPKc + 563
7   SPC Debugger                        0x000000010172d86c _ZN5BaseD6reloadEPPci + 748
8   SPC Debugger                        0x000000010172ff4a _ZN5BaseD10prev_trackEv + 58
9   SPC Debugger                        0x000000010175d386 _ZN11Main_Window13receive_eventER9SDL_Event + 1622
10  SPC Debugger                        0x000000010173c63f _ZN8Debugger13handle_eventsEv + 1167
11  SPC Debugger                        0x000000010173c136 _ZN8Debugger3runEv + 262
12  SPC Debugger                        0x0000000101745689 _ZN3App3runEv + 25
13  SPC Debugger                        0x0000000101749d69 main + 249
14  libdyld.dylib                       0x00007fff687ddcc9 start + 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff6892533a __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff689e1e60 pthread_kill + 430
2   libsystem_c.dylib             	0x00007fff688ac808 abort + 120
3   libc++abi.dylib               	0x00007fff65b0b458 abort_message + 231
4   libc++abi.dylib               	0x00007fff65afc8bf demangling_terminate_handler() + 262
5   libobjc.A.dylib               	0x00007fff676375a9 _objc_terminate() + 96
6   libc++abi.dylib               	0x00007fff65b0a887 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff65b0d1a2 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
8   libc++abi.dylib               	0x00007fff65b0d169 __cxa_throw + 113
9   libobjc.A.dylib               	0x00007fff676356ed objc_exception_throw + 350
10  com.apple.CoreFoundation      	0x00007fff2e7e27f8 +[NSException raise:format:arguments:] + 88
11  com.apple.Foundation          	0x00007fff30ed4e7d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
12  com.apple.AppKit              	0x00007fff2b9fe564 -[NSWindow setTitle:] + 185
13  libSDL2-2.0.0.dylib           	0x0000000101a377c2 Cocoa_SetWindowTitle + 105
14  SPC Debugger                  	0x000000010172fdf3 BaseD::start_track(int, char const*) + 563 (BaseD.cpp:474)
15  SPC Debugger                  	0x000000010172d86c BaseD::reload(char**, int) + 748 (BaseD.cpp:534)
16  SPC Debugger                  	0x000000010172ff4a BaseD::prev_track() + 58 (BaseD.cpp:592)
17  SPC Debugger                  	0x000000010175d386 Main_Window::receive_event(SDL_Event&) + 1622 (Main_Window.cpp:329)
18  SPC Debugger                  	0x000000010173c63f Debugger::handle_events() + 1167 (Debugger.cpp:131)
19  SPC Debugger                  	0x000000010173c136 Debugger::run() + 262 (Debugger.cpp:115)
20  SPC Debugger                  	0x0000000101745689 App::run() + 25 (app.cpp:32)
21  SPC Debugger                  	0x0000000101749d69 main + 249 (main.cpp:25)
22  libdyld.dylib                 	0x00007fff687ddcc9 start + 1

Expected behavior
The SPC file should play normally and without crashing the program due to the tagging.

Example File
BotB 14983 AugustusBlkheart - Längholmen.spc.zip

Desktop:

  • OS: Mac OS X Catalina 10.15.7 (self-compiled)
  • Version 0.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant