Lazarus: Disable console messages "WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating" - ubuntu-14.04

If program CudaText runs from terminal (on Ubuntu 14.04), then terminal is full of messages:
WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message
How to disable them is the source? Maybe some {$define}?

This is a valid warning: if a repaint is requested while a control is painting you may trigger an endless loop. The painting code should only do the painting, nothing else. You should contact the author of CudaText to fix this, he is active in the Lazarus forum (http://forum.lazarus.freepascal.org) and very cooperative.

Related

Accessing an app on Remote Desktop does nothing

We got users complaining that accessing remote client on Remote Desktop does not bring up anything. When I try logging in to its Azure AVD, it opens up with a black screen and disappears in a second.
A simple start and stop on Azure portal seems to have fixed the problem. A restart did not fix it though. But, I am not sure why it happened in the first place and couldn't find a reason for it. Could anyone offer some suggestions please?
I tried to reproduce same in my environment. I got same error.
To resolve this issue, try the below.
The reason of this issue is slow sign-in process A black screen will appear for a while, until the regular desktop appears.
When the back screen shows to return to the previous screen, press CTRL + ALT + END. This launches Task Manager you will see the Desktop right away after Task Manager is called like below:
Make sure to disable the Bitmap Caching on the Remote Desktop Protocol (RDP) client like below.
Persistent bitmap caching is the combination of memory caching and glyphs. It will be reused throughout client sessions and also provide a bigger amount of cache space, which will result in a black screen.
And try to adjust Display size of your remote host's display like below:
Now I am able to connect RDP without any issue like below.

Using JavaFX in a headless Raspbian server

Based on this tutorial, I would like to implement a media player website running in a Raspberry Pi connected to an old (but excellent) amplifier/home theather. This means that a servlet (a thread created by a servlet) will play the music and I will control it via Internet.
What I already did and is working? I removed all graphic references (button, panel, etc) from the example and put the resulting code in a thread. When I try to run this on a Tomcat8 in Ubuntu Desktop, everything works fine! But when I try to run it in the Raspberry without GUI, I got the following error:
Exception in thread "Thread-0" java.lang.UnsupportedOperationException: Unable to open DISPLAY
I know where is the error, but I don't know how to fix it. The problem is in the line below:
com.sun.javafx.application.PlatformImpl.startup(()->{});
Without the line above, I got an error stating that to Toolkit was not initialized.
So,
(1) Is it possible to run JavaFX in a servlet?
(2) How to solve this problem?
Thanks!
Alex

CMFCToolbar image disappears through remote desktop or when connected to projector

I am using CMFCToolbar in my dialog derived from CDialog and loading the images on toolbar using LoadBitmap(). When I run the application, the images are visible properly. However, when I connect the computer through remote desktop, the images disappear. The same problem happens when computer remains idle for long time or goes to sleep mode. This happens only with CMFCToolbar. All other toolbars are visible properly.
After some debugging, I had below observation (though it is strange). I could find that whenever some exception (e.g. call SetWindowPos() on NULL pointer) occurs in OnSize() event (which is overloaded in my dialog) then the images don't disappear. It means windows stops further calls after exception and the issue does not occur. However, when there is no exception then OnSize() gets evaluated successfully and this issue appears. I tried removing OnSize() event but with no success.
Finally I could figure out and resolve the problem. I was loading a PNG image using LoadBitmap(). It was working perfectly fine until I connected to remote desktop or projector or the computer was awaken from sleep mode. When I replaced PNG file with BMP file, the issue got resolved. It seems that the PNG files don't work with CMFCToolbar control in these scenarios though they work in normal workflow.

How to run threepenny-gui samples on windows

I was testing out the threepenny-gui package for Haskell gui programming. Following instructions here, I did:
$ cd threepenny-gui-0.4.1.0/samples/
$ runhaskell.exe Chat.hs
and got:
Listening on http://0.0.0.0:8023/
[29/Apr/2014:11:37:44 -0400] Server.httpServe: START, binding to [http://0.0.0.0
:8023/]
But nothing happens after then. No browser is fired up. Also, if I open firefox and go to http://0.0.0.0:8023/ , it says Unable to connect. I've turned off windows firewall, but it didn't improve anything.
Did I missing anything here?
Strange. I tested http://127.0.0.1:8023 a minute later instead of the hinted address http://0.0.0.0:8023/, and the gui is visible from the browser immediately. Don't know why the wrong address was suggested.

Did Chromecast update break debugging?

Before the recent firmware update, web-based debugging (at port 9222) would persist between activities. Now any transition, say from the home screen to my app, stops the debugger with a message at the top saying...
Detached from the target
Remote debugging has been terminated with reason: target_closed.
Please re-attach to the new target.
It's not a huge problem to start a new debug window, but I'm worried that if the debugger isn't running when my app is loaded I won't get the benefit of the "Disable cache (while DevTools is open)" option.
Any details or workarounds would be appreciated.
UPDATE
Confirmed! In my case at least, the debugger stops with the above error and the latest version of my html, javascript, etc. does not get loaded
Try this as a work around and see if it works: when your page is loaded, run window.location.reload() in the debug console to reload the page (so you get a full debugging info from the beginning without missing anything) or window.location.reload(true) to do the same and clear cache as well.

Resources