Re: SFML Wrapper Error?

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

A little more help. I'm confused. It worked fine before I updated to Euphoria version 4.1.0 Beta 2.

I just had some time to sit down and test your code. I get the same error on 4.0 or 4.1 32-bit.

You're storing the values as integer, but sometimes you might not get back a value that fits into an integer type, which is only 31-bits on 32-bit platforms. I ran your code many times and once or twice I got an error that type check error. It seems this only occurs when the library loads into an area of memory that already exceeds the size of an integer.

One thing to keep in mind about Windows, is that it basically has a mind of its own when it comes to unloading DLLs from memory. It will hang onto them for some indeterminate period of time and then release them. So, if your application runs the first time and it works, it will keep working until some time goes by without the application having loaded the DLL. Then, you have a random chance of Windows loading the DLL into a larger-than-integer area of memory.

Regardless of the cause, the solution is simple: when accessing memory directly with peek/poke routines, always store your values as atom types.

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu