Sean Meighan
Software => Bugs in xLights/Nutcracker => Topic started by: stampedeboss on December 05, 2017, 02:08:08 AM
-
I just finished confirming that what I thought was an issue with the Picture Effect causing crashes in Linux is actually an issue with the Text Effect. In reviewing the debug detail associated with the crash, I noticed that it was reporting on the Text Effect on Picture Effect.
To further test this theory, I made copies of the sequences I was having issues with. After opening I immediately deleted all text effects from the sequence leaving the Picture Effects in place. I then clicked render and it completed and played without issue. One other observation, with the text effects in place, clicking on any effect causing it to render in the preview triggers the crash.
-
I can now create the problem simply by opening a new sequence, either type, and adding a Text Effect on my matrix. It doesn't abort until the new effect is clicked on and any character is keyed into the text field., therefore the issue is somewhere in the rendering of the effect to the preview. One other item to report, it only occurs when XL Fonts is set to OS Fonts, any other setting works without an abort.
-
So the XL fonts I added are working. That helps give a clue because I am manually drawing all those fonts. The OS fonts are being rendered I believe by OpenGL calls but I'd need to double check. I've been on vacation since Nov 30th. Just came back for one day then heading back out of town in the morning. I'll be back in the seat Dec 12th so I can't look into much before then.
-
No, not OpenGL. It's done via some gtk calls of some sort. I was going to try and debug this, but my Linux Parallels VM seems to be not working. (haven't booted it in over a year and likely 2 parallels upgrades, so not too surprising.) If chris doesn't get a chance to look at it, I'll try and get a new VM setup.
What version of Linux are you using? If I need to re-install, might as well use the same version.
-
I actually run 3 different version of linux, Linux Mint 18.1 KDE is my main system, I've tried all three version of Mint 18.1, KDE, Mate, and Cinnamon. I've also tried Fedora and they all have the same issue.
-
I actually run 3 different version of linux, Linux Mint 18.1 KDE is my main system, I've tried all three version of Mint 18.1, KDE, Mate, and Cinnamon. I've also tried Fedora and they all have the same issue.
OK. I have this "fixed", kind of. It's more of a hack but at least it doesn't crash.
That said, I had completely forgotten how bad the rendered fonts look on Linux. Linux seems to ignore the flags to turn off the AntiAliasing so all the fonts look very blurry and crappy. I looked into that years ago and never could figure out how to convince the Linux stuff to not antialias the fonts.
-
While I am not having any issues with the Picture effect with the AppImage version, I still have the issue with the test effect.
Occurs when I do one of the following:
1 - Click in the text box and first character I enter
2- Have characters entered and change to OS Fonts.
I successfully compiled the source in Code:Blocks on the exact 16.10 Ubuntu fresh install as was mentioned in the Linux Build Help file.
Tried to track down the call, but I'm not very good with debugging in C/C++, so I am having mixed results on where this could be corrected. Mainly adding information here to add to any potential fix.
dkulp: You mentioned a "hack". I'm interested. Are you saying there is a setting that you are changing for the anti-aliasing for the fonts? Where exactly is this that you are changing. I'm down for any information that may help me locate more of a 'fix' than a hack, if possible.
xLights is where it's at, and while Gil doesn't agree (just picking on ya Gil, lol) I prefer LInux over Windows any day. It just does everything I need it to and some with me controlling what it does, not Microsoft thinking that they know what "I" want and should have. :/ So, I am willing to put the efforts in any way that I can to help improve and already great tool. And, this reminds me, I need to get my donation in still. :)
-Tim
-
The crash is actually due to a structure not being initialized within wxWidgets when a wxGraphicsFont is created. The internal wxFont is not valid and thus it crashes within the call to GetPartialTextExtents. I need to log a bug with wxWidgets.
The hack was basically to set the wxFont also on the wxDC and use the metrics from that. However, the metrics aren't exactly the same so I had to scale it a bit.
Note: if you only set a single color for the Text effect before entering any characters, it shouldn't crash either. I believe this is only hit for the case where multiple colors are selected.
Regarding the antialiasing - I haven't figure out how to get non-antialiased text on Linux at all. On OSX, we call ctx->SetAntialiasMode(wxANTIALIAS_NONE) and that turns it off for the font rendering, that doesn't work on Linux. On MSW, we have to hack into the native font string and flip a flag. Someone familiar with the pango code might need to submit a patch to wxWidgets or something. No idea.
Dan
While I am not having any issues with the Picture effect with the AppImage version, I still have the issue with the test effect.
Occurs when I do one of the following:
1 - Click in the text box and first character I enter
2- Have characters entered and change to OS Fonts.
I successfully compiled the source in Code:Blocks on the exact 16.10 Ubuntu fresh install as was mentioned in the Linux Build Help file.
Tried to track down the call, but I'm not very good with debugging in C/C++, so I am having mixed results on where this could be corrected. Mainly adding information here to add to any potential fix.
dkulp: You mentioned a "hack". I'm interested. Are you saying there is a setting that you are changing for the anti-aliasing for the fonts? Where exactly is this that you are changing. I'm down for any information that may help me locate more of a 'fix' than a hack, if possible.
xLights is where it's at, and while Gil doesn't agree (just picking on ya Gil, lol) I prefer LInux over Windows any day. It just does everything I need it to and some with me controlling what it does, not Microsoft thinking that they know what "I" want and should have. :/ So, I am willing to put the efforts in any way that I can to help improve and already great tool. And, this reminds me, I need to get my donation in still. :)
-Tim
-
Well, now that makes a lot more sense now. I have been able to use text at times with OS Fonts, but couldn't ever figure out why not all the time. The colors. :)
Nice information! That helps out more than ever. I honestly could live perfectly fine with single color.
Also, I agree on the wxWidgets bug. I recall seeing that during debugging. Was thinking it was something with that myself. I had a tough time thinking it was strictly code for xLIghts as it works fine on Windows, thus, should with Linux, for the actual xLights code itself. I figured it was looking more like and issue with something outside of xLights, specific to Linux.
Thanks for sharing that.
-
If interested, the bug is logged:
https://trac.wxwidgets.org/ticket/18021
along with a proposed patch. We'll see if they do anything with it. :(
-
Look like they fixed this issue. I don't see a new Repo version of the xLight Linux for .40, nor an Appimage, but I did a GIT pull (clone) and built on my system with the updated wxWidgets and all seems good to go.
Now running xLight 2017.40 (though it tells me I'm running an old version and that .39 is available, lol), and able to use the text effect with multiple colors and no crashing! :)
-Tim
-
Same here problem appears to be resolved.
Sent from my iPhone using Tapatalk Pro
-
2017.41 is released now (I missed making packages etc for 2017.40)
Can you test it out and see if it works okay - if not I can make it so that it automatically applies the fix from https://trac.wxwidgets.org/ticket/18021 to the wxwidgets build it uses to see it that helps?
-
Just tried 41 without success, it aborted while building the fseq file as it did before.
-
I'm changing the build of wxwidgets included in the xLights package/appimage to have the fix from https://github.com/wxWidgets/wxWidgets/commit/aa4d51d57945cefac0d1b33324f9a2d82795fe43 included.
Can you please send me a sample sequence which is failing for you so I can test it too?
-
I just built a test appimage with the patch and put it up at
https://www.adebenham.com/wp-content/uploads/xlights/xLights-2017.41-3ba16ee.glibc-x86_64.AppImage
Can you please test and let me know how it goes?
-
The AppImage looks good so far. The build I did from scratch was crashing quite a bit, but this seems to be doing pretty well and I appreciate the efforts! :)
Do you know if the Repo version will continue? I really like that as it updates with my system updates and has been very successful in the past. If the AppImage is the only continued option, I'm good with that also, just have to keep on top of it.
The only issue I came across was it was telling me that there was a newer version, so I just said for it to ignore for now.
EDIT: Actually, with the scratch build and the AppImage, using the text effect, I do get some weird behavior that I'm not certain of the source (my system while trying to trouble shoot fonts, xLights itself, or wxWidgets). Sometimes when I use the text effect and OS Fonts, my fonts everywhere in xLights start disappearing. From the test box, to the dropdown menus, to the everything. :/ Any ideas?
Thanks,
-Tim
-
The repo version will continue - I just didn't update for this test build (it has 2017.41already - I missed 2017.40)
wxwidgets isn't getting a lot of attention anymore upstream and has a number of issues with GTK (which is why we are building with gtk2 rather than gtk3 as that is even further behind) The font handling seems to be rather 'fragile' and there isn't any way to turn of anti-aliasing :(
I tend to stick to the XL fonts because at least they are 'solid' (due to AA when you use OS fonts it is never quite as bright)
-
wxwidgets isn't getting a lot of attention anymore upstream and has a number of issues with GTK (which is why we are building with gtk2 rather than gtk3 as that is even further behind) The font handling seems to be rather 'fragile' and there isn't any way to turn of anti-aliasing :(
I tend to stick to the XL fonts because at least they are 'solid' (due to AA when you use OS fonts it is never quite as bright)
Actually, there are a lot of things going on in wxWidgets. Unfortunately, getting a release out has not been one of them. That said, they ARE planning on getting 3.1.1 out in January sometime:
https://groups.google.com/d/msg/wx-dev/FsdAEDISo4k/mgpvYMd7AAAJ
The 3.1.1 codebase has all kinds of chekcs for GTK4 as well as 3 and 2 so some stuff is happening. On the Mac, we checkout from git and use a specific git hash instead of 3.1.0+patches.
Not being able to turn off the AA really sucks. I tried a bunch of things down at the cairo/pango level, but haven't found any way to do it. Not sure if GTK3/4 makes it possible, but it seems like the older libs that GTK2 brings in don't have the ability to do it.
-
The repo version will continue - I just didn't update for this test build (it has 2017.41already - I missed 2017.40)
wxwidgets isn't getting a lot of attention anymore upstream and has a number of issues with GTK (which is why we are building with gtk2 rather than gtk3 as that is even further behind) The font handling seems to be rather 'fragile' and there isn't any way to turn of anti-aliasing :(
I tend to stick to the XL fonts because at least they are 'solid' (due to AA when you use OS fonts it is never quite as bright)
That's why at work we ported everything over to QT and left wxwidgets, not suggesting that for xLights just commenting.
-
The repo version will continue - I just didn't update for this test build (it has 2017.41already - I missed 2017.40)
Awesome. Thank you! :)
-
Tonight I upgraded to the repo version 42 and it still has the issue. I recompiled from within and it works without issue.
-
Tonight I upgraded to the repo version 42 and it still has the issue. I recompiled from within and it works without issue.
Can you please send me a copy of a problem sequence so I can reproduce?
Sent from my Nexus 6P using Tapatalk
-
Here ya go.
-
I've been testing with the repo version and the appimage versions and it won't fail for me :(
There must be something different between our systems.
What distro/version are you using?
Does this happen with just that particular font - or with other OS fonts as well?
BTW - 2017.43 is uploaded as appimage (repo version is building currently) so maybe re-test?
-
Let me test it this morning. I’m using Mint 18.1 KDE edition. It also fails on Neon. I haven’t tried it on my other images. It happens with any other os font.
Sent from my iPhone using Tapatalk Pro
-
Happy to report that the sequence was able to be save and fseq generated without issue on .43. I knew that it would eventually get fixed.
So Gillrock, the answer now is my pictures and text look great, and it runs very fast on my system. Just poking fun, thank you for all that you guys do!!
-
https://www.youtube.com/watch?v=nyyiQqEKyFQ (https://www.youtube.com/watch?v=nyyiQqEKyFQ)
-
https://www.youtube.com/watch?v=nyyiQqEKyFQ (https://www.youtube.com/watch?v=nyyiQqEKyFQ)
Perfect response!