Error box visibility in virtual environment

delphi package - automated exception handling

Error box visibility in virtual environment

Postby anders_g » Wed Feb 27, 2019 7:43 am

We use MadExcept to handle exceptions, and now we are trying to integrate our app in Thinfinity VirtualUI from Cybelesoft (cybelesoft.com). It seems the way the error boxes are constructed without VCL doesn't work well together with Thinfinity. Only a empty blue box is diplayed - see enclosed picture.

Does anyone have experience of handling this?
/Anders
Attachments
2019-02-26 17-51-21.png
Empty error box
2019-02-26 17-51-21.png (8.3 KiB) Viewed 1062 times
anders_g
 
Posts: 3
Joined: Wed Dec 27, 2017 7:56 am

Re: Error box visibility in virtual environment

Postby madshi » Thu Feb 28, 2019 9:32 am

I've never seen this before. Not sure what Thinfinity VirtualUI does exactly. Have you tried contacting their support?
madshi
Site Admin
 
Posts: 10099
Joined: Sun Mar 21, 2004 5:25 pm

Re: Error box visibility in virtual environment

Postby anders_g » Wed Mar 27, 2019 8:01 am

I am not quite clear on the function of Thinfinity either, but I guess they are transforming VCL drawing to HTML5 in som electronic way, and as MadExcept doesn't use VCL, they are probably missing it.
A simple solution to this would be to catch the errors and construct my own error boxes - with VCL. I understand this is no good, but how bad is it?
/Anders
anders_g
 
Posts: 3
Joined: Wed Dec 27, 2017 7:56 am

Re: Error box visibility in virtual environment

Postby madshi » Wed Mar 27, 2019 9:30 am

The key problem with VCL is that it's not thread safe. So you can't show VCL forms in the context of secondary threads. However, madExcept does most of its work in secondary threads to make sure that a crashed main thread doesn't stop madExcept from working correctly.

You can tell madExcept.RegisterExceptionHandler() to call your handler in the context of the main thread. If you do that, you can show your own VCL form in there and then set "handled := true" to tell madExcept that you don't want madExcept's own exception box to be shown. Of course this will only work if the main thread is still alive and kicking, otherwise madExcept won't be able to call your handler in the context of the main thread.
madshi
Site Admin
 
Posts: 10099
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 11 guests

cron