Re: [greasemonkey-users] GM - Bug when over 165 characters

49 views
Skip to first unread message
Message has been deleted

Anthony Lieuallen

unread,
May 3, 2012, 10:45:20 AM5/3/12
to greasemon...@googlegroups.com
On Wed, May 2, 2012 at 7:52 PM, Dzhim <dzh...@gmail.com> wrote:
If a script's filename and name added together equals more than 165
characters, the next time you start your browser the script is not
listed in config.xml anymore but remains in it's directory. Tested in
Firefox 12.0.

Anthony Lieuallen

unread,
May 4, 2012, 2:07:46 PM5/4/12
to greasemon...@googlegroups.com

Please provide feedback in the issue; it seems to work for me.  A link to a non-working script would be good, as would all of the information as listed:
http://wiki.greasespot.net/Greasemonkey_Manual:Getting_Help#What_to_Say

LWChris@LyricWiki

unread,
May 4, 2012, 3:59:53 PM5/4/12
to greasemon...@googlegroups.com
Am 04.05.2012 20:07, schrieb Anthony Lieuallen:
> On Thursday, May 3, 2012 10:45:20 AM UTC-4, Anthony Lieuallen wrote:
>> On Wed, May 2, 2012 at 7:52 PM, Dzhim<dzh...@gmail.com> wrote:
>>
>>> If a script's filename and name added together equals more than 165
>>> characters, the next time you start your browser the script is not
>>> listed in config.xml anymore but remains in it's directory. Tested in
>>> Firefox 12.0.
>>>
>> https://github.com/greasemonkey/greasemonkey/issues/1548
>>
>

I think I might have a hot track:

I named my scripts "1234567890123...". With 91 digits it works. With 92
it crashes.

We have the following path to a script:
C:\Users\Username\AppData\Roaming\Mozilla\Firefox\Profiles\a1b2c3d4.default\gm_scripts\scriptname\scriptname.user.js
Now we apply the Windows path variable for the application data folder:
%AppData%\Mozilla\Firefox\Profiles\a1b2c3d4.default\gm_scripts\scriptname\scriptname.user.js
Then we remove the scriptname:
%AppData%\Mozilla\Firefox\Profiles\a1b2c3d4.default\gm_scripts\\.user.js

This string has a length of 73 characters. Together with a 91 characters
long scriptname, the path is 255 characters long. For the 92 chars, it's
257. You know 256 is some kind of magic number. I think it might be good
to investigate in this direction.

Everything in the menu and the manager worked as always, but as soon as
it switched from evaluating the config.xml to the actual file path, it
failed. I guess Firefox has a limited path length.

In my trials afterwards, 91 characters also failed, but I think it's
nevertheless a good point to start.

Chris

Kwah

unread,
May 5, 2012, 6:12:59 AM5/5/12
to greasemon...@googlegroups.com


> This string has a length of 73 characters. Together with a 91 characters long scriptname, the path is 255 characters long. For the 92 chars, it's 257. You know 256 is some kind of magic number. I think it might be good to investigate in this direction.

256 does appear to be a magical non-existent number in your example above ;)

See this link regarding maximum path lengths:
http://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath


--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To post to this group, send email to greasemonkey-users@googlegroups.com.
To unsubscribe from this group, send email to greasemonkey-users+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.

Reply all
Reply to author
Forward
0 new messages