Page 9 of 20

Posted: Sun Feb 20, 2005 5:37 pm
by Mr.Mouse
They are both global... One works, the other crashes. We should zoom in on each of the parameters that are used in TFindFileInfo (separate functions) to see which one screws up.

Posted: Mon Feb 21, 2005 3:22 am
by Rahly
I wonder though, if its doing the same thing that happening with mpGetFormatInfo

Posted: Tue Feb 22, 2005 9:39 am
by Mr.Mouse
Well, I just don't know what is different. I could not detect any. Yo uhave the VB code as well, you can see there's no difference in the way the records are addressed. I can install Delphi and take a look at your code, if you haven't got the time or anything, but it's still a mystery to me what is going wrong.

We must pinpoint the parameter that is causing this and more importantly: why.

Posted: Wed Feb 23, 2005 5:43 am
by Rahly
well, i could make a simple fix for the problem, but that makes plugin development a bit more complicated. Would you like me to try the fix, to see if it works for you?

Edit: Its really not a "fix" per say, but it fools VB, the only problem i have is that sometimes VB doesn't free the memory, so you could be left with memory leaks in those instances. I think it has something to do with strings in record structures.

What happens, is that VB calls the plugin, plugin points to memory of the string, plugin returns to vb and vb copies the string into another string, and then tries to free the string that was passed back to it, and it fails because its not in the "vb string" format.

Posted: Wed Feb 23, 2005 8:55 am
by Mr.Mouse
Well, we could try to work with the fixed version so, that new versions of MexCom and the PluginManager would be able to work with the "unfixed version" as well when we figure out how to overcome this problem. That way I can continue work on it and prepare a release version. We then have time to work in peace and quite on this problem, after the release. :)

Posted: Mon Mar 28, 2005 10:09 pm
by Rahly
Sorry it took so long, here try this

Posted: Tue Mar 29, 2005 1:01 pm
by Mr.Mouse
Thanks, I'll try to work on it when I have time. I just released the new version. So we have time to work on getting the manager in, in peace. ;)

Posted: Thu Apr 07, 2005 8:13 am
by Mr.Mouse
Well, hmm, this is an altered BF plugin? It doesn't help. The crash occurs when MexCom talks to the Manager. That is still the case. :(

Posted: Sat Apr 30, 2005 11:34 pm
by Rahly
yeah hmmm.. damn... it doesn't email me when you post... grrrr... and here i thought you were still working on it.

Edit: calling what function again? just to make sure

Posted: Thu May 12, 2005 8:35 am
by Mr.Mouse
Well, the function that should list the contents of an archive.

Posted: Fri May 13, 2005 6:09 am
by Rahly
Try this update, this should get ride of the crash. Let me know if this stops the crash, and if it does crash, is it the same spot? as it doesn't crash with the test app you sent me.

Posted: Fri May 13, 2005 6:50 am
by Rahly
Also, when you call mpIsFileAnArchive, it looks like your doing it

mpIsFileAnArchive(ByVal Index as Long, ByRef FileName as String): Boolean

is this the way your doing it?

Posted: Mon May 16, 2005 12:21 am
by Mr.Mouse
It didn't stop the crash. :(

It's not ID-ing the archive as a valid one, nor is it listing the filenames (it crashes there). How is it possible that the app did not crash when you tried it? Can you show me the result of my app?

Regarding the mpIsFileAnArchive, yes, I'm calling it like you said.

Posted: Mon May 16, 2005 7:01 pm
by Rahly
ok let me get a screenshot

try changing "ByRef Filename As String" to "ByVal Filename As String"

Posted: Mon May 16, 2005 7:04 pm
by Rahly
Here is the screenshot, no crash, only a popup that you send, and i think the problem for that is, that your passing the string by ref, which is sending it to the program as a Pointer to an OleVariant, i think you need to send by value, which will convert to a Pointer to a char array.


Note: this is NOT the compiled .NET version, i just overwrote that binary, with the compiled one you sent me.