Page 1 of 1 1
Topic Options
#62942 - 2002-02-07 07:51 PM COM Bug : Shawn calling Lonkero
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jooel,

Well, I've just wasted about 2 days trying to track down a very strange COM bug (trap) with kixtart, kixforms and winhttp ... I thought it was something to do with WinHTTP and KiXforms not playing together nicely ... so i hacked and shaved at my code trying to narrow down the failure ... but no matter how hard I tried, I couldn't pin-point the problem. Then I tried to reproduce it with WinHTTP and some other COM object - so I used ADSI and was successfull. After all is said and done, I suspect that it's either a winhhtp bug or a kixtart bug.

The following script reproduces the trap. The trap only occurs if you specify a bad url in the HTTP get method. The strange thing is - is that if you play with the code, different permutations will no cause the trap. For example, this causes a trap (can you verify for me?):


break on


$user = getobject("WinNT://@LDOMAIN/@USERID,user")


$user.getinfo()


$http = createobject("winhttp.winhttprequest.5")


if @error = 0


$http.open("GET","xxx")


endif


exit 1

Now, here's a good one. Simply remove the if wrapper around winhttp and it runs fine (even with a bad url) !


break on


$user = getobject("WinNT://@LDOMAIN/@USERID,user")


$user.getinfo()


$http = createobject("winhttp.winhttprequest.5")


; if @error = 0


$http.open("GET","xxx")


; endif


exit 1

Oh yeah, it gets better. put everything back, comment out the first ADSI getinfo method, and everything works again ...


break on


$user = getobject("WinNT://@LDOMAIN/@USERID,user")


; $user.getinfo()


$http = createobject("winhttp.winhttprequest.5")


if @error = 0


$http.open("GET","xxx")


endif


exit 1

I'm about ready to pull my all my hair out because i wasted so much time trying to track this problem in kixforms. Would like to know if you've seen this weird behavior with winhttp yet ? And if you think it's a winhttp problem or a kixtart one (i think it's a kixtart bug myself, or kixtart not handling some kind of winhttp COM exception properly. i really don't know. I think this mostly because if you remove the IF statements and the error check, everything works fine.

Regards,

Baldy

[ 07 February 2002: Message edited by: Shawn ]

Top
#62943 - 2002-02-07 10:04 PM Re: COM Bug : Shawn calling Lonkero
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Shawn,

I gave it a whirl, and it traps on me as well. Should not be a KiXforms problem.

Top
#62944 - 2002-02-08 08:02 AM Re: COM Bug : Shawn calling Lonkero
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
which is the version of winhttprequest.5 you have?
I had with bbchecker some problems with bugs when used version 5 preliminary build.

can't check this with this wksta I'm on right now, but sadly it somehow points to kix...

what about contacting ruud?

your truly,

_________________________
!

download KiXnet

Top
#62945 - 2002-02-08 01:50 PM Re: COM Bug : Shawn calling Lonkero
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
Shawn,
To add more water about COM errors :
I'm currently fighting with WinNT:// provider, and even if an error occurs, most of the time i only have @error = 0

try this for example :
$Domain=getobject("WinNT://NotExistingDomain")
? "Error :"+@serror
? "Domain name :"+$Domain.name

For me, i got this :
Error :command successfully completed ... (usual kixtart success)
Domain name :NotExistingDomain

getting strange, no ?
And other calls to objects methods/properties that *should* not exist works perfectly, until you ran in one refreshing the object cache.

Seems WinNT:// is not really complete, at least for errors checking.

_________________________
? getobject(Kixtart.org.Signature)

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 633 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.126 seconds in which 0.101 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org