Ticket #500 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Map editor crashes with OpenGL renderer if too many instances per layer

Reported by: mvbarracuda Owned by: FIFE
Priority: normal Milestone: 0.3.3
Component: tools/editor Version: trunk
Severity: normal Keywords: editor, opengl, instances per layer
Cc: Blocked By:
Blocking: Time planned:
Time remaining: Time spent:

Description (last modified by mvbarracuda) (diff)

FIFE version

FIFE SVN r3501

Platform and OS

Win32, Python 2.7. This bug has been confirmed on an x64 Linux system as well. The attached gdb backtrace was created on that Linux system.

How to reproduce

  • Make sure that the editor uses the OpenGL rendering backend; it won't crash in combination with the SDL renderer
  • Start the map editor
  • Open demos/rio_de_hola/maps/tourist_beach_test.xml
  • Select the "tile layer" layer in the layer tool
  • Select a tile of your choice, e.g. a water tile with the pipette tool
  • Place the tile on the tile layer in a place where there is no tile placed yet

Expected result

The tile should be added to the layer.

Actual result

Python will crash.

Notes

This issue seems to be related to the total number of instances on a specific layer. If you already have 8192 instances on a layer and try to add another one, Python will crash.

If you simply add one additional instance to the "tile layer" layer by editing the map xml file by hand (so there are 8193 instances on the tile layer now) and load it into the editor afterwards, the map will load just fine. You can now even add and remove tiles just fine without crashing the Python interpreter.

Backtrace attached.

Attachments

editor_crash_backtrace.txt Download (10.5 KB) - added by mvbarracuda 4 years ago.
Editor gdb backtrace kindly provided by technomage

Change History

Changed 4 years ago by mvbarracuda

Editor gdb backtrace kindly provided by technomage

comment:1 Changed 4 years ago by mvbarracuda

  • Description modified (diff)

comment:2 Changed 4 years ago by mvbarracuda

  • Description modified (diff)

comment:3 Changed 4 years ago by mvbarracuda

  • Description modified (diff)

comment:4 Changed 4 years ago by mvbarracuda

  • Description modified (diff)

comment:5 Changed 4 years ago by mvbarracuda

  • Description modified (diff)

comment:6 Changed 4 years ago by helios2000

  • Status changed from new to closed
  • Resolution set to fixed

(In [3505]) * Fixed the Map editor crashes. The problem was a not cleaned RenderList? in testRenderedViewPort(). This fixes also the same problem for the getMatchingInstances() functions. closes #500

Note: See TracTickets for help on using tickets.