Technical support > Mac

byteswap in 24147?

<< < (2/3) > >>

bayo:
Hello. I fix something near condition slots, but i dont think it fix your problem.

The first condition check is into base/ufos/ui/main.ufo

--- Code: ---if "*cvar:cl_showTipOfTheDay == 1" {
--- End code ---

then, you can add a break point in MN_CheckConditionand you should have:

condition->type == {IF_EQ, IF_VALUE_CVARNAME, IF_VALUE_FLOAT}
condition->leftValue == "cl_showTipOfTheDay"
*(float*) condition->rightValue == 1.0f


you also can test the condition adress. If you delete all files base/ufos/ui/*.ufo else base/ufos/ui/main.ufo

condition == &mn.menuConditions[0]


any info can be very helpful.

keybounce:
Alright, I have some information.

The triggering call is:

144   qboolean MN_CheckVisibility (menuNode_t *node)
145   {
146      if (!node->visibilityCondition)
147         return qtrue;
148      return MN_CheckCondition(node, node->visibilityCondition);
149   }

node->visibiloityCondition seems to be all wrong:

(gdb) p condition
$3 = (menuCondition_t *) 0x1605d603
(gdb) p *$
$4 = {
  type = {
    opCode = 1969827693,
    left = 1634299487,
    right = 1650917418
  },
  leftValue = 0x63766172 <Address 0x63766172 out of bounds>,
  rightValue = 0x20766572 ""
}
(gdb) #!Woot!

The full backtrace, and the full node dump:


Breakpoint 1, Sys_Error (error=0x1c3ba0 "Unknown condition for if statement: %i") at src/ports/unix/unix_main.c:85
85      fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
(gdb) bt
#0  Sys_Error (error=0x1c3ba0 "Unknown condition for if statement: %i") at src/ports/unix/unix_main.c:85
#1  0x000d8d70 in MN_CheckCondition (source=0x2c7a17c, condition=0x1605d603) at src/client/menu/m_condition.c:165
#2  0x000e07d4 in MN_CheckVisibility (node=0x2c7a17c) at src/client/menu/m_nodes.c:148
#3  0x000e0f70 in MN_GetNodeInTreeAtPosition (node=0x2c7a17c, rx=8, ry=130) at src/client/menu/m_nodes.c:322
#4  0x000e10e4 in MN_GetNodeInTreeAtPosition (node=0x2c79fdc, rx=8, ry=130) at src/client/menu/m_nodes.c:337
#5  0x000e13b8 in MN_GetNodeAtPosition (x=8, y=130) at src/client/menu/m_nodes.c:376
#6  0x000dd144 in MN_MouseMove (x=8, y=130) at src/client/menu/m_input.c:349
#7  0x000dd068 in MN_CheckMouseMove () at src/client/menu/m_input.c:327
#8  0x000db830 in MN_Draw () at src/client/menu/m_draw.c:278
#9  0x00043e60 in SCR_UpdateScreen () at src/client/cl_screen.c:495
#10 0x00037f38 in CL_Frame (now=68383, data=0x0) at src/client/cl_main.c:1065
#11 0x00125cb8 in tick_timer (now=68383, data=0x181065ac) at src/common/common.c:1039
#12 0x001260dc in Qcommon_Frame () at src/common/common.c:1120
#13 0x00199650 in main (argc=4, argv=0xbffff880) at src/ports/macosx/osx_main.m:142
Current language:  auto; currently c
(gdb) up
#1  0x000d8d70 in MN_CheckCondition (source=0x2c7a17c, condition=0x1605d603) at src/client/menu/m_condition.c:165
165      Sys_Error("Unknown condition for if statement: %i", condition->type.opCode);
(gdb) p source
$1 = (const menuNode_t *) 0x2c7a17c
(gdb) p *$
$2 = {
  name = "background", '\0' <repeats 53 times>,
  behaviour = 0x130abac,
  super = 0x0,
  firstChild = 0x0,
  lastChild = 0x0,
  next = 0x2c7a31c,
  parent = 0x2c79fdc,
  root = 0x2c79fdc,
  pos = {0, 0},
  size = {1024, 768},
  padding = 0,
  num = 0,
  textalign = 0 '\0',
  invis = qfalse,
  blend = qfalse,
  disabled = qfalse,
  invalidated = qfalse,
  ghost = qfalse,
  text = 0x0,
  font = 0x0,
  tooltip = 0x0,
  key = 0x0,
  icon = 0x0,
  excludeRect = 0x0,
  excludeRectNum = 0,
  visibilityCondition = 0x1605d603,
  image = 0x0,
  cvar = 0x0,
  state = qfalse,
  mousefx = 0,
  border = 0,
  bgcolor = {0, 0, 0, 0},
  bordercolor = {0, 0, 0, 0},
  timeOut = 0,
  timePushed = 0,
  color = {0, 0, 0, 0},
  selectedColor = {0, 0, 0, 0},
  onClick = 0x0,
  onRightClick = 0x0,
  onMiddleClick = 0x0,
  onWheel = 0x0,
  onMouseIn = 0x0,
  onMouseOut = 0x0,
  onWheelUp = 0x0,
  onWheelDown = 0x0,
  onChange = 0x0,
  extraData1 = 0,
  texh = {0, 0},
  texl = {0, 0},
  preventRatio = qfalse,
  longlines = 0 '\0',
  repeat = qfalse,
  clickDelay = 0,
  u = {
    abstractvalue = {
      min = 0x0,
      max = 0x0,
      value = 0x0,
      delta = 0x0,
      lastdiff = 0
    },
    abstractscrollbar = {
      pos = 0,
      viewsize = 0,
      fullsize = 0,
      lastdiff = 0,
      hideWhenUnused = qfalse
    },
    base = {
      baseid = 0
    },
    container = {
      container = 0x0,
      lastSelectedId = 0,
      onSelect = 0x0,
      filterEquipType = 0,
      columns = 0,
      displayWeapon = qfalse,
      displayAmmo = qfalse,
      displayUnavailableItem = qfalse,
      displayAmmoOfWeapon = qfalse,
      displayUnavailableAmmoOfWeapon = qfalse,
      displayAvailableOnTop = qfalse,
      scrollCur = 0,
      scrollNum = 0,
      scrollTotalNum = 0,
      onViewChange = 0x0
    },
    linechart = {
      dataId = 0,
      displayAxes = qfalse,
      axesColor = {0, 0, 0, 0}
    },
    model = {
      oldRefValue = 0x0,
      angles = {0, 0, 0},
      origin = {0, 0, 0},
      scale = {0, 0, 0},
      skin = 0x0,
      model = 0x0,
      tag = 0x0,
      animationState = 0x0,
      animation = 0x0,
      viewName = 0x0,
      next = 0x0,
      autoscale = qfalse,
      rotateWithMouse = qfalse,
      clipOverflow = qfalse
    },
    option = {
      dataId = 0,
      versionId = 0,
      first = 0x0,
      selected = 0x0,
      hovered = 0x0,
      count = 0,
      pos = 0,
      onViewChange = 0x0
    },
    textentry = {
      isPassword = qfalse,
      clickOutAbort = qfalse,
      onAbort = 0x0
    },
    text = {
      scrollbar = qfalse,
      textScroll = 0,
      textLines = 0,
      textLineSelected = 0,
      lineUnderMouse = 0,
      num = 0,
      rows = 0,
      onLinesChange = 0x0,
      lineHeight = 0,
      tabWidth = 0
    },
    window = {
      eventTime = 0,
      noticePos = {0, 0},
      dragButton = qfalse,
      closeButton = qfalse,
      preventTypingEscape = qfalse,
      modal = qfalse,
      dropdown = qfalse,
      isFullScreen = qfalse,
      fill = qfalse,
      starLayout = qfalse,
      parent = 0x0,
      renderNode = 0x0,
      eventNode = 0x0,
      onInit = 0x0,
      onClose = 0x0,
      onTimeOut = 0x0,
      onLeave = 0x0
    }
  }
}

bayo:
Thats strange

--- Code: --- visibilityCondition = 0x1605d603,
  image = 0x0,
--- End code ---

Maybe its a pic node, it should have an image, but not a visibility condition. Then maybe the setter dont aim very well and this condition is a char*, can you check the content of (char*)node->visibilityCondition ?

Can you add a break point into MN_RegisterAbstractNode and check the "properties" structure.

Then can you check offsets from a node (you can add a break point into MN_CheckVisibility), anddisplay adress of &node, &node->image, &node->visibiloityCondition.

Then if every thing is ok here, i need you again to check the parser.

keybounce:
The good news: Switching back by
svn up -r 24147

resulted in a compile that gave me a completely different failure -- the same failure that I was seeing on the latest build version.

Next is a make clean, and rebuild. I'm trying to figure out what it takes to make this "work" the way it did, and then maybe I'll know why the latest is having such horrible failure for me (won't even initialize), but seems to be working for others.

I'd hate to think that 2.2.1 will be the last PPC version of the game...

bayo:
If every time you compile a new version the bug is not the same, it can be a stack problem. It not mean diff with new revision can show you the bug.
This kind or problem is very hard to find.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version