Previous Thread  Next Thread

chat icon Windows Blender 2.25: PLUGINS fixed.

nikolatesla20

Posted: Thu Oct 17, 2002 6:04 pm
Joined: 13 Oct 2002
Posts: 25
Download the binary AGAIN.....*ugh* if you want to use Plugins.

I tracked the problem down to the error checking function. In windows, it simply does a GetLastError(). The problem is that in several places they call this function (PIL_dynlip_get_error_as_string()) to "clear" out errors before they do something.

NOTE TO SELF ! GetLastError() doesn't clear out the error just because you read it. If you had a prior error, and called this "get_error_as_string" and DID get an error, you respond to it, and then you CLEAR THE ERROR. To do this in Windows you call SetLastError().

I added calls to SetLastError() in this function where they should be, and now plugins work.

Now, I bet you are wondering, well, why did the plugins have an error in the first place? well, it's because there was an error somewhere else, in my version anyway, that I suspect was from the file selection code. It would say "there are no more files" . This is clearly a Windows Error, since they used GetLastError() to retrieve it. But it's not from the plugins, I debugged and the LoadLibrary on the plugins succeeds just fine. So, the routine to load a plugin works like this: It attempts to "clear" errors first (it calls the "get_error_blah" function), then it uses LoadLibrary to load the plugin DLL. After the LoadLibrary the routine to load a plugin checks to see if there are errors. Well, since errors are never cleared just by CHECKING FOR THEm, it finds one, even though its the wrong one, on exits the function.

Not any more.

-nt20
Reply with quote


gorgan_almighty

Posted: Thu Oct 17, 2002 6:36 pm
Joined: 16 Oct 2002
Posts: 51
Nice one! Wink
Reply with quote


G_Man

Posted: Fri Oct 18, 2002 8:35 am
Joined: 14 Oct 2002
Posts: 19
I love your work nicko !!! Where do you find all the time to do it??

I wish I had time to spare to do that.
Keep up the GREAT work.

~Geoffrey~
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group