AV when accessing UserSession

delphi package - automated exception handling
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

AV when accessing UserSession

Post 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}
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post 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?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post 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!rep ... eID=905505
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Please let us know if you have seen this post and whether or not you will work with Intrawest.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post 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?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post 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
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post 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?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

I will do this later today.
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Here is a simple example.
iwprj1.7z
(1.97 KiB) Downloaded 409 times
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Any update on this..

Thanks
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Bump...
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Is this going to be answered.....
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post 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.
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Thank you.

It is just that the silence worried me :wink:
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Any update on this, please..
Post Reply