musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.2k stars 2.64k forks source link

Unable to Start debugging of startup project #18039

Closed Auase closed 1 year ago

Auase commented 1 year ago

Issue type

Other type of issue

Bug description

Unable to Start debugging of startup project,

06:35:47: Debugging F:\Qt\MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\app\MuseScore4.exe "-qmljsdebugger=port:1221,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation" ... 06:35:50.227 | INFO | main_thread | GlobalModule | onPreInit: log path: C:/Users/aneae/AppData/Local/MuseScore/MuseScore4Development/logs/MuseScore_230619_063550.log

06:35:50.228 | INFO | main_thread | GlobalModule | onPreInit: === Started MuseScore 4.1.0-dev, build number ===

06:35:50.284 | ERROR | main_thread | LanguagesService | loadLanguages: Failed to read languages.json: [401] The file does not exist

06:35:50.285 | ERROR | main_thread | LanguagesService | loadLanguage: Failed to scan files for language "" : [401] The file does not exist

06:35:50.285 | WARN | main_thread | IpcSocket | connect: failed connect to server

06:35:50.286 | WARN | main_thread | IpcSocket | connect: failed connect to server

06:35:50.290 | INFO | main_thread | IpcSocket | connect: success connected to ipc server

06:35:50.290 | INFO | 22084 | | operator : id: "ba52094a863241ff8db7063620f6748c"

06:35:51.765 | DEBUG | main_thread | DiagnosticsModule | onInit: crash server url:

06:35:51.765 | ERROR | main_thread | CrashHandler | start: crash handler not exists, path: F:/Qt/MuseScore/builds/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug/src/app/crashpad_handler.exe

06:35:51.766 | ERROR | main_thread | DiagnosticsModule | onInit: failed start crash handler

06:35:52.897 | INFO | main_thread | WasapiAudioDriver | open: WASAPI: trying to open the audio end-point with the following sample rate - 44100

06:35:52.897 | INFO | main_thread | WasapiAudioDriver | open: WASAPI: trying to open the audio end-point with the following samples per channel number - 4096

06:35:52.955 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Settings device client properties

06:35:52.957 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Getting device mix format

06:35:53.014 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Mix format after getting from audio client:

06:35:53.015 | INFO | 21136 | | logWAVEFORMATEX: Format tag: 65534

06:35:53.015 | INFO | 21136 | | logWAVEFORMATEX: Channels: 2

06:35:53.015 | INFO | 21136 | | logWAVEFORMATEX: Sample rate: 192000

06:35:53.016 | INFO | 21136 | | logWAVEFORMATEX: Average bytes per second: 1536000

06:35:53.016 | INFO | 21136 | | logWAVEFORMATEX: Block align: 8

06:35:53.016 | INFO | 21136 | | logWAVEFORMATEX: Bits per sample: 32

06:35:53.017 | INFO | 21136 | | logWAVEFORMATEX: cbSize: 22

06:35:53.017 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Modified mix format:

06:35:53.017 | INFO | 21136 | | logWAVEFORMATEX: Format tag: 3

06:35:53.018 | INFO | 21136 | | logWAVEFORMATEX: Channels: 2

06:35:53.018 | INFO | 21136 | | logWAVEFORMATEX: Sample rate: 192000

06:35:53.018 | INFO | 21136 | | logWAVEFORMATEX: Average bytes per second: 1536000

06:35:53.019 | INFO | 21136 | | logWAVEFORMATEX: Block align: 8

06:35:53.019 | INFO | 21136 | | logWAVEFORMATEX: Bits per sample: 32

06:35:53.019 | INFO | 21136 | | logWAVEFORMATEX: cbSize: 0

06:35:53.019 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Getting shared mode engine period

06:35:53.021 | INFO | 21136 | WasapiAudioClient | configureDeviceInternal: WASAPI: Device successfully configured

06:35:53.080 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Initialized WASAPI audio endpoint with:

06:35:53.080 | INFO | 21136 | | logWAVEFORMATEX: Format tag: 3

06:35:53.081 | INFO | 21136 | | logWAVEFORMATEX: Channels: 2

06:35:53.081 | INFO | 21136 | | logWAVEFORMATEX: Sample rate: 192000

06:35:53.082 | INFO | 21136 | | logWAVEFORMATEX: Average bytes per second: 1536000

06:35:53.082 | INFO | 21136 | | logWAVEFORMATEX: Block align: 8

06:35:53.083 | INFO | 21136 | | logWAVEFORMATEX: Bits per sample: 32

06:35:53.083 | INFO | 21136 | | logWAVEFORMATEX: cbSize: 0

06:35:53.084 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: HnsBufferDuration: 928798

06:35:53.084 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Minimal period in frames: 1920

06:35:53.085 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Default period in frames: 1920

06:35:53.085 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Fundamental period in frames: 1920

06:35:53.086 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Max period in frames: 1920

06:35:53.086 | INFO | 21136 | WasapiAudioClient | ActivateCompleted: Min period in frames: 1920

06:35:53.087 | ERROR | 21136 | WasapiAudioClient | setStateAndNotify:

06:35:53.088 | ERROR | 21136 | WasapiAudioClient | setStateAndNotify:

06:35:53.094 | ERROR | 6124 | WasapiAudioClient | setStateAndNotify:

06:35:53.644 | DEBUG | main_thread | ShortcutsRegister | expandStandardKeys: removed 5 shortcut, because they are not bound to standard key

06:35:53.644 | DEBUG | main_thread | ShortcutsRegister | expandStandardKeys: added 8 shortcut, because they are alternative shortcuts for the given standard keys

06:35:53.703 | DEBUG | main_thread | ShortcutsRegister | expandStandardKeys: removed 181 shortcut, because they are not bound to standard key

Exception at 0x7ffd5215536c, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) at D:\a_work\1\s\src\vctools\crt\github\stl\src\xthrow.cpp:21

Exception at 0x7ffd5215536c, code: 0xe06d7363: C++ exception, flags=0x81 at D:\a_work\1\s\src\vctools\crt\github\stl\src\xthrow.cpp:21

Steps to reproduce

Date of Get MuseScore's source code: June 19, 2023. I haven't modified any code, Qt Creator's Build and Run are default

Screenshots/Screen recordings

20230619063616 20230619065415 20230619063933 20230619063723 20230619064055 20230619064215

MuseScore Version

June 19, 2023

Regression

I don't know

Operating system

win11

Additional context

No response

bkunda commented 1 year ago

Thanks for logging this @Auase, at the moment this one seems difficult to reproduce so we can't prioritise it for the immediately forthcoming release, but we will try to help you as soon as we can once we get past this release!

Auase commented 1 year ago

Ok,Thanks @bkunda

Auase commented 1 year ago

I was thinking that since the installation can run normally, but there was an error during debugging, something was probably missing, so I tried adding some files from the installation folder to the debugging folder. Then I found that after adding the following files, I was able to debug normally. According to the file name, it seems to be related to translation.( I have only been in contact with the code for this project for a few months, and I am just a Luthier interested in the code, not a programmer. My main job is to make guitars, and I only study them when I have free time outside of work and life. Therefore, I am not very familiar with the code for this project, and I am currently unable to find the problematic code.)

"MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\en-us-g1.ctb" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\en-us-g2.ctb" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\braille-patterns.cti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\en-chardefs.cti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\unicode.dis" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\en-us-compbrl.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\en-us-emphasis.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\latinLetterDef6Dots.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\latinUppercaseComp6.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\litdigits6Dots.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\loweredDigits6Dots.uti" "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables\spaces.uti"

I hope the information I have provided can be useful.

bkunda commented 1 year ago

Thanks for this info @Auase. I'll leave this one with @cbjeukendrup as I believe he'll be well positioned to figure out what's going on.

cbjeukendrup commented 1 year ago

@Auase That makes me wonder: so you did run the install step, but did you also run the installed executable (rather than the "mscore" target in Qt Creator, which would launch the executable from the build folder rather than the install folder, so that doesn't have access to the installed files)?

See https://github.com/musescore/MuseScore/wiki/Compile-in-Qt-Creator#edit-run-settings.

Auase commented 1 year ago

@cbjeukendrup

https://github.com/musescore/MuseScore/assets/56365735/6a31d795-4064-4095-a111-48acb6258286

cbjeukendrup commented 1 year ago

@Auase unfortunately I can't play that video, either the file is damaged or it is not compatible with Mac. Could you try again or try a different format?

Auase commented 1 year ago

@cbjeukendrup Sorry, I didn't consider the issue that MAC does not support AV1 encoding because Github limits the size of 10mb files, so I used AV1 encoding to compress the video. This is x264 encoded: https://drive.google.com/file/d/1PfXezLi5JLNto8rQRLC2rYBMrbjmkXDS/view?usp=sharing

cbjeukendrup commented 1 year ago

Thanks, that works better. The problem is here:

Scherm­afbeelding 2023-06-22 om 11 52 38

You have selected the mscore target, but this will run MuseScore from the build folder, instead of from the install folder.

To fix it, follow the "Edit run configuration" steps from the Wiki: https://github.com/musescore/MuseScore/wiki/Compile-in-Qt-Creator#edit-run-settings So, click "Add...", "Custom executable", and enter the path to the installed MuseScore binary. It looks like that's C: /Program Files/MuseScore/bin/MuseScore4.exe in your case.

(It's questionable whether you should use a system directory like C: /Program Files for installing self-built development versions, but that's up to you. See https://github.com/musescore/MuseScore/wiki/Compile-in-Qt-Creator#default-cmake_install_prefix for how to customise the install prefix.)

By the way, I recommend that you really read the Wiki carefully; it turns out that all information you needed was written there. So if you'd checked that out, that could have saved you and me some time :) But no worries!

Auase commented 1 year ago

Thank you, I understand everything you said. What I mean is that before I raise a question, according to the default settings of Qt Creator, debugging can be done without the need for files in the "MuseScore\builds\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\src\tables" folder (that is, debugging can be done without the need for installation)

cbjeukendrup commented 1 year ago

I'm not sure if I understand your latest comment correctly, but anyway: Regardless of what Qt Creator does or doesn't let you do by default: in the case of MuseScore, you simply always need to use the installed executable, which has all resources, including those tables files. It does not matter when you are running it directly from Windows Explorer or via Qt Creator's debugger. (Note that in the video, you are launching the executable from the install folder in Windows Explorer, but in Qt Creator you are running the non-installed executable, which is missing those tables files. Maybe that was not clear.)

I will close this issue for now, since it turns out that there is nothing wrong with MuseScore's code. But please feel free to comment here if you need more help!