PDA

View Full Version : Wonky Behavior



epithet
August 6th, 2015, 17:05
I'm having a few issues with Fantasy Grounds.

First, I often get this popping up when I load my campaign:
Script Error: [string "scripts/manager_options.lua"]:16: addHandler: Invalid parameter 3

Secondly, I am sometimes unable to drag items into the party inventory. I click the item, drag it over to the party inventory, drop it... and nothing happens. The same thing happens when I try to drag it to a parcel. I've tried this from loaded modules (like the PHB) and from parcels into the party inventory. I can add an item to an inventory by creating it (using the green + button) and typing/pasting the text in. Kicking my players off and re-launching Fantasy Grounds is the only way to get drag-and-drop to work. Any idea why this is happening?

Trenloe
August 6th, 2015, 17:12
I'm guessing the ruleset is 5E?

Are you running any extensions?

What versions does the chat window report when you start? You should see 3.1.2 for both 5E and CoreRPG:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/5E/5E%203.1.2%20chat.jpg

epithet
August 6th, 2015, 17:15
Yeah, sorry. 5e ruleset, no extensions, latest version (3.1.2).

Trenloe
August 6th, 2015, 17:19
Please try in a brand new campaign. And please double check that CoreRPG is reporting 3.1.2, as this error is occurring in the CoreRPG ruleset (which the 5E ruleset runs on top of).

epithet
August 6th, 2015, 18:45
Both report as 3.1.2

I did not get an error, or have difficulty with drag-and-drop, in a new campaign - but the problem doesn't come up every time in the other campaign, either.

Perhaps I should remove the rulesets and run the updater to reinstall them?

epithet
August 6th, 2015, 18:54
So, I did that. I renamed the rulesets folder to EX rulesets (did the same for the extensions folder) and ran the installer, got shiny new rulesets, and launched the campaign.

I got the error again when I launched the (old) campaign.
Script Error: [string "scripts/manager_options.lua"]:16: addHandler: Invalid parameter 3


I'm gonna try launching a new campaign a few times to see if I get the error. If not... how would I fix a campaign?

10686

Trenloe
August 6th, 2015, 18:55
If they're both reporting as 3.1.2 then they should be the latest. You can try updating, but I don't think that will make much difference.

The item drag/drop functionality has changed slightly in release 3.1.2. If you can find a reliable way to reproduce the problem that would help the devs a lot in tracking down the issue.

Trenloe
August 6th, 2015, 19:02
I got the error again when I launched the (old) campaign.
Script Error: [string "scripts/manager_options.lua"]:16: addHandler: Invalid parameter 3


I'm gonna try launching a new campaign a few times to see if I get the error. If not... how would I fix a campaign?
This is related to the update handler when options are changed.

Without FG running, open your campaign db.xml file and look for the <options> section. Post the whole of that section here and we'll see if there is some issue there.

epithet
August 6th, 2015, 19:31
As follows:

-<options>

<public/>

<CTAV type="string">off</CTAV>

<DDCL type="string">desktopdecal_ddlogo</DDCL>

<HRNH type="string">off</HRNH>

<INIT type="string">on</INIT>

<MIID type="string">on</MIID>

<RING type="string">on</RING>

<SHPH type="string">pc</SHPH>

<SHPW type="string">on</SHPW>

<TASG type="string">80</TASG>

<TBOX type="string">on</TBOX>

<TFAC type="string">off</TFAC>

<TNAM type="string">tooltip</TNAM>

<TNPCE type="string">hover</TNPCE>

<TNPCH type="string">dot</TNPCH>

<TPCE type="string">hover</TPCE>

<TPCH type="string">barhover</TPCH>

<WNDC type="string">detailed</WNDC>

</options>

epithet
August 6th, 2015, 19:37
I have a new error!
Script Error: [string "scripts/manager_options.lua"]:12: attempt to call global 'isOption' (a nil value)

epithet
August 6th, 2015, 19:42
It seems that if I launch FG and load the campaign, I almost always receive the first error I posted above, and the drag-and-drop will not work. If I exit the campaign (not the program) and reload it, I often get no error, and drag + drop works. One time, while reloading the campaign (without relaunching FG) I got the second error (post 10 in this thread) and also no drag + drop.

Trenloe
August 6th, 2015, 19:55
Looks like the <SHPH type="string">pc</SHPH> line is there from a previous version. This was an option in v3.1.1 but no longer in 3.1.2 - the generic show health to clients has been replaced with Show Health - Ally and Show Health - Non-ally. But, this shouldn't cause the error you're seeing.

You could try the following, but I really don't think it will make a difference: Make a backup of the db.xml file (in case you need to roll back) and try removing that one SHPH line, save and start up FG - see if you get the error.

Another thing to check. Open CoreRPG.pak and the scripts\manager_options.lua script. Check that lines 15-17 are as follows:

function onInit()
DB.addHandler("options.*", "onUpdate", onOptionChanged);
end

And lines 135-141 are:

function onOptionChanged(nodeOption)
local sKey = nodeOption.getName();
if not User.isLocal() then
CampaignRegistry["Opt" .. sKey] = getOption(sKey);
end
makeCallback(sKey);
end

If you're struggling with the line numbers, open the LUA file in NotePad++ (https://notepad-plus-plus.org/) - line numbers are automatically displayed down the left side.

Trenloe
August 6th, 2015, 20:01
Do you have any file synch (DropBox, Google Drive, One Drive, etc.) operating on your FG app data directories? This sounds like FG is having an issue reading the options section of the database - and other areas which might explain why drag/drop stops working.

Disable any synch apps, if you have them.

Run FG as Administrator.

Additionally, where is your FG app data directory? Did you accept the defaults or move it somewhere else?

epithet
August 6th, 2015, 21:10
I removed the line <SHPH type="string">pc</SHPH>

I verified that the code sections were in manager_options.lua

I toggled on the property to run FG as admin

My C: drive is an SSD, so I moved the Fantasy Grounds directory to my D: drive to save space when I first installed the program. It's always been there.

The first time I launched FG and loaded the campaign after these steps, I got no error and drag + drop worked fine. The second time, I got the error again:
Script Error: [string "scripts/manager_options.lua"]:16: addHandler: Invalid parameter 3
and drag + drop was not working.

At least I know now that when I see the error I have to reload the campaign.

I didn't check the line numbers, just verified that those code sections were present. Should I verify the line numbers?

kylania
August 6th, 2015, 21:14
My C: drive is an SSD, so I moved the Fantasy Grounds directory to my D: drive to save space

Well, that's an easy fix! Just upgrade to a brand new 4TB SSD! It's only $5916.99 (https://www.officedepot.com/a/products/442960/SanDisk-Optimus-MAX-4-TB-25) with free shipping!

Trenloe
August 6th, 2015, 21:19
I didn't check the line numbers, just verified that those code sections were present. Should I verify the line numbers?
No need. I think the issue is to do with file access.

Do you have any sync or backup applications running?

epithet
August 6th, 2015, 21:34
Yes, I am running Acronis True Image 2015

Hey, kylania... loan me 6 grand?

Trenloe
August 6th, 2015, 21:54
Yes, I am running Acronis True Image 2015
Can you disable it for a while, restart FG and see if you get the error/wonky behaviour?

epithet
August 6th, 2015, 22:28
I thought I had (I turned off its startup processes and rebooted) but somehow it was up in the process viewer anyway. The backup only happens on Tuesdays, though, and the error only seems to pop up with that one campaign. I can try uninstalling the backup software, if you think it's worthwhile.

Trenloe
August 6th, 2015, 23:07
My concern is that *something* is preventing access to the campaign files and it appears to be random at this stage. If this is the case it means that issues could occur with campaign data and functionality at any point.

Try copying the campaign and loading up the copy and see if you sometimes get the same error message. We need to try to get you working on a campaign without the error but with as much data as possible from the original campaign.

epithet
August 6th, 2015, 23:56
Good news, I isolated the cause (I think.)

I made a copy of the campaign folder and fired it up. Error. But I thought, going forward, it would be useful to be able to see which was which because I'm old and forget things. I un-ticked the 5e theme for the copy, and fired it up just to see. No error. 3/3 launches and loads, no error. So, I tried it with the original campaign - un-ticked the 5e theme, and 3/3 launches and loads had no error and full drag + drop functionality.

So, what's wonky in the 5e theme? I was using the image with the full "DUNGEONS & DRAGONS" logo, if that makes a difference.

Trenloe
August 7th, 2015, 00:19
Themes are extensions and they can alter code. Hence why I asked early on if you were running any extensions.

Glad you tracked down what was causing the issue. :)

epithet
August 7th, 2015, 00:27
I appreciate your help with this Trenloe. If you're ever in Houston, drinks are on me.

epithet
August 7th, 2015, 17:48
Bad news: the error popped up again today without the 5e theme. It seems to happen much less often without the theme, though.

I have no idea.

Moon Wizard
September 3rd, 2015, 21:30
I've been looking at this, but I can't recreate at the moment and it's a bit baffling.

The script errors indicate that the OptionsManager script is only being partially processed, like part of the file is missing or failing to load for some reason. Possibly a drive issue, firewall issue, or file synching issue. Extensions should not affect it in this case. Trenloe's suggestions were great. The only other option I can think of is to delete the CoreRPG.pak file and re-update.

Before the ruleset starts, all of the globally defined built-in packages and ruleset defined scripts are first all instantiated (i.e. script environment for each package is set up by executing script file), then the onInit function for each is called.

Since I can't recreate, I'll have to ask you to keep an eye out.

Thanks,
JPG