Author Topic: ErrorReport trash error  (Read 567 times)

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
ErrorReport trash error
« on: October 27, 2022, 10:07:53 AM »
Hi Biterider!

I maked a modification for objects without owner (DiskStream in this case) because original trash xax, wich contain error:
Code: [Select]
Method Primer.ErrorReport, uses xsi, pErrorCaller:POINTER, dErrorCode:DWORD
  SetObject xsi
  OCall xsi.ErrorSet, dErrorCode
  m2m [xsi].pErrorCaller, pErrorCaller, xax
  .if [xsi].pOwner != NULL
    OCall [xsi].pOwner::Primer.ErrorReport, xsi, dErrorCode
  .endif
MethodEnd

now is:
Code: [Select]
Method Primer.ErrorReport, uses xsi, pErrorCaller:POINTER, dErrorCode:DWORD
  SetObject xsi
  .if [xsi].pOwner != NULL
    OCall xsi.ErrorSet, dErrorCode
    m2m [xsi].pErrorCaller, pErrorCaller, xax
    OCall [xsi].pOwner::Primer.ErrorReport, xsi, dErrorCode
  .endif
MethodEnd

Regards, HSE.
Equations in Assembly: SmplMath

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Re: ErrorReport trash error
« Reply #1 on: October 28, 2022, 07:01:53 AM »
Hi HSE
I'll check that, but it looks like a condition that is not handled correctly  :sad:
Thanks for reporting it.

Biterider

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
Re: ErrorReport trash error
« Reply #2 on: October 28, 2022, 07:34:40 AM »
Hi Biterider!

I'll check that, but it looks like a condition that is not handled correctly  :sad:

Perhaps use is not like intended  :biggrin:

Just in case is:
Code: [Select]
    New DiskStream
    mov DskStreamIn, xax
    OCall DskStreamIn::DiskStream.Init, NULL, $OfsCStr("Data.json"), GENERIC_READ, \
                                    0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0
    .if xax == INVALID_HANDLE_VALUE                               
        jmp sale
    .endif

HSE
Equations in Assembly: SmplMath