#3925: crash: bad alloc with ShadowcastingShape
------------------------------+------------------------------------
 Reporter:  raycast           |             Owner:
     Type:  bug               |            Status:  new
 Priority:  normal            |         Milestone:  unspecified
Component:  Engine: Graphics  |           Version:  git/master
 Keywords:                    |  Operating System:  GNU/Linux 32bit
------------------------------+------------------------------------
 Even with --noshadows --fallback-mode in current master, I sometimes get
 the following crash:
 {{{
 #13 0x083ac758 in __gnu_cxx::new_allocator<ShadowcastingShape>::allocate (
     this=0x8fd2510, __n=8388608)
     at /usr/include/c++/4.7/ext/nShadowcastingShapeew_allocator.h:94
 No locals.
 #14 0x083aba1c in std::_Vector_base<ShadowcastingShape,
 std::allocator<ShadowcastingShape> >::_M_allocate (this=0x8fd2510,
 __n=8388608)
     at /usr/include/c++/4.7/bits/stl_vector.h:169
 No locals.
 #15 0x083aa89a in std::vector<ShadowcastingShape,
 std::allocator<ShadowcastingShape> >::_M_insert_aux (this=0x8fd2510,
 __position=..., __x=...)
     at /usr/include/c++/4.7/bits/vector.tcc:343
         __len = 8388608
         __elems_before = 4194304
         __new_start = 0x2
         __new_finish = 0x9e9c4c8
 #16 0x083a9973 in std::vector<ShadowcastingShape,
 std::allocator<ShadowcastingShape> >::push_back (this=0x8fd2510, __x=...)
     at /usr/include/c++/4.7/bits/stl_vector.h:893
 No locals.
 #17 0x083a84f5 in pie_Draw3DShape (shape=0xae20508, frame=0, team=4,
     colour=..., pieFlag=256, pieFlagData=0) at piedraw.cpp:528
         invmat = {0.602409661, 0, -0, -0, 0.461464316, 0.38723129, 0,
           -0.38723129, 0.461464316}
         pos_light0 = {1953.78162, -1479.28748, 6342.37598, 0}
         distance = 34479224
         scshape = {matrix = {1.65999997, 0, 0, 0, 0, 1.27161098,
 -1.06705451,
             0, 0, 1.06705451, 1.27161098, 0, 4159.95996, -762.206543,
             4073.45068, 1}, shape = 0xae20508, flag = 256, flag_data = 0,
           light = {x = 1176.97693, y = -3138.60474, z = 2353.95386}}
         tshape = {matrix = {1.65999997, 0, 0, 0, 0, 1.27161098,
 -1.06705451,
             0, 0, 1.06705451, 1.27161098, 0, 4159.95996, -762.206543,
             4073.45068, 1}, shape = 0xae20508, frame = 0, colour = {byte =
 {
               r = 200 '\310', g = 200 '\310', b = 200 '\310',
               a = 255 '\377'}, rgba = 4291348680,
             vector = "\310\310\310\377"}, teamcolour = {byte = {
               r = 155 '\233', g = 15 '\017', b = 15 '\017', a = 255
 '\377'},
             rgba = 4279177115, vector = "\233\017\017\377"}, flag = 256,
           flag_data = 0}
         teamcolour = {byte = {r = 155 '\233', g = 15 '\017', b = 15
 '\017',
             a = 255 '\377'}, rgba = 4279177115, vector =
 "\233\017\017\377"}
         __FUNCTION__ = "pie_Draw3DShape"
 #18 0x08165e2b in renderStructure (psStructure=0xc146fc8)
     at display3d.cpp:2261
         i = 1
         colour = 4
         frame = 35183
         bHitByElectronic = false
         structX = 9920
         pieFlagData = 0
         buildingBrightness = {byte = {r = 200 '\310', g = 200 '\310',
             b = 200 '\310', a = 255 '\377'}, rgba = 4291348680,
           vector = "\310\310\310\377"}
         psTile = 0xaf58ba10
         rotation = 0
         ecmFlag = 0
         dv = {x = 2506, y = 267, z = -414}
         defensive = true
         structY = 11200
         animFrame = 0
         pieFlag = 256
         strImd = 0xae20508
 #19 0x08163f10 in displayStaticObjects () at display3d.cpp:1479
         psStructure = 0xc146fc8
         list = 0xc146fc8
         player = 0
         psAnimObj = 0xc5e7b000
 #20 0x081630e9 in drawTiles (player=0x87714e8) at display3d.cpp:1037
         i = 33
         idx = 65
         j = 33
         jdx = 65
         theSun = {x = 1176.97693, y = -3138.60498, z = 2353.95386}
 #21 0x08162a66 in displayTerrain () at display3d.cpp:860
 }}}

 Somewhat surprising to see a crash in the shadow drawing code, when I've
 disabled drawing of shadows.

-- 
Ticket URL: <http://developer.wz2100.net/ticket/3925>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project

Reply via email to