DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: User Variable value limit and Timer plugin problem  (Read 7,269 times)

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
User Variable value limit and Timer plugin problem
« on: July 04, 2011, 06:37 PM »
I noticed that the user variable value length is limited to 1024 characters. It is not a problem in itself, but it causes the Timer plugin to stop working when you have enough timers in the history.

This is probably not so much a FARR core issue, as it is the Timer plugin issue.

Quick fix is to set the timer::archive uservalue to an empty array, but it would be great if the plugin could handle this automagically.
It is impossible to make anything foolproof because fools are so ingenious.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: User Variable value limit and Timer plugin problem
« Reply #1 on: July 04, 2011, 08:33 PM »
Hmm...I wonder if this could be a contributing factor to the Timer plugin issue mentioned at:

 http://www.donationcoder.com/forum/index.php?topic=23406.0

May be it is possible for the Timer plugin to check what the length of the representation of the data is before trying to store the data.
« Last Edit: July 04, 2011, 09:42 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: User Variable value limit and Timer plugin problem
« Reply #2 on: July 05, 2011, 05:22 AM »
Tried making many timers and succeeded in causing a problem at FARR start up.

Also tried making a timer with an associated message which was waaaaaay too long and AFAICT this also caused a FARR start up problem.

Also was able to edit FindAndRunRobot.ini appropriately to get FARR to start again without reporting an error.  As one might guess, limited deletion (presumable to get the length of an appropriate user variable under some length) was sufficient.
« Last Edit: July 05, 2011, 05:23 AM by ewemoa »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • Coding Snacks
Re: User Variable value limit and Timer plugin problem
« Reply #3 on: July 05, 2011, 06:13 PM »
Do you guys get the JSON parser error I was getting?
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
Re: User Variable value limit and Timer plugin problem
« Reply #4 on: July 05, 2011, 06:42 PM »
I got the same error, yes. The Timer plugin stores it's past alarms as a JSON array in the user variable. FARR (or something else) limits the length of the value field to 1024 chars. When the array became longer than 1024 characters, everything that was behind the 1024th char was discarded. JSON string then became syntactically incorrect and caused the JSON parser error.
It is impossible to make anything foolproof because fools are so ingenious.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • Coding Snacks
Re: User Variable value limit and Timer plugin problem
« Reply #5 on: July 05, 2011, 08:05 PM »
The [ExtraSettings] section contains the longest string here.  :) And ini files have a certain numbers of restrictions, like key text values length limit etc. I don't have the time to invvestigate now but it could something related...
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: User Variable value limit and Timer plugin problem
« Reply #6 on: July 06, 2011, 09:49 PM »
Do you guys get the JSON parser error I was getting?
Not every time -- I think it may depend on the specifics of the data truncation / munging.

Original address: https://www.donationcoder.com/forum/index.php?topic=27217.0