Alaska Software Inc. - FATAL in EVM, no callstack
Username: Password:
AuthorTopic: FATAL in EVM, no callstack
Jack DuijfFATAL in EVM, no callstack
on Wed, 05 Jun 2019 09:38:35 +0200
Hello,

I got this error incidently at a customer site.
There is no callstack that shows me where the offending code is.
How can i figure out what actualy went wrong?

Xbase++ version : Xbase++ (R) Version 2.00.1079
Operating system : Windows 10 1607 Build 14393
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: U VALUE: NIL
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Receiver of message is not an object.
oError:filename : 
oError:genCode : 38
oError:operation : Status
oError:osCode : 0
oError:severity : 2
oError:subCode : 2266
oError:subSystem : BASE
oError:thread : 2
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
(EVM Event Dispatcher)
Regards
Jack Duijf

-------------------------------------------------------------
Also a member off the XXP (http://www.xxp.nl)
Andreas Gehrs-Pahl
Re: FATAL in EVM, no callstack
on Wed, 05 Jun 2019 06:16:52 -0400
Jack,

>I got this error incidently at a customer site.
>There is no callstack that shows me where the offending code is.

Check for an XppFatal log with the same date/time stamp -- or one that 
includes the same date/time stamp as your error log. Maybe you can find 
the call stack listing for the (other) threads in there.

>oError:thread : 2
>(EVM Event Dispatcher)
>oError:args :
>-> VALTYPE: U VALUE: NIL
>oError:operation : Status
>oError:genCode : 38
>oError:subCode : 2266
>oError:description : Receiver of message is not an object.

Your Error Log indicates that the error occurred in the so-called Xbase 
GUI thread (Thread number is 2 -- or more precisely: UIThreadID()) and was 
raised because an Object was NIL, when its (no longer existing) Status 
iVar or Method was accessed.

>How can i figure out what actualy went wrong?

You could search your code for ":Status" and narrow it down somewhat, but 
that might not be very useful, as you don't know why this code was called 
(and executed in the GUI thread).

I assume your code is part of an Event Loop or Event Handler and looks 
something like this:

if oXbp:Status() == XBP_STAT_CREATE
   oXbp:HandleEvent(nEvent, mp1, mp2)
   [...]
endif

If that is the case, you might be able to prevent this type of error if you 
change your code to something like this instead:

if ValType(oXbp) == 'O' .and. oXbp:Status() == XBP_STAT_CREATE
   oXbp:HandleEvent(nEvent, mp1, mp2)
   [...]
endif

But I'm just guessing here.

Hope that helps anyway,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Andreas Gehrs-Pahl
Re: FATAL in EVM, no callstack
on Wed, 05 Jun 2019 06:45:48 -0400
Jack,

Also, if you use the LayoutManager(), there are a couple of places where 
the ::Owner iVar isn't checked for being an object (or NIL), like in the 
two methods :Reset() and :Recompute().

The code for the Xbase++ Layout Manager class can be found in: 

	..\Source\Runtime\DUI\layout-manager.prg

I made my own replacement class a long time ago, as I was unsatisfied with 
the (lack of) features and the behavior of this original class, and because 
I also wanted a built-in scaling functionality.

So, if you do use the LayoutManager, you could create your own (or a 
derived) class and change the code in those methods to check if ::Owner 
is NIL before testing for ::Owner:Status().

If you don't use the LayoutManager, consider the above notes irrelevant.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Jack DuijfRe: FATAL in EVM, no callstack
on Thu, 06 Jun 2019 01:05:40 +0200
Hello Andreas,

Thanks for the reply.
Unfortunaly, there is no xppfatal.log !!!

The only thing i can do is place errorhandlers arround accessing the o:Status 
Quite a challange, There are many...

bError := ErrorBlock({|o|Break(o)})
BEGIN SEQUENCE
	...
	oData:Status ...
	...
RECOVER
	Errorlog(o)
END SEQUENCE
ErrorBlock(bError)

I hope this wil generate an error log with a callstack.
Regards
Jack Duijf

-------------------------------------------------------------
Also a member off the XXP (http://www.xxp.nl)