Giter VIP home page Giter VIP logo

pybox2d-from-googlecode's People

Contributors

kne avatar

pybox2d-from-googlecode's Issues

64-Bit Linux Support

Unable to compile extension on 64-bit Linux/Python

Is this a limitation of the original Box2D API, or a problem with the Box2D
interface assuming only 32-bit Python?


What version of the product are you using? On what operating system?
2.0.2b1

Please provide any additional information below.

Output From 'setup.py build'

/usr/tmp/Box2D/Box2D-2.0.2b1/ 62$ python setup.py build
Using setuptools.
running build
running build_py
copying ./__init__.py -> build/lib.linux-x86_64-2.5/Box2D
copying ./Box2D.py -> build/lib.linux-x86_64-2.5/Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -O -includeall -ignoremissing -w201 -outdir . -o
Box2D/Box2D_wrap.cpp Box2D/Box2D.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fPIC -I/imd/tool/app/python/python_UC4-2.5.1/linux64/include/python2.5 -c
Box2D/Box2D_wrap.cpp -o build/temp.linux-x86_64-2.5/Box2D/Box2D_wrap.o -I.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Joint___hash__(b2Joint*)’:
Box2D/Box2D_wrap.cpp:3520: error: cast from ‘b2Joint*’ to ‘int32’ loses
precision
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Shape___hash__(b2Shape*)’:
Box2D/Box2D_wrap.cpp:4062: error: cast from ‘b2Shape*’ to ‘int32’ loses
precision
Box2D/Box2D_wrap.cpp: In function ‘int32 
b2Controller___hash__(b2Controller*)’:
Box2D/Box2D_wrap.cpp:4348: error: cast from ‘b2Controller*’ to ‘int32’
loses precision
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Body___hash__(b2Body*)’:
Box2D/Box2D_wrap.cpp:4418: error: cast from ‘b2Body*’ to ‘int32’ loses
precision
Box2D/Box2D_wrap.cpp: In function ‘PyObject*
_wrap_b2Vec2_add_vector(PyObject*, PyObject*)’:
Box2D/Box2D_wrap.cpp:5891: warning: format ‘%d’ expects type ‘int’, but
argument 3 has type ‘Py_ssize_t’
Box2D/Box2D_wrap.cpp: In function ‘PyObject*
_wrap_b2Vec2_sub_vector(PyObject*, PyObject*)’:
Box2D/Box2D_wrap.cpp:5942: warning: format ‘%d’ expects type ‘int’, but
argument 3 has type ‘Py_ssize_t’
Box2D/Box2D_wrap.cpp: In function ‘PyObject*
_wrap_new_b2Vec2__SWIG_2(PyObject*, int, PyObject**)’:
....
<etc>


Original issue reported on code.google.com by [email protected] on 15 Jun 2009 at 7:12

Assertions -> Exceptions?

With a few changes to the source code and the SWIG interface, it's possible
to take Box2D's assertions and make them into Python exceptions. The
question is, however, if we really want to do that.

Exceptions will likely slow the code down (Erin Catto cited this as the
main reason for not using them), and perhaps won't really help in all
cases. After the return from the assert, you might be left with a world
that can't be used anymore. The C++ code wasn't designed with this in mind.

In any case, I turn to all of you, the users, to see what you'd like
implemented.

No patch for now, but here's the changes you'd need to make:

(b2Settings.h)

#include <Python.h>

class b2AssertException {};

#define b2Assert(A) if (!(A)) { PyErr_SetString(PyExc_AssertionError, #A);
throw b2AssertException(); }

(Box2D.i)

    %include "exception.i"
    %exception {
        try {
            $action
        } catch(b2AssertException) {
            // error already set, pass it on to python
        }
    }

Original issue reported on code.google.com by [email protected] on 31 Oct 2008 at 10:33

Linux i386 binary support

Linux users should be able to build the sources on their own; however, an
i386 release that works on many platforms should be available as a quick
alternative.

Original issue reported on code.google.com by [email protected] on 6 May 2008 at 12:34

(2.1.0 svn) Tests fail with AssertionError on index

What steps will reproduce the problem?

1. Run the tests.
2.
3.


What is the expected output? What do you see instead?

Expected output:

Passing tests.

Actual output:

test_body, test_kwargs, and test_world all fail with the following output:

AssertionError: 0 <= index && index < m_count


What version of the product are you using? On what operating system?

pyBox2D 2.1b0 (Subversion rev. 255), Python 2.6.1, Mac OS X 10.6.2


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Feb 2010 at 7:51

Gish Tribute

A very fun little testbed example I made.
In the pygame backend there is something wrong with pausing and the
SpringForce (you can see it in the ElasticBody test too).

Original issue reported on code.google.com by [email protected] on 11 Mar 2009 at 7:52

Attachments:

Windws 7 Python x64 build fails / distutils

System setup:

Windows 7 x64
Python 2.6.4 x64
MSVC Express '08

$ python setup.py build
Setuptools not found; falling back on distutils.
running build
running build_py
copying .\Box2D.py -> build\lib.win-amd64-2.6\Box2D
copying .\__init__.py -> build\lib.win-amd64-2.6\Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
c:\swig\swig.exe -python -c++ -IBox2D -O -includeall -ignoremissing -w201
-outdi
r . -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Traceback (most recent call last):
  File "setup.py", line 109, in <module>
    setup( **setup_dict )
  File "c:\Python26\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "c:\Python26\lib\distutils\dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "c:\Python26\lib\distutils\command\build.py", line 134, in run
    self.run_command(cmd_name)
  File "c:\Python26\lib\distutils\cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "c:\Python26\lib\distutils\dist.py", line 995, in run_command
    cmd_obj.run()
  File "c:\Python26\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "c:\Python26\lib\distutils\command\build_ext.py", line 449, in
build_exte
nsions
    self.build_extension(ext)
  File "c:\Python26\lib\distutils\command\build_ext.py", line 499, in
build_exte
nsion
    depends=ext.depends)
  File "c:\Python26\lib\distutils\msvc9compiler.py", line 448, in compile
    self.initialize()
  File "c:\Python26\lib\distutils\msvc9compiler.py", line 358, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "c:\Python26\lib\distutils\msvc9compiler.py", line 274, in
query_vcvarsal
l
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']

Original issue reported on code.google.com by [email protected] on 31 Oct 2009 at 4:21

OS X Universal Binaries

OS X Binaries need to be created. 

For PPC-based Macs, apparently the current Source\Makefile works for
compiling the code, but the Python shared library needs some work.

For Intel-based Macs, the build-script I helped Andrew W. with should work,
though it is rather messy. I'd like to clean this up and have it build
universal binaries, or use the Makefile, whichever is easiest.

Original issue reported on code.google.com by [email protected] on 6 May 2008 at 12:20

installer fails to detect python on OS X 10.6.6

What steps will reproduce the problem?
1. download and run either of the pybox2d mac installers
2. click through to the drive selection page of the installer

What is the expected output? What do you see instead?
expected: click continue to install
instead: continue button is disabled. drive icon has a warning badge which when 
clicked explains that System Python 2.x cannot be found and thus installation 
cannot continue.

What version of the product are you using? On what operating system?
pybox2d 2.0.2b1 (py2.5 or py2.6)
Mac OSX 10.6.6

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 11 Mar 2011 at 12:24

Error during install: KeyError: '_Box2D' (Ubuntu Karmic 64bit; setuptools)

What steps will reproduce the problem?
1. run easy_install box2d

I get the following output which ends in an error:

Processing Box2D-2.0.2b1-py2.5-linux-i686.egg
Removing
/usr/local/lib/python2.6/dist-packages/Box2D-2.0.2b1-py2.5-linux-i686.egg
Copying Box2D-2.0.2b1-py2.5-linux-i686.egg to
/usr/local/lib/python2.6/dist-packages
Box2D 2.0.2b1 is already the active version in easy-install.pth

Installed
/usr/local/lib/python2.6/dist-packages/Box2D-2.0.2b1-py2.5-linux-i686.egg
Processing dependencies for Box2D==2.0.2b1
Searching for Box2D==2.0.2b1
Reading http://pypi.python.org/simple/Box2D/
Reading http://pybox2d.googlecode.com/
Reading http://code.google.com/p/pybox2d/downloads/list
Best match: Box2D 2.0.2b1
Downloading http://pybox2d.googlecode.com/files/Box2D-2.0.2b1.zip
Processing Box2D-2.0.2b1.zip
Running Box2D-2.0.2b1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-ROjLE6/Box2D-2.0.2b1/egg-dist-tmp-5i2MYq
Using setuptools.
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 1671, in main

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 1659, in with_ei_usage

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 1675, in <lambda>

  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 211, in run

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 427, in easy_install

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 478, in install_item

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 519, in process_distribution

  File "build/bdist.linux-i686/egg/pkg_resources.py", line 522, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 758, in best_match
    return self.obtain(req, installer) # try and download/install
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 770, in obtain
    return installer(requirement)
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 446, in easy_install

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 476, in install_item

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 655, in install_eggs

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 930, in build_and_install

  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
line 919, in run_setup

  File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 27, in
run_setup
  File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 63, in run
  File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 29, in <lambda>
  File "setup.py", line 109, in <module>
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/bdist_egg.py", line
174, in run
  File "build/bdist.linux-i686/egg/setuptools/command/bdist_egg.py", line
161, in call_command
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/install_lib.py", line
20, in run
  File "/usr/lib/python2.6/distutils/command/install_lib.py", line 113, in
build
    self.run_command('build_ext')
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/build_ext.py", line
46, in run
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 449, in
build_extensions
    self.build_extension(ext)
  File "build/bdist.linux-i686/egg/setuptools/command/build_ext.py", line
175, in build_extension
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 460, in
build_extension
    ext_path = self.get_ext_fullpath(ext.name)
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 633, in
get_ext_fullpath
    filename = self.get_ext_filename(modpath[-1])
  File "build/bdist.linux-i686/egg/setuptools/command/build_ext.py", line
85, in get_ext_filename
KeyError: '_Box2D'


Running this on Ubuntu Karmic 64bit

Original issue reported on code.google.com by [email protected] on 13 Sep 2009 at 7:22

Please add svn tags for the beta releases

Would it be possible to add svn tags for the versions that were released as 
beta? (Looks like 2.0.2b2 is r330).
Also if you cut any new alpha or beta releases... Thanks!

Original issue reported on code.google.com by [email protected] on 13 Jun 2012 at 8:32

pybox2d not installing in Python 2.7.3

I am using Windows 7 32-bit and using the SVN repository for the build.

I build using MINGW32 as described in the "Source Section". It build fines with 
gcc but when it gets to building with g++, i get the following :

c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: 
build\temp                                                                      
       .win32-2.7\Release\box2d\box2d_wrap.o: bad reloc address 0x48 in section 
`.data'
collect2.exe: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

Please tell me what can be the cause for this problem?? am i missing something??

Original issue reported on code.google.com by [email protected] on 16 Jan 2013 at 5:28

pybox2d 2.1 OS X issues

hi, i've tried compiling the alpha version you uploaded under osx. however i 
seem to be missing some files that are required to compile it (or i am 
understanding something wrong). as i'd like to do some tests with the 2.1.x 
version of box2d it would be awesome if you could update the repository.

thanks

Original issue reported on code.google.com by [email protected] on 11 Oct 2010 at 10:06

userData, reference counting, and destructors

Take this sample code, according to Hypnos on the Box2D forums (
http://www.box2d.org/forum/viewtopic.php?f=5&t=241&start=40 ):

{{{
import Box2D2 as box2d

worldAABB = box2d.b2AABB()
worldAABB.lowerBound.Set( -10, -10 )
worldAABB.upperBound.Set( 10, 10 )
gravity = box2d.b2Vec2(0.0, 0.0)
doSleep = True
world = box2d.b2World( worldAABB, gravity, doSleep)

class c:
  def __init__( self ):
    print "c.__init__"
    bodyDef = box2d.b2BodyDef()
    self.body = world.CreateBody( bodyDef )
    self.body.SetUserData( self )
    shapeDef = box2d.b2CircleDef()
    shapeDef.radius = 0.5
    shapeDef.density = 1.0
    self.shape = self.body.CreateShape( shapeDef )
    self.shape.SetUserData( self )

  def __del__( self ):
    print "c.__del__"

  def destroy( self ):
    print "c.destroy"
    self.body.SetUserData( None )
    self.shape.SetUserData( None )

a = c()

for i in xrange(100):
  world.Step( 0.1, 1 )
  world.Validate()

}}}

As the reference count for the instance of the 'c' class is increased twice
in its initialization routine, the destructor (__del__) of the class is
never called once it goes out of context.

Original issue reported on code.google.com by [email protected] on 19 Jul 2008 at 11:30

Fix installation on x64-based Linux

According to the user the.trav:

"installing from the source package gave me an error when it got to the g++
stage

g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-2.5/Box2D_wrap??.o -o Box2D2??.so
Gen/float/libbox2d.a /usr/bin/ld: Gen/float/libbox2d.a(b2Body.o):
relocation R_X86_64_32?? against `a local symbol' can not be used when
making a shared object; recompile with -fPIC Gen/float/libbox2d.a: could
not read symbols: Bad value collect2: ld returned 1 exit status error:
command 'g++' failed with exit status 1
"

Original issue reported on code.google.com by [email protected] on 18 Jun 2008 at 5:14

segmentation fault in test_CollisionProcessing.py (from testbed)

What steps will reproduce the problem?
1. Start test_CollisionProcessing.py (obviously)
2. press space (so a small circle will be spawned)
3. collide the big circle with the newly spawned one (so the small circle
would get destroyed)
4. press space a second time, and you get a segmentation fault

I used the testbed that came out with pybox2d ver. 2.0.2b1

It doesn't seem like an important bug, but i feel it should be taken care of.

Original issue reported on code.google.com by [email protected] on 1 May 2010 at 5:17

Reorganize the repository

A more pythonic repository will make it simple for new people to checkout
and install the library

the new format would be:

INSTALL     all the info on installing the library on linux/windows/osx
README      a simple description of the library and the project
LICENSE     the license
setup.py    the new setuptools based setup?
Box2d/      the old directory or maybe it could be box2d2 to be compliant
to PEP-8
testbed/    the now Python/testbed directory
contrib/    Should this directory stay? maybe we can move one level down to
be like trunk, branches, tag, wiki, contrib. Maybe also a README there to
explain each of the projects

Original issue reported on code.google.com by santagada on 29 Oct 2008 at 7:37

Create a Pythonic API

The pybox2d library should allow access to the standard box2d-style API. It
should also have a secondary Pythonic, easy to use interface.

Original issue reported on code.google.com by [email protected] on 15 Jul 2008 at 6:11

b2Color and b2Vec2 should have iterator methods

It would be usefull because with that we could pass them to functions that
are not aware of box2d (ie with *vec). Also converting to list or tuple
would be simpler.
A simple way in python to make the iterator method would be:

__iter__ = lambda self: iter((self.x, self.y))

tuple(vec) and list(vec) would work with this.

Original issue reported on code.google.com by [email protected] on 11 Mar 2009 at 11:42

Examples using pgu will crash with pygame 1.8.1

What steps will reproduce the problem?
1. install pygame 1.8.1
2. run demos.py , it will crash
3. Its a known compatibility problem with pgu - pygame 1.8.1

What is the expected output? What do you see instead?
crash

What version of the product are you using? On what operating system?
Box2D-2.0.1b4.win32-py2.4.exe - win XP + SP3

Please provide any additional information below.
Its a pgu incompatibility with pygame 1.8.1 . There is a pgu patch for 
this, plus aditional compatibility notes in a thread of pygame users:
http://thread.gmane.org/gmane.comp.python.pygame/15580


Original issue reported on code.google.com by [email protected] on 5 Sep 2008 at 1:07

The Mac os x python 2.5 installer refuses to install

What steps will reproduce the problem?
1. Run the installer
2. Select the install volume

What is the expected output?
It should let me continue. I have System Python 2.5.

What do you see instead?
"You cannot install Box2D 2.0.2b0 on this volume. Box2D requires System Python 
2.5 to install."

What version of the product are you using? On what operating system?
Box2D 2.0.2b0 on Mac os x 10.5.5.

Please provide any additional information below.
It worked when I installed from source.
Actually Pygame's installer have the same problem for me.


Original issue reported on code.google.com by [email protected] on 24 Dec 2008 at 5:25

pyglet/test_main.py raising an exception when a test is closed. Also a set_fps_limit() is not needed anymore

Every time I closed a test on the ported to pyglet testbed an exception was
raised, on Mac OS X at least. The traceback is displayed bellow and the
problem I think was a race condition between the closing of the window and
the drawing of the last frame (which I think is strange).

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-traceback-*-*-*-*-*-*-*-*-*-*-*-*-
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-traceback-*-*-*-*-*-*-*-*-*-*-*-*-

Apfelstrudel:pyglet santagada$ python test_Car.py 
----------------------------------
Loading Car...
Traceback (most recent call last):
  File "test_Car.py", line 190, in <module>
    main(Car)
  File
"/Users/santagada/projects/pybox2d/Python/testbed/pyglet/test_main.py",
line 971, in main
    test.run()
  File
"/Users/santagada/projects/pybox2d/Python/testbed/pyglet/test_main.py",
line 631, in run
    pyglet.app.run()
  File "/Library/Python/2.5/site-packages/pyglet/app/__init__.py", line
264, in run
    EventLoop().run()
  File "/Library/Python/2.5/site-packages/pyglet/app/carbon.py", line 84,
in run
    self._timer_proc(timer, None, False)
  File "/Library/Python/2.5/site-packages/pyglet/app/carbon.py", line 133,
in _timer_proc
    sleep_time = self.idle()
  File "/Library/Python/2.5/site-packages/pyglet/app/__init__.py", line
187, in idle
    dt = clock.tick(True)
  File "/Library/Python/2.5/site-packages/pyglet/clock.py", line 696, in tick
    return _default.tick(poll)
  File "/Library/Python/2.5/site-packages/pyglet/clock.py", line 303, in tick
    item.func(ts - item.last_ts, *item.args, **item.kwargs)
  File
"/Users/santagada/projects/pybox2d/Python/testbed/pyglet/test_main.py",
line 836, in SimulationLoop
    self.debugDraw.batch.draw()
  File "/Library/Python/2.5/site-packages/pyglet/graphics/__init__.py",
line 538, in draw
    func()
  File
"/Users/santagada/projects/pybox2d/Python/testbed/pyglet/test_main.py",
line 176, in set_state
    gl.gluOrtho2D(0, self.window.width, 0, self.window.height)
  File "/Library/Python/2.5/site-packages/pyglet/gl/lib.py", line 105, in
errcheck
    raise GLException(msg)
pyglet.gl.lib.GLException: invalid value

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-traceback-*-*-*-*-*-*-*-*-*-*-*-*-
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-traceback-*-*-*-*-*-*-*-*-*-*-*-*-


If I print the values of self.window.width and self.window.height they are
both 0.



Also from
http://www.pyglet.org/doc/programming_guide/new_features_replacing_standard_prac
tice.html#application-event-loop
:

"Usually applications can update at a less frequent interval. For example,
a game that is designed to run at 60Hz can use clock.schedule_interval:

def update(dt):
    pass
clock.schedule_interval(update, 1/60.0)

This also removes the need for clock.set_fps_limit."

here is my patch:

===================================================================
--- test_main.py    (revision 105)
+++ test_main.py    (working copy)
@@ -502,6 +502,13 @@
         self.world.SetContactListener(self.contactListener)
         self.world.SetDebugDraw(self.debugDraw)

+    def on_close(self):
+        """
+        Callback: user tried to close the window
+        """
+        pyglet.clock.unschedule(self.SimulationLoop)
+        super(Framework, self).on_close()
+
     def on_show(self):
         """
         Callback: the window was shown.
@@ -627,7 +634,6 @@
         """
         if self.settings.hz > 0.0:
             pyglet.clock.schedule_interval(self.SimulationLoop, 1.0 /
self.settings.hz)
-            pyglet.clock.set_fps_limit(1.0 / self.settings.hz)
         pyglet.app.run()

     def SetTextLine(self, line):


Original issue reported on code.google.com by santagada on 26 Oct 2008 at 1:40

OSX: cannot import box2d after installation

I'm using OSX10.6, with system python (2.6). 

It appears as if I've been able to successfully compile pybox2d. The 
build/install process finished with the encouraging message:

Installed
/Library/Python/2.6/site-packages/Box2D-2.0.2b2-py2.6-macosx-10.6-universal.egg
Processing dependencies for Box2D==2.0.2b2
Finished processing dependencies for Box2D==2.0.2b2


However -- when I try to "import Box2D2" from the python prompt, I'm told the 
module does not exist.

I can confirm that an egg file has been created in my Python's packages 
directory:
/Library/Python/2.6/site-packages/Box2D-2.0.2b2-py2.6-macosx-10.6-universal.egg

I'm not sure what's gone wrong here.


Original issue reported on code.google.com by [email protected] on 25 Jun 2011 at 6:06

build fails on 64bit linux

This is because of the changes in r165 that casts pointers to int32.
I made a simple fix for it. I am not sure if it is crossplatform the way I
fixed it.

Original issue reported on code.google.com by [email protected] on 5 Mar 2009 at 9:02

Attachments:

pybox2d and py2exe

What steps will reproduce the problem?
1. Attempt to build an executable with py2exe, have the program use 
pybox2d.

What is the expected output? What do you see instead?

Error-
Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "util.pyo", line 1, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "Box2D\__init__.pyo", line 23, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "Box2D\Box2D.pyo", line 44, in <module>
  File "Box2D\Box2D.pyo", line 39, in swig_import_helper
ImportError: No module named _Box2D


What version of the product are you using? On what operating system?
2.0.21b, with Python 2.6 (x86)

Original issue reported on code.google.com by [email protected] on 19 Jan 2010 at 10:54

Fails to build with error: missing binary operator before token "0"

What steps will reproduce the problem?
1.python setup.py build on a Fedora 14 (64 bits system)

What is the expected output? What do you see instead?
Fails to build with the following error:
./Box2D/Collision/b2DynamicTree.h:289:26: error: missing binary operator before 
token "0"

Please provide any additional information below.

Edited ./Box2D/Collision/b2DynamicTree.h:289, replaced
#elif B2_USE_BRUTE_FORCE 0
with
#elif B2_USE_BRUTE_FORCE == 0

And it built successfully.

Original issue reported on code.google.com by [email protected] on 30 Mar 2011 at 12:49

Box2D imports fine, nothing else does

I tried to run every one of the examples from the testbed (after compiling 
pybox2d myself), and none of them worked because Box2D had no child 
objects.

For  example, test_Car.py:
Traceback (most recent call last):
  File "test_Car.py", line 22, in <module>
    from test_main import *
  File "/home/linus/pybox2d-read-only/testbed/test_main.py", line 31, in 
<module>
    exec("from %s_main import *" % fwSettings.backend)
  File "<string>", line 1, in <module>
  File "/home/linus/pybox2d-read-only/testbed/pygame_main.py", line 57, in 
<module>
    class fwDestructionListener(box2d.b2DestructionListener):
AttributeError: 'module' object has no attribute 'b2DestructionListener'


Here's why:

>>> import Box2D
>>> dir(Box2D)
['__builtins__', '__doc__', '__file__', '__loader__', '__name__', 
'__package__', '__path__', '__version__', '__version_info__']

I'm using the latest SVN version (currently 258) on ubuntu 9.10 (Karmic).

Original issue reported on code.google.com by [email protected] on 1 Apr 2010 at 4:37

gtk/cairo backend for the testbed.

I made a cairo backend for the framework. It's very basic in functionality
but it's antialiased and shiny... :D
I don't know if I am going to work any more on it but I though I'd post it
here in case anyone else wants it or you want to include it.
You can basicaly just pan and zoom.

Original issue reported on code.google.com by [email protected] on 10 Mar 2009 at 4:27

Attachments:

Python 2.7 compatability

What steps will reproduce the problem?
1. Run any of the testbed examples.

What is the expected output? What do you see instead?
Some type of ImportError

What version of the product are you using? On what operating system?
2.1 Alpha Test on Windows XP 32bit


Original issue reported on code.google.com by [email protected] on 22 Oct 2010 at 9:24

Line joints are not cast properly

What steps will reproduce the problem?
1. Create a joint definition (jointDef) by using b2LineJointDef()
2. Create a joint (lineJoint) by using world.CreateJoint(jointDef)
3. If you try to get the joint object by using lineJoint.asLineJoint()
it fails.

What is the expected output? What do you see instead?

Expect to get a joint object.  Get an error message.

AttributeError: 'b2Joint' object has no attribute 'asLineJoint'


What version of the product are you using? On what operating system?
Python 2.5 on Windows


Please provide any additional information below.

In Box2D2.py line no 688 (in class b2JointDef) types dictionary is missing
e_lineJoint

Similarly line no 761 (in class b2Joint) types dictionary is missing
e_lineJoint as well.



Original issue reported on code.google.com by [email protected] on 21 Sep 2009 at 2:51

How to pan/zoom the pygame backend?

My test application uses cartesian coordinates from -5000,-5000 to 5000,5000. 
When objects are created I don't see them in the pygame window. This is using 
the default rendering backend in pybox2d. I was wondering if there is support 
in the rendering backend for zoom/pan so I can view the objects outside of the 
current viewport? Thanks

Original issue reported on code.google.com by [email protected] on 9 May 2011 at 1:13

cannot build on os x

What steps will reproduce the problem?
1. download svn
2. attempt to build

Did you check the issue list? pybox2d 2.0.2b1 is old, and some issues are
marked fixed (as in the SVN), but they have not been released yet.
yes

What is the expected output? What do you see instead?
lipo: can't figure out the architecture type of: /var/tmp//ccbzGtkX.out


What version of pybox2d are you using? On what operating system? 32-bit or
64-bit?
64

Please provide any additional information below.
cannot compile from svn.

i have a game written with pybox2d 2.02b2.  most people cannot get it compile 
under any circumstances.  on my system, i was able to get it to work after 
upgrading swig.  one user has the following error:

tried svn as well, will not build.

swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -O -small -includeall -ignoremissing -w201 -outdir . 
-o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Box2D_printing.i:29: Error: Syntax error in input(3).

Original issue reported on code.google.com by [email protected] on 12 Apr 2011 at 12:04

64-bit build fails on 2.0.2b1 source release (zip or easy_install)

What steps will reproduce the problem?
1. try to install pybox2d with: easy_install box2d

What is the expected output? What do you see instead?
expected: builds and installs pybox2d
instead:
build failure. see attached log, but here is a suspicious excerpt:
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Joint___hash__(b2Joint*)’:
Box2D/Box2D_wrap.cpp:3528: error: cast from ‘b2Joint*’ to ‘int32’ loses 
precision
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Shape___hash__(b2Shape*)’:
Box2D/Box2D_wrap.cpp:4070: error: cast from ‘b2Shape*’ to ‘int32’ loses 
precision
Box2D/Box2D_wrap.cpp: In function ‘int32 
b2Controller___hash__(b2Controller*)’:
Box2D/Box2D_wrap.cpp:4356: error: cast from ‘b2Controller*’ to ‘int32’ 
loses precision
Box2D/Box2D_wrap.cpp: In function ‘int32 b2Body___hash__(b2Body*)’:
Box2D/Box2D_wrap.cpp:4426: error: cast from ‘b2Body*’ to ‘int32’ loses 
precision

What version of the product are you using? On what operating system?
Box2D 2.0.2b1
Mac OS X 10.6.6

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 11 Mar 2011 at 1:07

Attachments:

build-essential misspelled in INSTALL file

In the INSTALL file, at the Linux instructions, the build-essential package
is misspelled, and the apt-get command cries because of this, it doesn't work.

Using the current revision, 206, at Ubuntu 9.04 .

The attached patch should correct it.

Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 1:20

Attachments:

Error building in OS X / SWIG syntax error

Running 'python setup.py build' on my system, I receive the error:
~~
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals 
b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o 
Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Box2D_dir.i:49: Error: Syntax error in input(1).
error: command 'swig' failed with exit status 1
~~

I'm running the current SVN checkout on the most recent version of OSX.

This could be related to http://code.google.com/p/pybox2d/issues/detail?id=40

Original issue reported on code.google.com by [email protected] on 22 Jun 2011 at 2:12

Error in pygame_main.py

1.Don't work testbet
2. Error in pygame_main.py

pybox2d 2.0.2b2
Ubuntu 11.04 64X

In pygame_main.py, line 273.

Replace:

return ((pt[0] * self.viewZoom) - self.viewOffset.x, self.height - ((pt[1] * 
self.viewZoom) - self.viewOffset.y))

on

return (int((pt[0] * self.viewZoom) - self.viewOffset.x), int(self.height - 
((pt[1] * self.viewZoom) - self.viewOffset.y)))

Original issue reported on code.google.com by [email protected] on 16 Aug 2011 at 1:10

Attachments:

b2Body.CreateCircleFixture() returns None

What steps will reproduce the problem?
1. Call CreateCircleFixture(...) on a b2Body instance
2.
3.

What is the expected output? What do you see instead?

Should return the newly created fixture object. Returns None.

What version of the product are you using? On what operating system?

revision 274 of branches/box2d_2.1

Please provide any additional information below.

See patch (attached).

Original issue reported on code.google.com by [email protected] on 6 Oct 2010 at 8:50

Attachments:

pybox2d fails to build on snow-leopard with swig error

What steps will reproduce the problem?
1. follow the steps on the INSTALL file for mac osx

What is the expected output? What do you see instead?

running build
running build_py
copying ./__init__.py -> build/lib.macosx-10.6-i386-2.6/Box2D
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -O -includeall -ignoremissing -w201 -outdir . -o
Box2D/Box2D_wrap.cpp Box2D/Box2D.i
Box2D/Box2D_printing.i:29: Error: Syntax error in input(3).
error: command 'swig' failed with exit status 1


What version of the product are you using? On what operating system?
mac os 10.6 snow leopard, pybox2d-2.0.2b1, swig 1.3.40

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 8:05

Problem with pyBox2d and Python 2.7.2

I installed pyBox2D on Windows7 and Python 2.7.2 and when I run demos.py (in 
testbed) I get the error :

Traceback (most recent call last):
  File "C:\Users\...\testbed\demos.py", line 29, in <module>
    from test_main import fwDebugDraw
  File "C:\Users\...\testbed\test_main.py", line 32, in <module>
    exec("from %s_main import *" % fwSettings.backend)
  File "<string>", line 1, in <module>
  File "C:\Users\Pascal\Desktop\pyBox2d\testbed\pygame_main.py", line 78, in <module>
    class fwBoundaryListener(box2d.b2BoundaryListener):
AttributeError: 'module' object has no attribute 'b2BoundaryListener'

I do not know what this mean.
How can I use pyBox2D and testbed with my configuration ?
Thank you.

Pascal Grandeau

Original issue reported on code.google.com by [email protected] on 20 Mar 2012 at 7:37

accessing fixture.aABB raises an exception

What steps will reproduce the problem?
1. fixture.aABB
2.
3.

What is the expected output? What do you see instead?

>>> fixture.aABB
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.6/site-packages/Box2D-2.1b0-py2.6-macosx-10.6-universal.egg/Box2D/Box2D.py", line 3227, in __GetAABB
    return _Box2D.b2Fixture___GetAABB(self, *args, **kwargs)
TypeError: Required argument 'childIndex' (pos 2) not found

What version of the product are you using? On what operating system?

branches/box2d_2.1, revision 275

Please provide any additional information below.

C++ signature:

const b2AABB& b2Fixture::GetAABB(int32 childIndex) const

So, this C++ member function needs to be wrapped as a Python method, not a 
property.

Original issue reported on code.google.com by [email protected] on 17 Oct 2010 at 12:44

Contact listener refcount not increased with SetContactListener


See the bottom for the punchline first.  Everything in the middle is just
context fyi:

What steps will reproduce the problem?

1. world.SetContactListener(b2ContactListener())
2. run a simulation that causes a contact

What is the expected output? What do you see instead?

gdb of python catches a segfault as follows:

(gdb) where
#0  0xb756518f in b2PolyAndCircleContact::Evaluate (this=0x836b574,
listener=0x832fe58) at Box2D/Dynamics/Contacts/b2PolyAndCircleContact.cpp:122
#1  0xb7564cf4 in b2Contact::Update (this=0x836b574, listener=0x832fe58) at
Box2D/Dynamics/Contacts/b2Contact.cpp:153
#2  0xb755ec01 in b2World::SolveTOI (this=0x8313db8, step=@0xbfdb42ac) at
Box2D/Dynamics/b2World.cpp:651
#3  0xb755f18b in b2World::Step (this=0x8313db8, dt=0.0166666675,
velocityIterations=20, positionIterations=16) at Box2D/Dynamics/b2World.cpp:878
#4  0xb75500a2 in _wrap_b2World_Step (args=0xb7db5a54) at
Box2D/Box2D_wrap.cpp:27850
#5  0xb54765c8 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) list
117                 b2Vec2 v2 = b2->GetLinearVelocityFromLocalPoint(mp->localPoint2);
118                 cp.velocity = v2 - v1;
119                 cp.normal = m_manifold.normal;
120                 cp.separation = mp->separation;
121                 cp.id = id;
122                 listener->Add(&cp);
123             }
124         }
125 
126         m_manifoldCount = 1;
(gdb) print listener->Add
$5 = {void (b2ContactListener *, const b2ContactPoint *)} 0xb7559b20
<b2ContactListener::Add(b2ContactPoint const*)>
(gdb) print listener
$6 = (b2ContactListener *) 0x832fe58
(gdb) print *listener
$7 = {_vptr.b2ContactListener = 0x1}
(gdb) print *0x832fe58
$8 = 1


What version of the product are you using? On what operating system?

Ubuntu Hardy, version 2.0.2b1

Please provide any additional information below.

No other problems.  The simulation runs fine until what I assume is the
first contact, and then dies as above.  If I never call SetContactListener,
the sim runs fine indefinitely.  I have tried with my own class (subclass
of b2ContactListener) and just passing in a naked b2ContactListener as above.

Ok -- I just figured out what the problem is:

SetContactListener does not increment the reference count to the passed
object, so if you don't store it, it gets GC'd and causes a segfault.  Easy
to fix, I assume?

Original issue reported on code.google.com by [email protected] on 14 Sep 2009 at 1:56

Slow performance (of pyglet backend?)

I ran the Box2d Testbed Car and it worked as expected. With pybox2d i get 
meager 7 fps. Is that normal? Or maybe some settings need to be tweaked?
On a faster machine i got 15fps with pybox2d.
Both times i tried pybox2d i used pyglet.

Original issue reported on code.google.com by [email protected] on 14 Mar 2013 at 7:48

Fails to build due to missing encoding on setup.py

What steps will reproduce the problem?
1. Trying to install the library from svn, using the Portugues locale
2. Dduring python setup.py install, the following error is shown:
SyntaxError: Non-ASCII character '\xc3' in file setup.py on line 20, but no 
encoding declared; see http://www.python.org/peps/pep-0263.html for details

What version of pybox2d are you using? On what operating system? 
64-bit, Fedora


Please provide any additional information below.
Adding the # -*- coding: utf-8 -*- line to setup.py resolves the problem.



Original issue reported on code.google.com by [email protected] on 29 Mar 2011 at 8:02

most demos don't work, small bug

Seems like self.world.Step() takes one more argument. I had to change
elements.py in function update() to make it working:

if self.run_physics:
  self.world.Step(1.0 / fps, iterations, iterations); # added 3rd argument

Original issue reported on code.google.com by [email protected] on 26 Nov 2008 at 5:43

Error on test_BoxCutter, trying to create an invalid shape (typo)

Index: test_BoxCutter.py
===================================================================
--- test_BoxCutter.py   (revision 105)
+++ test_BoxCutter.py   (working copy)
@@ -178,7 +178,7 @@
         # Make sure the shapes are valid before creation
         try:
             for n in range(2):
-                box2d.b2PythonCheckPolygonDef(newPolygon[0])
+                box2d.b2PythonCheckPolygonDef(newPolygon[n])
         except ValueError, s:
             print "Created bad shape:", s
             return False


ps: Should I attach the patch as a file or inline is ok?

Original issue reported on code.google.com by santagada on 26 Oct 2008 at 1:28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.