wrong state for access

This forum is for eXpress++ general support.
Post Reply
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

wrong state for access

#1 Post by Cliff Wiernik »

I get this error occassionally, but not reproducible where even though express checks for this prior to calling the xbpdialog:create() method, it will generate this error. Discussions with Alaska tech support indicates the issue may be that the application is in the process of changing the program or dialog when the user is in the middle of opening a new dialog and it is causing a thread mismatch.

I though I had would be to disable the main application window when the new dialog is being built until it is completed and the event loop is started. However, I am trying to determine what is the reference to that and if I could disable it having the desired effect.

Cliff

Code: Select all

ERROR OBJECT:
------------------------------------------------------------------------------
oError:args         :
          -> VALTYPE: O CLASS: DC_XbpDialog1
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: U VALUE: NIL
          -> VALTYPE: U VALUE: NIL
oError:canDefault   : N
oError:canRetry     : N
oError:canSubstitute: Y
oError:cargo        : NIL
oError:description  : XBP-object has wrong state for access
oError:filename     : 
oError:genCode      :        104
oError:operation    : :Create
oError:osCode       :          0
oError:severity     :          2
oError:subCode      :       4208
oError:subSystem    : BASE
oError:thread       :          5
oError:tries        :          0
DAC last message    : 
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from XBPDIALOG:CREATE(573)
Called from DC_XBPDIALOG1:CREATE(12861)
Called from DC_GETLIST:INIT(855)
Called from DC_READGUI(110)
Called from SIMPLMST(4694)
Called from _GUIRUN(199)
Called from (B)GUIRUN(148)

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: wrong state for access

#2 Post by rdonnay »

I don't know why this is happening to you.
I haven't heard other reports of this.
Here is a change to DC_XbpDialog1:create() method that will display an error message and then break out to give the user another chance to create the window rather than crashing.

Code: Select all

METHOD DC_XbpDialog1:create( a, b, c, d, e, f )

IF ::XbpDialog:Status() = XBP_STAT_INIT
  ::XbpDialog:create( a,b,c,d,e,f )
  IF !::XbpDialog:Status() = XBP_STAT_CREATE
    DC_WinAlert('Unable to create Dialog Window')
    BREAK
  ENDIF
ELSE
  DC_WinAlert('Unable to initilize Dialog Window')
  BREAK
ENDIF

::nYTitlebarheight := GetTitleBarHeight( self )

RETURN self
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: wrong state for access

#3 Post by Cliff Wiernik »

I will look at this.

Post Reply