AV when accessing UserSession

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

Re: AV when accessing UserSession

Post by ZSL »

The Intraweb development team is trying to contact you will you please respond to them.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

I'd love to. I've searched my emails for "IntraWeb" and "Atozed" but can't find any recent emails from them, not in Trash or Spam folders, either. How did they try to contact me? Best way would be through madshi (at) gmail (dot) com.
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Iso there any progress on fixing this issue?

I will appreciate an update...
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

I received an email from Atozed in January with a modified madIWSupport.pas file. It worked fine for me, but with a little caveat (see below). I've now modified madIWSupport.pas to optionally either use my old hacked solution (which works for me with the latest IW version), or the official IW exception callback. You can choose by defining or undefining the "{$define useIWExceptionCallback}" at the top of madIWSupport.pas. See attached test project.

Here's the little caveat: When using IntraWeb's new exception callback, the test project produces a popup "ds1: Cannot perform this operation on a closed dataset". When using my dirty hook solution, this popup does not appear. To be honest, I'm not 100% sure if the average IW user would want this popup to appear or not. What do you think?

I've reported this caveat to Atozed, but haven't heard anything back.
Attachments
iwprj1.zip
(90.77 KiB) Downloaded 342 times
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Thanks. 8 will try it and I will also followup with AtoZed
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

Great, let me know how it goes.
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

... since my last post I have upgraded my Delphi to Tokyo IW to the latest version and MADshi to 4.19.

All new, clean installs.

I am still having this problem.

Help please..
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

Did you try both the patched version of my hook solution, and the "official" solution provided by IntraWeb, and they both failed?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

madshi wrote:Did you try both the patched version of my hook solution, and the "official" solution provided by IntraWeb, and they both failed?
Yes. I tried both.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

With the test project I attached? That's strange, both work fine here.

How can I reproduce the issue on my PC?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

Sorry for the delay. I have another urgent deadline but I will come back to this.

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

Re: AV when accessing UserSession

Post by ZSL »

Delphi Tokyo 10.2.3 and IW 14.2.17 and MADshi 4.0.19

I have implemented the following code:

Code: Select all

function UserSession: TIWUserSession;
begin
  if WebApplication <> nil then
    Result := TIWUserSession(WebApplication.Data)
  else
    Result := nil;
end;
And

Code: Select all

procedure AddCommandLineHeaderInfo(const exceptIntf: IMEException; var handled: boolean);
begin
  exceptIntf.BugReportHeader['Product'] := 'Test';
  if UserSession <> nil then
  begin
    exceptIntf.BugReportHeader['User #'] := UserSession.gv_UID;
    exceptIntf.BugReportHeader['Site ID'] := UserSession.gv_SID;
  end;
end;
I have also tried builds with:
1. Standard distribution
2. Changes to MADSupport and mad.inc

In AddCommandLineHeaderInfo, UserSession always evaluates to nil.

I don't know where to go from here...
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

So basically everything works except UserSession? That's at least some progress, right?

I'm not sure how to get access to the UserSession with the latest IntraWeb version, if that code doesn't work. That seems more like a question for the IntraWeb support? This question doesn't seem to be madExcept specific at all, or what do you think?
ZSL
Posts: 54
Joined: Thu Mar 31, 2016 11:23 pm

Re: AV when accessing UserSession

Post by ZSL »

I think you may be correct.

I will post on IW forum in the next day or so.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: AV when accessing UserSession

Post by madshi »

If you have any news, would be great if you could update here. Thanks!
Post Reply