Windows Blender 2.25: PLUGINS fixed.

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

nikolatesla20
Posts: 25
Joined: Sun Oct 13, 2002 7:41 pm

Windows Blender 2.25: PLUGINS fixed.

Postby nikolatesla20 » Thu Oct 17, 2002 7:04 pm

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

gorgan_almighty
Posts: 51
Joined: Wed Oct 16, 2002 12:26 pm
Location: Kent, UK

Postby gorgan_almighty » Thu Oct 17, 2002 7:36 pm

Nice one! :wink:

G_Man
Posts: 19
Joined: Mon Oct 14, 2002 6:10 am

Postby G_Man » Fri Oct 18, 2002 9:35 am

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~


Return to “News & Chat”

Who is online

Users browsing this forum: No registered users and 1 guest