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

Linux crash under Xvfb #60

Closed
sudara opened this issue May 28, 2022 · 8 comments · Fixed by #91
Closed

Linux crash under Xvfb #60

sudara opened this issue May 28, 2022 · 8 comments · Fixed by #91

Comments

@sudara
Copy link
Collaborator

sudara commented May 28, 2022

Seen this problem on Linux with Xvfb quite a while (GitHub Actions CI and local ubuntu 22.04). Thought I'd get an issue started before hunting it down.

Running tests 1 times
X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Atom id in failed request:  0x0
  Serial number of failed request:  71
  Current serial number in output stream:  82
@sudara
Copy link
Collaborator Author

sudara commented May 28, 2022

@sudara
Copy link
Collaborator Author

sudara commented May 28, 2022

I seem to only run into this on one of my plugins, even when pluginval and the plugin is built on JUCE develop. My plugin template doesn't exhibit the issue. Not sure yet what the difference is....

@sudara sudara changed the title Linux Crash Linux crash under Xvfb May 28, 2022
@JohT
Copy link

JohT commented Aug 14, 2022

@sudara, I don't know if it helps, but:

Try if any of these steps might also help you:

  • Update to latest version of pluginval
  • Move sudo /usr/bin/Xvfb $DISPLAY & to where the linux packages are installed so it gets more time to start
  • Install some more linux packages like it is done in the workflow of pluginval. Here is my attempt: JohT/speclet@184ae73

@sudara
Copy link
Collaborator Author

sudara commented Aug 14, 2022

Hey JohT!

Sorry I never closed this issue! It's fixed on the "codesign" branch of Pamplejuce (glad it was helpful for you!) — and you are right, it's fixed in 1.x of pluginval (with the JUCE bump).

@sudara sudara closed this as completed Aug 14, 2022
@sudara
Copy link
Collaborator Author

sudara commented Aug 25, 2022

In all the excitement with pluginval 1.0, I forgot that I'm actually still seeing this problem on 1.0.1 on my main product. I believe because it opens another DocumentWindow which freaks things out.

It still crashes on the plugin editor opening as described in OP.

Atilla made a recommendation for how to solve in pluginval.

@sudara sudara reopened this Aug 25, 2022
@sudara
Copy link
Collaborator Author

sudara commented Aug 25, 2022

It looks like the issue with direct initialization of Xlib (with JUCE_GUI_BASICS_INCLUDE_XHEADERS=1) that Attila was referencing are namespace conflicts with Time and Status.

/home/sudara/pluginval/Source/PluginTests.cpp:92:31: error: reference to 'Time' is ambiguous
    logVerboseMessage ("\t" + Time::getCurrentTime().toString (true, true) + "\n");
                              ^
/usr/include/X11/X.h:77:23: note: candidate found by name lookup is 'Time'
typedef unsigned long Time;

@drowaudio
Copy link
Contributor

Tbf we should remove the using namespace juce and make everything fully qualified. It's much better practice and will solve this.

Does qualifying just those indicated uses fix things for now though?

@sudara
Copy link
Collaborator Author

sudara commented Aug 26, 2022

I can confirm removing the extra DocumentWindow makes linux happy.

Attila's second workaround does as well:

std::make_unique<DocumentWindow> ("", Colours::black, DocumentWindow::allButtons);

However, on quit there are some memory leaks, not sure if correlated.

make everything fully qualified.

Yeah, I kind of regret not doing that before the CI stuff, that was the first item I wanted to tackle...

Does qualifying just those indicated uses fix things for now though?

I'll have to look again. There's a fair handful of status/time errors, maybe 20-30. Might be enough to push me into qualifying everything...

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

Successfully merging a pull request may close this issue.

3 participants