Closed stubb closed 11 years ago
.
the fife_wrap.cc: [https://gist.github.com/2549175]
It's the same problem after i installed tinyxml via the packagemanagement and made a fresh checkout of the fife source.
After downgrading swig (2.0.5-1 => 2.0.4-3) the messages are gone but the problem isn't. The mouse is kind of stuttering extremely (one update in half a minute). But the ingame console tells me the client has ~60 fps.The fps value isn't properly updated too.
Not reproducable on another arch linux system but with an nvidia card instead of an ATI/AMD used by proprietary drivers.
Edit:
swig/python detected a memory leak of type 'FIFE::MouseEvent *',
Happens too, but the mouse works without problems.
The lag/slowdown happens only with the Opengl and OpenGLe renderer.
The lag/stuttering is sounding more and more like a driver specific problem.
this seems to be an ages-old error! could it be that newer versions of swig are just more accurate?
(svn blame yields last changes at the problematic pieces of code are from rev. 2324 = 2008-03-16 and rev. 1339 = 2007-07-08 )
when fixing the 3 destructors in engine/core/eventchannel/eventchannel.i it works like a charm and I don't get any swig problems (reference: http://stackoverflow.com/questions/918180/swig-python-memory-leak-detected) details
messages from running scons
engine/core/eventchannel/eventchannel.i:61: Warning 521: Illegal destructor name FIFE::~IEvent. Ignored.
engine/core/eventchannel/eventchannel.i:73: Warning 521: Illegal destructor name FIFE::~IInputEvent. Ignored.
engine/core/eventchannel/eventchannel.i:156: Warning 521: Illegal destructor name FIFE::~IMouseEvent. Ignored.
-> The destructors are mis-spelled:
53 class Event {
54 public:
55 virtual void consume();
56 virtual bool isConsumed() const;
57 virtual IEventSource* getSource();
58 virtual int32_t getTimeStamp() const;
59 virtual std::string getDebugString() const;
60 virtual const std::string& getName() const;
61 virtual ~IEvent() {}
..
66 class InputEvent: public Event {
67 public:
68 virtual bool isConsumedByWidgets() const;
69 virtual bool isAltPressed() const;
70 virtual bool isControlPressed() const;
71 virtual bool isMetaPressed() const;
72 virtual bool isShiftPressed() const;
73 virtual ~IInputEvent() {}
74 private:
75 InputEvent();
76 };
...
130 class MouseEvent: public InputEvent {
131 public:
132 enum MouseEventType {
133 UNKNOWN_EVENT = -1,
134 MOVED = 0,
135 PRESSED,
136 RELEASED,
137 WHEEL_MOVED_DOWN,
138 WHEEL_MOVED_UP,
139 CLICKED,
140 ENTERED,
141 EXITED,
142 DRAGGED
143 };
144
145 enum MouseButtonType {
146 EMPTY = 0,
147 LEFT = 1,
148 RIGHT = 2,
149 MIDDLE = 4,
150 UNKNOWN_BUTTON = 8
151 };
152 virtual int32_t getX() const;
153 virtual int32_t getY() const;
154 virtual MouseEventType getType() const;
155 virtual MouseButtonType getButton() const;
156 virtual ~IMouseEvent();
(In [3949]) Fixed some misspelled dtors in the eventchannel.i swig interface file. Thanks to enno4uh for spotting this. closes #699
With FIFE's trunk and Unknown Horizons master branch I got this memory leak information. The mouse is stuck and not usable, I have the same problem for the demo rio de hola.
I compiled successfully with scons ext && scons after cleaned up the old build files with scons -c and rm -rf .sconsign.dblite build/.sconf_temp .
Thats the build log:
The MouseEvent class in engine/python/fife
I attached fife_wrap.cc and and fife_wrap.h to this ticket.