Page 1 of 5

AV when accessing UserSession

PostPosted: Wed Nov 01, 2017 7:24 am
by ZSL
Intraweb and MAD 4.xx

Code extract below causes an AV when accessing UserSession.

Can anyone please tell me how to access UserSession details with getting an AV

TIA

Code: Select all
{$IFDEF madExcept}

procedure AddCommandLineHeaderInfo(const exceptIntf: IMEException; var handled: boolean);
begin

  exceptIntf.BugReportHeader['Product'] := 'Odyssey';
  exceptIntf.BugReportHeader['Practice Name'] := UserSession.gv_Site.PracticeName;
  exceptIntf.BugReportHeader['User #'] := UserSession.gv_User.UserNumberStr;
  exceptIntf.BugReportHeader['User ID'] := UserSession.gv_User.UserID;
  exceptIntf.BugReportHeader['IP Address'] := UserSession.WebApplication.IP;
end;

initialization

RegisterExceptionHandler(AddCommandLineHeaderInfo, stDontSync);

{$ENDIF}

Re: AV when accessing UserSession

PostPosted: Wed Nov 01, 2017 8:58 am
by madshi
I'm not really an expert on IntraWeb, I'm not sure why it's crashing. Have you tried asking IntraWeb support about it, seeing that it's their code which crashes? A call to UserSession seems innocent enough. Maybe they don't like multi-threading?

Re: AV when accessing UserSession

PostPosted: Wed Nov 01, 2017 9:27 pm
by ZSL
Hi,

I am relaying message from Intraweb

Make sure your Madshi version matches the IW version. They "hack" into
IW in a binary way and it breaks from time to time.

We have offered to work with them to put in official hooks for them, but
I've never heard back from them. Maybe its in their spam folder, or
maybe they arent interested. Not sure.

If you have contact with them, please alert them that our offer is still
open so they don't have to hack in in a brittle manner.


https://forums.embarcadero.com/post!reply.jspa?messageID=905505

Re: AV when accessing UserSession

PostPosted: Thu Nov 02, 2017 7:33 pm
by ZSL
Please let us know if you have seen this post and whether or not you will work with Intrawest.

Re: AV when accessing UserSession

PostPosted: Thu Nov 02, 2017 7:49 pm
by madshi
I've seen your reply, but I'm currently busy on a project for a high-priority customer. Might get to the IntraWeb problem early next week.

FWIW, I'm somewhat doubtful that the way madExcept hooks into the IW exceptions is at fault for this problem. It's possible, but then why does the crash occur in the moment when accessing "UserSession"?

Can you reproduce this problem with a small test project, ideally one that doesn't require a webserver with ISAPI report or things like that. So IW standalone somehow?

Re: AV when accessing UserSession

PostPosted: Tue Nov 14, 2017 6:57 pm
by ZSL
Any update on this?

It is crashing when accessing public variable in UserSession. The app continues to operate but FYI the actual AV in the function is not reported

Re: AV when accessing UserSession

PostPosted: Tue Nov 14, 2017 7:03 pm
by madshi
Can you reproduce this problem with a small test project, ideally one that doesn't require a webserver with ISAPI report or things like that. So IW standalone somehow?

Re: AV when accessing UserSession

PostPosted: Tue Nov 14, 2017 7:18 pm
by ZSL
I will do this later today.

Re: AV when accessing UserSession

PostPosted: Wed Nov 15, 2017 7:07 am
by ZSL
Here is a simple example.

iwprj1.7z
(1.98 KiB) Downloaded 58 times

Re: AV when accessing UserSession

PostPosted: Thu Nov 16, 2017 5:56 pm
by ZSL
Any update on this..

Thanks

Re: AV when accessing UserSession

PostPosted: Tue Nov 21, 2017 10:54 am
by ZSL
Bump...

Re: AV when accessing UserSession

PostPosted: Wed Nov 22, 2017 7:12 pm
by ZSL
Is this going to be answered.....

Re: AV when accessing UserSession

PostPosted: Wed Nov 22, 2017 7:33 pm
by madshi
I'm sorry for the very sluggish response. I try my best to get this issue looked at until the end of the week.

Re: AV when accessing UserSession

PostPosted: Wed Nov 22, 2017 7:55 pm
by ZSL
Thank you.

It is just that the silence worried me :wink:

Re: AV when accessing UserSession

PostPosted: Thu Nov 30, 2017 2:20 am
by ZSL
Any update on this, please..