merbin2012 / sharex

Automatically exported from code.google.com/p/sharex
0 stars 1 forks source link

Random Generator Improvement/Fix #544

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?

I noticed ShareX generating identical URL's when I had used it in the past so I 
decided to run a test over the course of a month or so with normal usage. I set 
ShareX to generate "%ra" filenames of 18 characters long, however it does not 
appear that its truely random. Over 156 screenshots I had 8 repeats, one which 
repeated three times.

Naturally I had put the "%ms" modifier on the URL so I could gather this data 
without having colliding urls.

Here is a GIST - https://gist.github.com/anonymous/537ef82d681e33f7a447

What goal would this enhancement help you achieve?

I believe this feature would save the headache of having to clear the FTP 
server of screenshots on a weekly basis regardless of URL length. 

Original issue reported on code.google.com by donaldla...@gmail.com on 20 Nov 2013 at 7:00

GoogleCodeExporter commented 9 years ago
Are these files uploaded in same time or have some time between them?

Original comment by flexy...@gmail.com on 20 Nov 2013 at 8:50

GoogleCodeExporter commented 9 years ago
These files have quite a bit of time, several days in some cases. This was 
during standard use over the course of a month.

Original comment by donaldla...@gmail.com on 20 Nov 2013 at 9:31

GoogleCodeExporter commented 9 years ago
I don't understand how it is possible.

Original comment by flexy...@gmail.com on 20 Nov 2013 at 9:33

GoogleCodeExporter commented 9 years ago
I'm not quite sure either, its been replicated across two installations of 
Windows 7 Professional x64 with all Microsoft updates. 

Original comment by donaldla...@gmail.com on 20 Nov 2013 at 10:20

GoogleCodeExporter commented 9 years ago
Even i don't know the reason i made sure getting random not possible in same 
time from same Random class. I still don't think it is to do with this.

Original comment by flexy...@gmail.com on 4 Dec 2013 at 8:10

GoogleCodeExporter commented 9 years ago
I'm using 10 characters random alphanumeric filename and today got overwrite 
warning (I added overwrite window which asks for options if filename exists). 
This other file with same filename created 15 days ago and how i got same 
filename (U6QGJeXIKc.png) now i don't understand. Is it extreme luck or 
something wrong. Even if somethings wrong it can't be to do with ShareX because 
random function from .NET and ShareX reopened countless times.

Original comment by flexy...@gmail.com on 29 Mar 2014 at 8:04

GoogleCodeExporter commented 9 years ago
I can verify this is still an issue. It seems that the %ra generation have a 
chance to generate identical sequences. Even if it is separated by another %*.

Example from normal usage with %ra%ra%ra%ra%ms%ra%ra%ra%ra:

mOEL452MAlA.txt
mOEL847MAlA.txt
PoWM090GzOa.txt
PoWM537GzOa.txt

A suggestion I could propose is allowing overwrite (which may have unintended 
consequences), or of course finding why the random generator behaves that way.

Original comment by donaldla...@gmail.com on 29 Mar 2014 at 12:49

GoogleCodeExporter commented 9 years ago
Showing this window if filename exists: 
https://dl.dropbox.com/u/14076298/ShareX/2014/03/7p0QittPF2.png

But can't figure out how filenames can be same.

Original comment by flexy...@gmail.com on 29 Mar 2014 at 12:53