Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Possible bug with plug ins

Author
Message
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 10th May 2020 16:05
So this is new territory for me, but may be an issue.

I call a plug in, it seems to work fine. However it gets "stuck". If i make any changes and recompile in VS (Windows), I then have to completely rename the plugins folder of AppGameKit somehow remebers the last one and won't change it.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th May 2020 17:13 Edited at: 10th May 2020 17:19
It works fine for me. You have to put your plugin into AGK's plugin folder. Typically that is:

C:\Program Files (x86)\The Game Creators\AGK2\Tier 1\Compiler\Plugins\YOUR_PLUGIN_NAME

This is so the plugin can be used in any project. Every time your code is compiled or run, the dll is copied from the above location to your project folder. Dont just put your VS dll plugin in your project folder as it will be overwritten. Make sure it is copied to the correct location above.

Also...if you compiling a 32bit version and a 64bit version then set VS to compile both together so you aren't accidentally using an older version. You can setup VS to copy your dll's to the plugin folder so any compilation in vs updates the correct location
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 10th May 2020 17:37 Edited at: 10th May 2020 17:39
Hi Bengismo.

I think I'm doing everyting correct. My folder path is



Inside here, I place the Commands.txt and my dll, which I rename to Windows64.dll as I am only using windows 64bit.

Everything is fine. However if I then change the code in VS, choose to clean the project, then rebuild it, when I go back to the above path and erase the dll, copy in the new one and rename it to Windows64.dll again but the changes aren't recognised by AppGameKit at all sometimes. In fact, occasionally it is telling me randomly that it cannot open the plugin, and I have to incriment the plug in name - I am now on landtest10 as the name. Once it gives the error, I am not able to go back to any name I have used before, and even quitting and restarting AppGameKit doesn't fix it. Dunno if I have some locked common files or something.

I've not tried restarting, and not sure if it's mainly after a code crash, but I am working a lot with memblocks right now, so errors are frequent. Lol.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th May 2020 17:53 Edited at: 10th May 2020 17:55
Sounds like you are doing exactly what you should be doing. Ive not had the issue myself and just recompile in VS2019 then hit run in AppGameKit to try a new version of any dll i create. Its always just worked. so its hard to say what you might be experiencing.

Might be worth whitelisting any virus check for your plugins folder - maybe temp turn any virus check anti malware off to see if it is scanning newly created dll's. Also ensure any auto backup (dropbox, google drive) isnt trying to access the location and blocking a delete.

Also just check that AppGameKit is copying the dll into the project folder

Other than that, im not sure what could be causing it??
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 10th May 2020 17:58
Hmmm...well I still use 2017 right off the bat.

I'll check into the virus checker, but it's not coming up that it's scanning, and it's not on my system disk. The really wierd part is that it's still running code AFTER I deleted the DLL copy that had it in it! It's literally like Windows isn't over writing the dll, but the dates and properties are changing as expected.

Very strange.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 12th May 2020 20:09 Edited at: 12th May 2020 20:09
Now up to interation 15 of my plugin.

Oddly, I've not changed it at all - even after a full system restart AppGameKit refuses point blank to find it - the screen shots attached clearly show it present. As soon as I search and replace my entire project to landtest15 and rename the folder....no issues.

To repeat, this is the EXACT same plugin that worked fine yesterday.

Attachments

Login to view attachments
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 12th May 2020 20:11
My concern is, that after it's a compiled program that this error is going to keep coming up.

AGK is not installed on my system drive - I wonder if that is the issue?
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 12th May 2020 20:12
Let me check your plugin.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 12th May 2020 20:26
I would, but it's not doing stand alone functions - I've moved functions from within my code tot he plugin, so without all the corresponding images, sprites and memblocks it will just crash out.

I am happy to upload it though.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 12th May 2020 22:06 Edited at: 12th May 2020 22:10
Quote: "Oddly, I've not changed it at all - even after a full system restart AppGameKit refuses point blank to find it - the screen shots attached clearly show it present. As soon as I search and replace my entire project to landtest15 and rename the folder....no issues."


I said this yesterday but I dont think it was understood.....You put the plugin in your compiler/plugins directory but when you compile or run your agk code, AppGameKit COPIES the dll from that location to your project directory (next to your media folder). The dll is loaded from that location when your program is run. You havent said where your project directory is.

You can delete the dll in your compiler/plugin folder even when the code is running as the dll it is actually using is in your project folder.

If you arent correctly deleting resources or ending threads etc in the DLL itself then windows considers the DLL file as in use. This can be possible even after your exe has finished if you are creating threads....and so wont allow AppGameKit to write over it with a new copy of the dll. It might be worth going into your project folder and deleting the plugin folder in there.

I use windows 10 and havent had this problem at all. I wouldnt be suprised if it was something to do with access rights I also haven't had any crashes that werent caused by coding error. It makes me think you have some potentially buggy c code which is attempting to do something which is causing problems with memory allocation or some other coding issues (invalid pointers, allocation errors etc...).

Have you tried the example plugin? Try compiling that a few times and copying to your agk directory so you can at least prove it isnt a problem with your c code. If it happens with the example plugin then it might be your VS setup. Also, are you running a debug version of the plugin or the release version. Have you tried the 32bit version?
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 13th May 2020 00:19
Bengismo.

I just had a look - I hadn't grasped that the plugin copied to the media folder, but I see that now. You may indeed have also found the issue - the original plugin (landtest14) was there, and the folder is stating that it is inaccessable. Oddly none of the others are there.

This opens up a new aspect though, as my code is in a OneDrive folder so that it automatically backs up. The folder was locked since windows starting, so it't not likely to be AppGameKit or the C code itself, but more likely something to do with my anti virus or OneDrive setup.

I'll have a play around tomorrow and see if I can perhaps move the project to another location and try it. I can't try the 32bit version, my base code exceeds the memory limits of that and fails.

Thanks for the input - I'll let you know what I find.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 13th May 2020 00:43
A common failure problem is just cloud storage synchronization. Since, due to synchronization, the files are busy.
I think you found the problem and the fault of this OneDrive.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 13th May 2020 00:47 Edited at: 13th May 2020 00:58
Yeah, Thats why I mentioned it 2 days ago. (in the thread above)

bengismo wrote: "Might be worth whitelisting any virus check for your plugins folder - maybe temporarily turn any virus check / anti malware off to see if it is scanning newly created dll's. Also ensure any auto backup (dropbox, google drive) isnt trying to access the location and blocking a delete.

Also just check that AppGameKit is copying the dll into the project folder"


It will be the autobackup locking the dll file every time agk compiles and runs.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 19th May 2020 12:02
Hi all.

As Bengismo said, OnDrive was the issue. All I had to do was exclude the plug in folder in my project directory from auto backups and the issue has vanished.

Thanks everyone, and especially Bengismo.....again!

Login to post a reply

Server time is: 2024-04-25 09:52:10
Your offset time is: 2024-04-25 09:52:10