Page 1 of 1 1
Topic Options
#209711 - 2014-12-03 09:34 AM Troubles with ascan
Morten_rn_dk Offline
Just in Town

Registered: 2009-04-20
Posts: 1
Loc: Denmark
Having some troubles with ascan - version 4.61 and version 4.64 of kix32.exe behaves differently

$a="1","","2","3","","5","6","7","8","9","10"
? Join( AScan($a,"9",,,3) , ",")

Version 4.61 of Kix32.exe Returns : 9 (correct)
Version 4.64 of Kix32.exe Returns : 1,4,9 (wrong)


Edited by Mart (2014-12-03 12:09 PM)
Edit Reason: Moved post from Beta to Basci scripting as it is not related to the original question in the Beta section

Top
#209712 - 2014-12-03 03:51 PM Re: Troubles with ascan [Re: Morten_rn_dk]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
I was not able to reproduce the problem. Here is your script modified to show a little more info:

 Code:
? @kix
$a="1","","2","3","","5","6","7","8","9","10",19,"9"
? "Return All Exact Matches:" + Join( AScan($a,"9",,,2) , ",") 
? "Return All Instr Matches:" + Join( AScan($a,"9",,,3) , ",") 


4.64 returns
 Code:
4.64
Return All Exact Matches:9,12
Return All Instr Matches:9,11,12


4.62 returns the same

Top
#209713 - 2014-12-03 04:16 PM Re: Troubles with ascan [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I was able to reproduce the issue with a 4.64 and with an 4.65 alpha build.
this is indeed a bug with ascan() and I think it has been discussed before...

Allen your script with 4.64 produces:
 Code:
Return All Exact Matches:9,12
Return All Instr Matches:1,4,9,11,12


Edited by Lonkero (2014-12-03 04:22 PM)
_________________________
!

download KiXnet

Top
#209714 - 2014-12-03 04:22 PM Re: Troubles with ascan [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
I'm using Win 8.1 x64 for what it's worth.
Top
#209715 - 2014-12-03 04:24 PM Re: Troubles with ascan [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and Ruud is using VS2013. yea, might be microsoft messing things up again.

will see once he sees this.
_________________________
!

download KiXnet

Top
#209716 - 2014-12-03 04:26 PM Re: Troubles with ascan [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Until the bug gets narrowed down, Morten, would the Exact search work?
Top
#209719 - 2014-12-04 12:38 AM Re: Troubles with ascan [Re: Allen]
Henriques Offline
Fresh Scripter

Registered: 2007-09-13
Posts: 43
This is strange, I agree for the results with Allen, I combined the scripts of Morten_rn_dk and Allen with the following result;

 Code:
If @ONWOW64
    $RESULT = SetOption("WOW64FileRedirection", "On")
    $RESULT = SetOption("WOW64AlternateRegView", "On")
Else
    $RESULT = SetOption("WOW64FileRedirection", "Off")
    $RESULT = SetOption("WOW64AlternateRegView", "Off")
EndIf
Cls

? 'OS + patchlevel = ' + RTrim(@PRODUCTTYPE + ' ' + @DOS + ' ' + @CSD) + '.'
? "Kix Version = " + @KIX + @CRLF

$A="1","","2","3","","5","6","7","8","9","10"
? "Morten_rn_dk"
? Join( AScan($A,"9",,,3) , ",")
? "-------------------------------------------------"
? "Allen"
$A="1","","2","3","","5","6","7","8","9","10",19,"9"
? "Return All Exact Matches:" + Join( AScan($A,"9",,,2) , ",")
? "Return All Instr Matches:" + Join( AScan($A,"9",,,3) , ",")


Result;
 Code:
OS + patchlevel = Windows 8.1 Professional Edition 6.3.
Kix Version = 4.64

Morten_rn_dk
9
-------------------------------------------------
Allen
Return All Exact Matches:9,12
Return All Instr Matches:9,11,12



Edited by Allen (2014-12-04 01:20 AM)
Edit Reason: added code tags

Top
#209720 - 2014-12-04 03:27 AM Re: Troubles with ascan [Re: Henriques]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Nice. So indeed something in c++ is broken in VS2013.

Glad to tell I have never used it myself. Hate the new look BAD
_________________________
!

download KiXnet

Top
#210400 - 2015-07-20 03:30 PM Re: Troubles with ascan [Re: Lonkero]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Thanks for the report. I've checked this, and am not able to reproduce the issue, either with 4.64 or the latest build.

If anyone thinks this is still an issue, please post additional steps/info to repro.

Ruud

Top
#210402 - 2015-07-21 04:08 PM Re: Troubles with ascan [Re: Ruud van Velsen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Although no one said it out right, I got the impression it was OS related. I could not reproduce the error using Win 8.1 x64.

Lonk, what OS are you on?

Top
#210403 - 2015-07-21 04:26 PM Re: Troubles with ascan [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
win7 64bit.
_________________________
!

download KiXnet

Top
#210407 - 2015-07-22 01:42 PM Re: Troubles with ascan [Re: Lonkero]
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
... and there you have it...

Amazingly, this issue turns out to be specific to Win7...

Don't understand how or why exactly, but the runtime function involved operates ever so slightly different on Win7.

Just managed to repro on a Win7 box, and have added a workaround for this in the upcoming build.

As always: thanks for the report/support!!

Ruud

Top
#210408 - 2015-07-22 03:45 PM Re: Troubles with ascan [Re: Ruud van Velsen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Dude. Nice work! \:\)
Top
#210410 - 2015-07-24 04:20 AM Re: Troubles with ascan [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
indeed. and Ruud, I bet you can thank either the security update folks or whoever decided that vista was ready to ship... either or, they made a mistake and we all still suffer for it.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.041 seconds in which 0.013 seconds were spent on a total of 13 queries. Zlib compression enabled.