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 #58 R_EnableLights() uses uninitialised variable
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
    General
  • 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/58 Item 58] imported from sourceforge.net tracker on 2013-01-28 18:08:35

Run the credits, and when the ship flies by the
following valgrind memcheck error occurs:

==20025==
==20025== Use of uninitialised value of size 4
==20025== at 0x1C0CF81B: R_EnableLights (gl_mesh.c:426)
==20025== by 0x1C0CFE1A: R_DrawAliasModel
(gl_mesh.c:555)
==20025== by 0x1C0D662D: R_DrawEntitiesOnList
(gl_rmain.c:570)
==20025== by 0x1C0D7F2D: R_RenderView (gl_rmain.c:1085)
==20025== by 0x1C0D824C: R_RenderFrame (gl_rmain.c:1221)
==20025== by 0x4BD63: V_RenderView (cl_view.c:734)
==20025== by 0x420F1: SCR_UpdateScreen (cl_scrn.c:958)
==20025== by 0x31D8C: CL_Frame (cl_main.c:1829)
==20025== by 0x60C8C: Qcommon_Frame (common.c:1480)
==20025== by 0x76D19: main (sys_linux.c:396)

Looks like lightparam isn't being initialised anywhere
up the call tree.


===== Comments Ported from Sourceforge =====

====== bandobraz (2006-09-01 01:45:55) ======

Logged In: YES
user_id=1557623

One more of this kind:

Conditional jump or move depends on uninitialised value(s)
==26174== at 0x080685f9: CL_CameraMoveRemote (cl_input.c:920)
==26174== by 0x08068b2f: CL_CameraMove (cl_input.c:1013)
==26174== by 0x0806e7dd: CL_Frame (cl_main.c:1564)
==26174== by 0x08096239: Qcommon_Frame (common.c:1540)
==26174== by 0x080ace5c: main (sys_linux.c:421)

====== cassiterite (2006-09-02 16:11:11) ======

Logged In: YES
user_id=1171370

lightparam is a field in the "entity_t" type. According to
client/ref.h:
float *lightparam; /* fraction lit by the sun */

I suspect that in the credit screen no light-source is
defined so lightparam never gets set...

Grepping through the code it appears to me lightparam is
only set by functions that handle light-source related
calculations.
====== tlh2000 (2007-09-26 06:39:55) ======

Logged In: YES
user_id=116930
Originator: NO

this bug should be fixed already - at least valgrind doesn't report it anymore when the ufo flies by
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