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 on skin with missing template file #12729

Open
mxmilkiib opened this issue Feb 5, 2024 · 5 comments
Open

Crash on skin with missing template file #12729

mxmilkiib opened this issue Feb 5, 2024 · 5 comments
Labels

Comments

@mxmilkiib
Copy link
Contributor

mxmilkiib commented Feb 5, 2024

Bug Description

I was going to refactor the template files I had refactored, and readd the specials template, but I didn't fix the filename, then on restart I get a crash;

warning [Main]      $ connectMenuBar
warning [Main] Could not open template file: "/home/milk/skin:deck_specials.xml"
warning [Main] QDomDocument called with unopened QIODevice. This will not be supported in future Qt versions.
warning [Main] QDomDocument::setContent: Failed to open device.
warning [Main] LegacySkinParser::loadTemplate - setContent failed see "/home/milk/skin:deck_specials.xml" line: 0 column: 0
warning [Main] LegacySkinParser::loadTemplate - message: "QDomDocument::setContent: Failed to open device."
warning [Main] Skin parsing failed at skin:deck_controls_row.xml:22 <Template>: Template instantiation for template failed: skin:deck_specials.xml | ./src/skin/legacy/legacyskinparser.cpp:1762
warning [Main] Could not open template file: "/home/milk/skin:deck_specials.xml"
warning [Main] QDomDocument called with unopened QIODevice. This will not be supported in future Qt versions.
warning [Main] QDomDocument::setContent: Failed to open device.
warning [Main] LegacySkinParser::loadTemplate - setContent failed see "/home/milk/skin:deck_specials.xml" line: 0 column: 0
warning [Main] LegacySkinParser::loadTemplate - message: "QDomDocument::setContent: Failed to open device."
warning [Main] Skin parsing failed at skin:deck_controls_row.xml:22 <Template>: Template instantiation for template failed: skin:deck_specials.xml | ./src/skin/legacy/legacyskinparser.cpp:1762
warning [Main] Could not open template file: "/home/milk/skin:deck_specials.xml"
warning [Main] QDomDocument called with unopened QIODevice. This will not be supported in future Qt versions.
warning [Main] QDomDocument::setContent: Failed to open device.
warning [Main] LegacySkinParser::loadTemplate - setContent failed see "/home/milk/skin:deck_specials.xml" line: 0 column: 0
warning [Main] LegacySkinParser::loadTemplate - message: "QDomDocument::setContent: Failed to open device."
warning [Main] Skin parsing failed at skin:deck_controls_row.xml:22 <Template>: Template instantiation for template failed: skin:deck_specials.xml | ./src/skin/legacy/legacyskinparser.cpp:1762
warning [Main] Could not open template file: "/home/milk/skin:deck_specials.xml"
warning [Main] QDomDocument called with unopened QIODevice. This will not be supported in future Qt versions.
warning [Main] QDomDocument::setContent: Failed to open device.
warning [Main] LegacySkinParser::loadTemplate - setContent failed see "/home/milk/skin:deck_specials.xml" line: 0 column: 0
warning [Main] LegacySkinParser::loadTemplate - message: "QDomDocument::setContent: Failed to open device."
warning [Main] Skin parsing failed at skin:deck_controls_row.xml:22 <Template>: Template instantiation for template failed: skin:deck_specials.xml | ./src/skin/legacy/legacyskinparser.cpp:1762
zsh: segmentation fault (core dumped)  mixxx
mixxx  8.57s user 2.28s system 73% cpu 14.810 total

Edit: hmm, it didn't crash on th next load with the incorrect filename

Version

2.5-alpha

OS

No response

@ronso0
Copy link
Member

ronso0 commented Feb 5, 2024

I very much doubt this is caused by a missing skin template, what is being printed are just warnings.
You mentioned such a crash earlier elsewhere and IIRC it was related to waveforms.
Please attached the zipped skin here so we can debug this. Which Qt version do you use?

@mxmilkiib
Copy link
Contributor Author

qt6

#12580

IIRC, it's just Deere with this for parallel_waveforms.xml;

<!DOCTYPE template>
<!--
-->
<Template>
	<SetVariable name="group">[Channel<Variable name="i"/>]</SetVariable>
	<WidgetGroup><!-- Parallel Waveforms -->
		<ObjectName>Waveforms</ObjectName>
		<Layout>vertical</Layout>
		<Children>


			<WidgetGroup>
				<Layout>horizontal</Layout>
				<Children>
					<WidgetGroup>
						<Layout>horizontal</Layout>
						<Children>
							<Template src="skins:Deere/deck_spinny.xml">
								<SetVariable name="cover">true</SetVariable>
								<SetVariable name="Size">55f,55f</SetVariable>
								<SetVariable name="i">1</SetVariable>
							</Template>
						</Children>
						<Connection>
							<ConfigKey>[Skin],show_4decks</ConfigKey>
							<BindProperty>visible</BindProperty>
						</Connection>
					</WidgetGroup>

					<SingletonContainer>
						<ObjectName>DeckWaveform1</ObjectName>
					</SingletonContainer>
				</Children>
			</WidgetGroup>


			<WidgetGroup>
				<Layout>horizontal</Layout>
				<Children>

					<WidgetGroup>
						<Layout>horizontal</Layout>
						<Children>
							:
							<WidgetGroup>
								<Layout>horizontal</Layout>
								<Children>
									<Template src="skins:Deere/deck_spinny.xml">
										<SetVariable name="cover">true</SetVariable>
										<SetVariable name="Size">55f,55f</SetVariable>
										<SetVariable name="i">2</SetVariable>
									</Template>
								</Children>
				<Connection>
					<ConfigKey>[Channel2],track_loaded</ConfigKey>
					<BindProperty>visible</BindProperty>
				</Connection>
							</WidgetGroup>

							<SingletonContainer>
								<ObjectName>DeckWaveform2</ObjectName>
							</SingletonContainer>
						</Children>
					</WidgetGroup>

				</Children>
								<Connection>
									<ConfigKey>[Skin],show_4decks</ConfigKey>
									<BindProperty>visible</BindProperty>
								</Connection>
			</WidgetGroup>


			<WidgetGroup>
				<Layout>horizontal</Layout>
				<Children>
					<WidgetGroup>
						<Layout>horizontal</Layout>
						<Children>
							<Template src="skins:Deere/deck_spinny.xml">
								<SetVariable name="cover">true</SetVariable>
								<SetVariable name="Size">55f,55f</SetVariable>
								<SetVariable name="i">3</SetVariable>
							</Template>
							<SingletonContainer>
								<ObjectName>DeckWaveform3</ObjectName>
							</SingletonContainer>
						</Children>
						<Connection>
							<ConfigKey>[Channel3],track_loaded</ConfigKey>
							<BindProperty>visible</BindProperty>
						</Connection>
					</WidgetGroup>
				</Children>
				<Connection>
					<ConfigKey>[Skin],show_4decks</ConfigKey>
					<BindProperty>visible</BindProperty>
				</Connection>
			</WidgetGroup>


			<WidgetGroup>
				<Layout>horizontal</Layout>
				<Children>
					<WidgetGroup>
						<Layout>horizontal</Layout>
						<Children>
							<Template src="skins:Deere/deck_spinny.xml">
								<SetVariable name="cover">true</SetVariable>
								<SetVariable name="Size">55f,55f</SetVariable>
								<SetVariable name="i">4</SetVariable>
							</Template>
							<SingletonContainer>
								<ObjectName>DeckWaveform4</ObjectName>
							</SingletonContainer>
						</Children>
						<Connection>
							<ConfigKey>[Channel4],track_loaded</ConfigKey>
							<BindProperty>visible</BindProperty>
						</Connection>
					</WidgetGroup>
				</Children>
				<Connection>
					<ConfigKey>[Skin],show_4decks</ConfigKey>
					<BindProperty>visible</BindProperty>
				</Connection>
			</WidgetGroup>


		</Children>
		<Connection>
			<ConfigKey>[Deere],show_parallel_waveforms</ConfigKey>
			<BindProperty>visible</BindProperty>
		</Connection>
	</WidgetGroup><!-- /Parallel Waveforms -->
</Template>

@ronso0
Copy link
Member

ronso0 commented Feb 5, 2024

Very weird. I could make it crash when I disabled "Parallel Waveforms" in the skin settings.
That should hide the parallel waveform singletons and show them in each deck.
Though I didn't see them in the decks just before I got the segfault.
I can't reproduce it anymore.

I'm seeing a lot of those

warning [Main] QPainter::begin: Paint device returned engine == 0, type: 3
warning [Main] QPainter::setRenderHint: Painter must be active to set rendering hints
warning [Main] QPainter::setMatrixEnabled: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::fillPath: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::fillPath: Painter not active
warning [Main] QPainter::end: Painter not active, aborted

@mxmilkiib
Copy link
Contributor Author

mxmilkiib commented Feb 5, 2024

I realised before that the way I got it to crash was related to the order decks get loaded in, AFAICT, not how quickly tracks are added.

@ronso0
Copy link
Member

ronso0 commented Feb 16, 2024

Hmm, I tried various load orders but I didn't get a crash.
@mxmilkiib Can you test again (in a debugger) and try to make it crash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants