Page 1 of 2

List rendering issue with "List" triggered Scripted Column

Posted: 07 Jun 2014 07:12
by Huidong
Hi, Don, just wanted to bring to attention the previous issue I reported here:
http://www.xyplorer.com/xyfc/viewtopic. ... 14#p106014

Image

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 09:46
by admin
Looks like there are some formatting characters in your data. Can you hexdump the data to check? See SC hexdump()...

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:03
by Huidong
Here's one result using default hexdump()

Code: Select all

00000000: 54 69 74 6C 65 3A 20 20 20 20 20 20 20 20 20 20   Title:          
00000010: 52 65 76 69 65 77 4F 66 4D 61 70 6C 65 31 38 2E   ReviewOfMaple18.
00000020: 6E 62 0D 0A 43 72 65 61 74 6F 72 3A 20 20 20 20   nb..Creator:    
00000030: 20 20 20 20 4D 61 74 68 65 6D 61 74 69 63 61 0D       Mathematica.
00000040: 0A 50 72 6F 64 75 63 65 72 3A 20 20 20 20 20 20   .Producer:      
00000050: 20 4D 61 74 68 65 6D 61 74 69 63 61 20 50 44 46    Mathematica PDF
00000060: 20 45 78 70 6F 72 74 0D 0A 43 72 65 61 74 69 6F    Export..Creatio
00000070: 6E 44 61 74 65 3A 20 20 20 30 33 2F 32 36 2F 31   nDate:   03/26/1
00000080: 34 20 31 32 3A 31 30 3A 31 37 0D 0A 4D 6F 64 44   4 12:10:17..ModD
00000090: 61 74 65 3A 20 20 20 20 20 20 20 20 30 33 2F 32   ate:        03/2
000000a0: 36 2F 31 34 20 31 32 3A 31 30 3A 31 37 0D 0A 54   6/14 12:10:17..T
000000b0: 61 67 67 65 64 3A 20 20 20 20 20 20 20 20 20 6E   agged:         n
000000c0: 6F 0D 0A 46 6F 72 6D 3A 20 20 20 20 20 20 20 20   o..Form:        
000000d0: 20 20 20 6E 6F 6E 65 0D 0A 50 61 67 65 73 3A 20      none..Pages: 
000000e0: 20 20 20 20 20 20 20 20 20 34 0D 0A 45 6E 63 72            4..Encr
000000f0: 79 70 74 65 64 3A 20 20 20 20 20 20 6E 6F 0D 0A   ypted:      no..
00000100: 50 61 67 65 20 73 69 7A 65 3A 20 20 20 20 20 20   Page size:      
00000110: 36 31 32 20 78 20 37 39 32 20 70 74 73 20 28 6C   612 x 792 pts (l
00000120: 65 74 74 65 72 29 20 28 72 6F 74 61 74 65 64 20   etter) (rotated 
00000130: 30 20 64 65 67 72 65 65 73 29 0D 0A 46 69 6C 65   0 degrees)..File
00000140: 20 73 69 7A 65 3A 20 20 20 20 20 20 31 35 37 31    size:      1571
00000150: 38 31 36 20 62 79 74 65 73 0D 0A 4F 70 74 69 6D   816 bytes..Optim
00000160: 69 7A 65 64 3A 20 20 20 20 20 20 6E 6F 0D 0A 50   ized:      no..P
00000170: 44 46 20 76 65 72 73 69 6F 6E 3A 20 20 20 20 31   DF version:    1
00000180: 2E 34 0D 0A                                       .4..            

It doesn't seem to have any formatting chars to me?

BTW the Scripted Column that produces this rendering issue is as follows:

Code: Select all

$output = runret("cmd /c D:\Xpdf\pdfinfo.exe ""<cc_item>""");
$a = strpos($output, "Pages:");
$b = strpos($output, "Encrypted:");
$len = $b - $a - 2;  // get rid of trailing crlf
$pages = substr($output, $a, $len);  
$count = gettoken($pages, 2, ":", t);
return $count;
Trigger is chosen to be "List".

Note that this issue occurs only after scrolling, and not every row is messed up, there's some apparent randomness to it.

Also, when the trigger is set to "Browse", there's no such rendering issue. (Of course no issue with trigger by "Click" either).

==============
EDIT
The hexdump shown above is the entire output of pdfinfo.exe. But the return value of my CC script is just a single number. No formatting chars I believe.

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:07
by admin
OK, then it's indeed a bug. I will later check that...

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:25
by admin
Huidong wrote:EDIT
The hexdump shown above is the entire output of pdfinfo.exe. But the return value of my CC script is just a single number. No formatting chars I believe.
You should hexdump the contents of that $count variable then.

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:37
by Huidong
Sure, here it is:

Code: Select all

00000000: 34                                                4               
There is a CR+LF at the end, but I guess that shouldn't be the cause?

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:44
by admin
:? I see no CRLF in the hexdump. Where does it come from? It should not be there.

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 10:55
by Huidong
Sorry my bad, there is NO CRLF within the hexdump, it's the CRLF of the text command. How silly.

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:01
by admin
I will later try to install pdfinfo...

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:09
by Huidong

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:25
by admin
OK, done. Tried your scripted column. It works fine! No rendering issue!

Are you sure it's not maybe one of the other items in that column, e.g. the image dimensions I see in your screenshot?

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:32
by Huidong
I'm pretty sure it cannot be the image dimensions (I've been using it for quite some time, way before I started trying Scripted Columns).

Just making sure, did you select "List" as the trigger?

Also I'm suspecting perhaps it affects long list? For example, the folder I was testing on contains 1812 items.

Does it occur after quickly scrolling down?

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:39
by admin
OK, I had "Click". Now I checked List as trigger, but still no problems.

Can you find out what characters/words are misprinted? Maybe that is a trace...

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:42
by Huidong
Now noticed some randomness to this issue. Sometimes it's better. No messing up of the text (it seems to be due to sluggish refreshing while pdfinfo is doing the computation)

But even in those good days when no "mashed" text occurs, the Scripted Columns still has issues:

Image

Note that some cells failed to display the return value?

I'm guessing it has to do with pdfinfo simultaneously running, i.e. some blocking effect?

Re: List rendering issue with "List" triggered Scripted Colu

Posted: 07 Jun 2014 11:45
by Huidong
Hmm, the screenshot is not shown for some reason, here's the dropbox link

https://www.dropbox.com/s/qgrz7x4cd2a7y ... _bug_2.png