Here is the simplest code I have to reproduce the issue:
(
var win = Window("TEST", Rect(50,50,500,500));
var image = Image.new(SCDoc.helpSourceDir +/+ "images/Swamp.png");
var view = View(win, Rect(50,50,400,400));
view.setBackgroundImage(image);
win.front;
)
It gives me:
^^ The preceding error dump is for ERROR: Primitive '_QObject_InvokeMethod' failed.
Failed.
RECEIVER: a View
I’m using Kubuntu 24.10 on a Lenovo laptop.
SCDoc.helpSourceDir +/+ "images/Swamp.png" gives me /usr/local/share/SuperCollider/HelpSource/images/Swamp.png, which does exist and can be opened by the OS. I’ve also tried copying it to ~/Documents and pointing Image to there, but the result is the same.
EDIT: it also fails with flowers2.jpg in the same folder.
Oh sorry didn’t see you specified your OS in the initial post.
I fear I might not be able to help you with this. The code is running fine on my computer, using Ubuntu 22.04, QT6 and SuperCollider 3.14.0-dev.
The only reason I can think of is that somehow your SuperCollider version and your Qt version are not matching. But that seems silly, I think a lot of other things would break.
Or maybe is it just a permission issue, the file cannot be read, so the Image isn’t created?