Page 1 of 1

Weird Error

Posted: Mon Dec 12, 2016 2:27 pm
by omni
Roger,

Always a first time for everything. below is the main part of a recent error log.

oError:description : Unknown variable
oError:filename :
oError:genCode : 22
oError:operation : oPro
CALLSTACK:
Called from (B)BOOKWIN(764)
Called from _EDITPROTECTED(5102)
Called from DC_GETLIST:EVENTLOOP(4520)
Called from DC_GETLIST:READGUI(3871)
Called from DC_READGUI(113)
Called from PROINQ(628)
Called from (B)MAIN(1016)
Called from (B)MDIBLOCK(4483)
WORKAREA STATUS:

The two programs are bookwin and proinq. There is no possible method to go from one to another. The oPro is the object name of the field in bookwin. This is actually two menu options on the same error log.
Does that indicate to you (opinion) that somehow both were opened in the same thread. Never seen anything like this before.
Another possibility I guess is that two users had errors at the same time and wrote to the same temp file and it garbaged up the log.

Not going to try to investigate at this point

Fred
Omni

Re: Weird Error

Posted: Mon Dec 12, 2016 4:23 pm
by rdonnay
It appears that a code block created in one thread is trying to be evaluated from another thread.

I don't know how that can happen.

Re: Weird Error

Posted: Mon Dec 12, 2016 4:35 pm
by omni
Me either...thought it was very interesting..not something to solve.

Fred

Re: Weird Error

Posted: Tue Dec 13, 2016 9:38 am
by Cliff Wiernik
I have seen this happen in practice, but cannot duplicate the error. I can replicate it. I think it is happening in instances where you have more than one dialog open, each running it their own thread, and the user is switching dialogs when in a object that is calling the code block. Sometimes the screen context changes and thus the thread changes, but whatever calls the code is delayed for some reason and assumes it is in the proper thread.

That is why there is the one change in the ProcessHotkey() function in _dcgetbx.prg that catches this scenario. I can replicate the scenario as I know what is happening, but I cannot duplicate it actually happening.