UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #1884 segfault when compiling a testcase
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Map Compiler (ufo2map)
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/1884 Item 1884] imported from sourceforge.net tracker on 2013-01-28 19:12:13

revision 20288. see the attached testcase. attempting to compile this (broken) map segfaults ufo2map. unfortunatelty, i was unable to obtain a backtrace.
===== Comments Ported from Sourceforge =====

====== richlv (2008-11-22 09:20:41) ======

testcase
====== blondandy (2008-11-22 09:31:40) ======

i will take a look in a few days. (can't use my linux machine ATM, but when i can see what valgrind has to say, i might be able to fix it).

though, if this is a compilation issue, i am not the best person.
====== blondandy (2009-01-14 21:15:22) ======

ParseBrush: texture name too long (limit 32): tex_material/c_blackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Could not find texture 'tex_material/c_blackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
==8110==
==8110== Process terminating with default action of signal 11 (SIGSEGV)
==8110== Bad permissions for mapped region at address 0x64CFFF
==8110== at 0x69D9AF5: memmove (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==8110== by 0x41CA6B: MoveBrushesToWorld (map.c:865)
==8110== by 0x41CFA0: ParseMapEntity (map.c:993)
==8110== by 0x41D6E0: LoadMapFile (map.c:1137)
==8110== by 0x403FC7: main (ufo2map.c:658)

not sure if the long tex name is causing that segfualt there.
====== blondandy (2009-01-14 22:08:10) ======

the map has no worldspawn.

the segfault disappears if the first func_group is changed to a worldspawn. I think various bits of the code assume that the first (index 0) entity is the worldspawn.

a simple fix would be to test for the first entity being worldspawn. this strikes me as a bit inelegant, though. a slightly unnecessary condition.
====== blondandy (2009-01-16 21:06:45) ======

r21849 | blondandy | 2009-01-16 21:03:30 +0000 (Fri, 16 Jan 2009) | 3 lines
Changed paths:
M /ufoai/trunk/src/tools/ufo2map/map.c

* Sys_Error if the zeroth entity is not worldspawn
* fixes 2325877 "segfault when compiling a testcase"

====== richlv (2009-01-25 20:43:24) ======

confirming fix in revision 22033 - it now prints :
"The first entity must be worldspawn, it is:func_group"
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif