[wingide-users] RE: Wing and DirectPython again
support at wingware.com
Mon Jan 18 09:50:08 MST 2010
Simon Pickles wrote:
> On 14/01/2010 11:08, Simon Pickles wrote:
>> >On 1/12/10 12:05 PM, Simon Pickles wrote:
>> >>/ A while back I wrote about strange problems with Wing and DirectPython.
>> />>/ DP is basically just calls into the C API, wrapping DirectX.
>> />>/ Wing has two major flaws with this situation. Breakpoints and
>> />>/ exceptions. Both cause Wing to hang if they occur after the DirectPython
>> />>/ DirectX device has been created (and the window, if that has any bearing).
>> />>/ It is like the app is waiting for the debugger which is waiting for the app... Any suggestions?
>> >There can be an issue with the floating point precision mode. Are you
>> >running with the mode set to single precision (24 bit)?
>> I think I was, yes.
>> I changed my code to create a DirectX device with the D3DCREATE_FPU_PRESERVE flag, as specified here:
> Actually, DirectPython uses DXUT framework to create its device and
> the source code reveals the D3DDevice is created with FPU_PRESERVE anyway:
> hr = pD3D->CreateDevice( pNewDeviceSettings->AdapterOrdinal,
> pNewDeviceSettings->BehaviorFlags | D3DCREATE_FPU_PRESERVE,
> &pNewDeviceSettings->pp, &pd3dDevice );
> Shame. Anything else I can try?
The only other thing I can think of is determining whether the calling
thread is running in the correct mode. All this does, or seems to do, is
to preserve the current mode. I don't know much about Direct X so don't
have other suggestions.
I think the bottom line is if you are running in single precision
floating-point mode, then it won't work. We may try to fix this in the
future, so the debugger does not depend on accurate floating-point values.
Interestingly I saw in the Python 2.6.4 documentation the following:
"""Python does not support single-precision floating point numbers; the
savings in processor and memory usage that are usually the reason for
using these is dwarfed by the overhead of using objects in Python, so
there is no reason to complicate the language with two kinds of floating
I am not sure how this might impact our ability to properly support this.
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users