Code Monkey home page Code Monkey logo

Comments (8)

griffi-gh avatar griffi-gh commented on May 18, 2024

Comment the first line and the message changes from 4 to 3 when the bomb explodes.
Keeping it as-is causes the number to stay at 4, accessing broken references causes a crash on android and on windows get_position returns 0

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

(maybe title needs to be updated)

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

Discovered this accidentaly in this level: https://principia-web.se/level/676

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

Another more straight forward example:

local ref
function init()
  ref = world:get_entity_by_id(2)
end
function step(count)
  if count > 200 then
    ref:highlight()
  end
end

After the bomb explodes on windows place where it was before the explosion is highlighted, and on android this causes a lua error and not a crash... wtf

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024
local ref
function init()
  ref = world:get_entity_by_id(2)
end
function step(count)
  if count == 3 then
    game:message(ref:get_name())
  end
  if count == 240 then
    game:message(ref:get_name())
  end
end

This on frame 3 prints "Bomb" and on frame 240 (after explosion) "Toggle axis rotation"?????

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

calling :set_color() on ref crashes on windows

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

After looking at the escript source I think this is actually use-after-free? Game tries to clean up objects from the stack and globals but fails in this case???

from principia.

griffi-gh avatar griffi-gh commented on May 18, 2024

(way overdue) correction: any form of disowning triggers this too, for example calling absorb

from principia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.