philpw99 / Stash_Helper

This is a little helper program for the excellent StashApp in Windows.
MIT License
64 stars 3 forks source link

AutoIT Error #1

Closed Wraithstalker90 closed 2 years ago

Wraithstalker90 commented 2 years ago

After the Newest Update i keep getting a Crash that says

Line 7262 (File "C:\Program Files (x86)\Stash Helper\Stash_helper.a3x")

Error: Variable Must be of type "Object"

philpw99 commented 2 years ago

Thank you for raising this issue ! I only realized couple of days ago, that I did make some stupid mistakes in recent versions. This error happened in Customize Bookmark feature, which is due to my recent change in storing URLs. Some versions stored the URL in URLDecoded format, which contains quotes( " ) without encoding and causes problems. The new version, 2.1.4 has fixed it. However, you registry probably already has the unencoded bookmarks and it will keep causing program errors. In this case, please go to registry settings: Computer\HKEY_CURRENT_USER\Software\Stash_Helper and delete the keys which has "list" in the end, like "ScenesList", "MoviesList"... etc. It will clear the bookmark lists. If you don't want to lose those bookmarks, you can edit the list string and replace " with %22 . (The "@@@" is my line separator. The "|" is my column separator. No need to encode those.)

Wraithstalker90 commented 2 years ago

I didn't have any Bookmarks in my Registry, so i just tried to delete the entire registry folder which had me go through the setup again. But right after it was done and launched it gave me the same error again.

philpw99 commented 2 years ago

OK, are you using the latest v2.1.4 version ? Because in the source code of v2.1.4 the line 7262 is inside GUIListViewEx_SimpleSort() function. And I only use ListViewEx in Customize Bookmarks. I cannot think of a reason how the code would execute to that function during the startup. Since the program relies heavily on WebDriver, I also recommend delete the webdriver files in %appdata%\WebDriver\ and let Stash_Helper download the binaries again during the startup.

Wraithstalker90 commented 2 years ago

image

I Tried to delete the Webdriver, Uninstall and download the newest Version(2.1.4) and delete the Registry files but i still got the error. I have never used the Bookmarks feature so i didn't think it had anything to do with that but i don't know why it would be running that part of the script.

philpw99 commented 2 years ago

Yeah, now come to think of it. This line shouldn't have this kind of error message either

screen1

It's not using any Objects. Well, I think I need to do more investigation on this.

OK, now I see. I am using au3stripper.exe the wrong way. 🤣 It was actually a Json_Get(). .

philpw99 commented 2 years ago

Hi, the new version v2.1.6 should fix the problem. It was a missing line "Return SetError(1)" in the query function. So when the query went bad, the program didn't catch it.

Wraithstalker90 commented 2 years ago

image

Some progress being made, now i have this error code.

philpw99 commented 2 years ago

Great ! I am on the right track. Just need to find out exactly which line it is and I will know what caused the trouble. By the way, are you using Stash v0.11 or developer's version?

Wraithstalker90 commented 2 years ago

i am normally running the Stable version but i tried the Dev version and it didn't work still. In Version 2.1.6 i don't even get to the Setup process so i cant check if it matters.

philpw99 commented 2 years ago

Shoot !! It is actually a step backward. The "MustDeclareVars" options causes the crash. Even though it's a good thing to set for debugging, it's not good for general use. In this case it makes the program crashes even earlier ! Shouldn't have enabled it in the first place ! Now v2.1.7 is out. It should be really working. Apologize for all the unnecessary crashes !

Wraithstalker90 commented 2 years ago

With the New version i am back to the Error: Line 7262 Variable must be of type "Object"

philpw99 commented 2 years ago

This is actually good. It's definitely caused by a Json_Decode error. I should have guard-railed it. Now v2.1.8 should show up an error message and report the error result. At least the program shouldn't crash. If no error message, then the problem resides in the graphql call to get the stash version, which is not that important anyway.

Wraithstalker90 commented 2 years ago

Seems like v2.1.8 has fixed it and it didn't crash on startup. Thanks