tough question for gurus! 
Author Message
 tough question for gurus!

Using Acc97, NT4, FE/BE setup - I keep getting the
following error message when I open one of the forms (FE):

Here's the error message:
the instruction at 0x0403c8a3 referenced memory at
0x0a171688.  The memory could not be read.

I've tried already tried copying objects into new DB,
decompile, then compile, then compacting.  Everything
copies, decompiles, etc. fine.  But I still get the error
when I open the form.  Here's what's interesting: it works
fine if I step through it in debug mode, but consistantly
crashes if run normally.  The form opens fine if I comment
out this section of code.  I'm trying to autofill the
user's choices when the form opens...

Here's the bit of code in the onOpen event that's causing
the problems (LotXfer is of user type LotData):
private sub Form_Open (Cancel as Integer)
    if Len (me.filter)=0 then
        runcommand accmdrecordsgotonew
        me.cboselline.setfocuse
    end if

    If OpenArgs = "RefDT" Then  
'error happens when any of the lines between this if
'statement are run outside of debug mode.      
        Me.cboSelLine = LotXfer.Line
        Me.cboToProd = LotXfer.CurrentItem
        Me.txtToLot = LotXfer.CurrentLot
        Me.txtRIDLineID = GUIDFromString(LotXfer.PKLine)
        Me.txtRIDLotRecID = GUIDFromString(LotXfer.PKLot)
        Me.cboFromProd = LotXfer.OldItem
        Me.txtFromLot = LotXfer.OldLot
    End If
end sub

*******************code below is in a standard module
Public Type LotData
    CurrentLot As String
    OldLot As String
    CurrentItem As String
    OldItem As String
    Line As String
    PKLine As String          
    PKLot As String            
    PKProd As String          
    Step As Integer            
    PKDownID As String          
End Type

Thanks!
-hai



Mon, 07 Nov 2005 01:03:02 GMT  
 tough question for gurus!
If it works in debug mode, then the form is getting a chance to initialize.
Try the same code in the Form_Load instead of Open.  (You may have to move
it even further down the events seq)
--
Mike S.
Optimal Systems www.oscorp.com
--

Quote:
> Using Acc97, NT4, FE/BE setup - I keep getting the
> following error message when I open one of the forms (FE):

> Here's the error message:
> the instruction at 0x0403c8a3 referenced memory at
> 0x0a171688.  The memory could not be read.

> I've tried already tried copying objects into new DB,
> decompile, then compile, then compacting.  Everything
> copies, decompiles, etc. fine.  But I still get the error
> when I open the form.  Here's what's interesting: it works
> fine if I step through it in debug mode, but consistantly
> crashes if run normally.  The form opens fine if I comment
> out this section of code.  I'm trying to autofill the
> user's choices when the form opens...

> Here's the bit of code in the onOpen event that's causing
> the problems (LotXfer is of user type LotData):
> private sub Form_Open (Cancel as Integer)
>     if Len (me.filter)=0 then
>         runcommand accmdrecordsgotonew
>         me.cboselline.setfocuse
>     end if

>     If OpenArgs = "RefDT" Then
> 'error happens when any of the lines between this if
> 'statement are run outside of debug mode.
>         Me.cboSelLine = LotXfer.Line
>         Me.cboToProd = LotXfer.CurrentItem
>         Me.txtToLot = LotXfer.CurrentLot
>         Me.txtRIDLineID = GUIDFromString(LotXfer.PKLine)
>         Me.txtRIDLotRecID = GUIDFromString(LotXfer.PKLot)
>         Me.cboFromProd = LotXfer.OldItem
>         Me.txtFromLot = LotXfer.OldLot
>     End If
> end sub

> *******************code below is in a standard module
> Public Type LotData
>     CurrentLot As String
>     OldLot As String
>     CurrentItem As String
>     OldItem As String
>     Line As String
>     PKLine As String
>     PKLot As String
>     PKProd As String
>     Step As Integer
>     PKDownID As String
> End Type

> Thanks!
> -hai



Mon, 07 Nov 2005 01:36:09 GMT  
 tough question for gurus!

Quote:

>Here's the error message:
>the instruction at 0x0403c8a3 referenced memory at
>0x0a171688.  The memory could not be read.

I would STRONGLY suggest that maybe the error message is in fact
accurate: that there is a bad memory chip in your computer, and that
the memory at 0x0a171688 in fact cannot be read. You may want to
download one of the several memory test packages from the Internet, or
run your favorite computer hardware diagnostic program to see.

                  John W. Vinson[MVP]    
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Mon, 07 Nov 2005 04:32:43 GMT  
 tough question for gurus!
I don't think this is a hardware fault, John, since it's not causing a BSOD.
It looks to me more like a good old fashioned 'rogue pointer' bug.


Quote:

> >Here's the error message:
> >the instruction at 0x0403c8a3 referenced memory at
> >0x0a171688.  The memory could not be read.

> I would STRONGLY suggest that maybe the error message is in fact
> accurate: that there is a bad memory chip in your computer, and that
> the memory at 0x0a171688 in fact cannot be read. You may want to
> download one of the several memory test packages from the Internet, or
> run your favorite computer hardware diagnostic program to see.

>                   John W. Vinson[MVP]
>     Come for live chats every Tuesday and Thursday
> http://go.compuserve.com/msdevapps?loc=us&access=public



Mon, 07 Nov 2005 20:45:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Very tough question for Gurus!

2. Very tough question for Gurus!

3. Tough question for a guru

4. Tough Guru test on children

5. Question for a guru (WOSA guru, that is)

6. GURU/SEMI-GURU please help with ActiveX DLL threading question

7. Tough questions...

8. Mathmatical Genious Needed for this tough question

9. TOUGH Question - Late Bound COM objects and VB.NET

10. tough question for powerbasic

11. a few tough questions

12. a few tough questions

 

 
Powered by phpBB® Forum Software