Recent

Author Topic: Calling InitShowing(gApp) causes "attempt to use stale local reference" FATAL  (Read 880 times)

Robert Gilland

  • Full Member
  • ***
  • Posts: 159
No Idea why this is happening:

I/frmModuleMenu(25300): pre set calling form frmStockTakeHdr

I/frmModuleMenu(25300): pre init frmStockTakeHdr

E/dalvikvm(25300): JNI ERROR (app bug): attempt to use stale local reference 0x4b00019

E/dalvikvm(25300): VM aborting

F/libc    (25300): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 25300

code is below:

  if frmStockTakeHdr = nil then
    begin
      LogMessage( pCallingForm.Text, 'pre create frmStockTakeHdr' );
      gApp.CreateForm(TfrmStockTakeHdr, frmStockTakeHdr);
      LogMessage( pCallingForm.Text, 'pre set calling form frmStockTakeHdr' );
      frmStockTakeHdr.pCallingForm := pCallingForm;
      LogMessage( pCallingForm.Text, 'pre init frmStockTakeHdr' );
      frmStockTakeHdr.InitShowing(gApp);
      LogMessage( pCallingForm.Text, 'pre set call back' );
      frmStockTakeHdr.SetCloseCallBack(pOnCloseCallback, pCallingForm );
    end
  else
    begin
      frmStockTakeHdr.pCallingForm := pCallingForm;
      frmStockTakeHdr.Show;
      frmStockTakeHdr.SetCloseCallBack(pOnCloseCallback, pCallingForm );
    end;

 

TinyPortal © 2005-2018