Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: invalid virtual table when -Og option is used #158

Closed
ruffinakoza opened this issue May 28, 2020 · 2 comments
Closed

Crash: invalid virtual table when -Og option is used #158

ruffinakoza opened this issue May 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@ruffinakoza
Copy link
Member

#0  0x00007f9057ab36e3 in UndefinedOneHit::damEffectSlice (
    this=this@entry=0x7ffc2aa42e3e)
    at ../../../dreamland_code/plug-ins/fight/onehit_undef.cpp:1355
#1  0x00007f9057ab45a9 in UndefinedOneHit::postDamageEffects (
    this=0x7ffc2aa42e3e)
    at ../../../dreamland_code/plug-ins/fight/onehit_undef.cpp:173
#2  0x00007f9057aaba9e in OneHit::hit (this=0x7ffc2aa52e40)
    at ../../../dreamland_code/plug-ins/fight/onehit.cpp:78
#3  0x00007f9057a8eaa0 in one_hit_nocatch (ch=<optimized out>, 
    victim=victim@entry=0x7f90440025f0, secondary=secondary@entry=false)
    at ../../../dreamland_code/plug-ins/fight/fight.cpp:339
#4  0x00007f9057a8efd6 in one_hit (ch=<optimized out>, 
    victim=victim@entry=0x7f90440025f0, secondary=secondary@entry=false)
    at ../../../dreamland_code/plug-ins/fight/fight.cpp:345

*this at frame 0:

$2 = {
  <WeaponOneHit> = {
    <OneHit> = {
      <Damage> = <invalid address>, 
      members of OneHit: 
      _vptr.OneHit = 0x0, 
      skill = 0, 
      thac0 = 0, 
      victim_ac = 0, 
      orig_dam = 0
    }, 
    members of WeaponOneHit: 
    wield = 0x0, 
    secondary = false, 
    weapon_sn = 0, 
    weaponSkill = 0x0, 
    attack = 0
  }, <No data fields>}
(gdb) 

*this at frame 1:

3 = {
  <WeaponOneHit> = {
    <OneHit> = {
      <Damage> = <invalid address>, 
      members of OneHit: 
      _vptr.OneHit = 0x0, 
      skill = 0, 
      thac0 = 0, 
      victim_ac = 0, 
      orig_dam = 0
    }, 
    members of WeaponOneHit: 
    wield = 0x0, 
    secondary = false, 
    weapon_sn = 0, 
    weaponSkill = 0x0, 
    attack = 0
  }, <No data fields>}
(gdb) 

*this at frame 3:

$4 = {
  <Damage> = {
    _vptr.Damage = 0x7f9057ccfa38 <vtable for UndefinedOneHit+232>, 
    ch = 0x5629daa73490, 
    victim = 0x7f90440025f0, 
    killer = 0x5629daa73490, 
    dam_type = 1, 
    dam = 71, 
    immune = false, 
    dam_flag = 1
  }, 
  members of OneHit: 
  _vptr.OneHit = 0x7f9057ccf968 <vtable for UndefinedOneHit+24>, 
  skill = 120, 
  thac0 = -69, 
  victim_ac = -54, 
  orig_dam = 133
}

The error seems to be gone with -O2 but still happen with -O2.

@ruffinakoza ruffinakoza added the bug Something isn't working label May 28, 2020
@ruffinakoza
Copy link
Member Author

Closing as it's most likely was caused by plugins not being fully recompiled, rather than any misterious optimization issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant