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

Polycode crashes when using '.' instead of ':' for SceneEntityInstance:getEntityById(string, bool) #670

Open
Prime8bit opened this issue Sep 30, 2015 · 4 comments

Comments

@Prime8bit
Copy link

I am in the process of learning Polycode and Lua and am experimenting. I come from a lot of experience where an object's functions are called via "object.function" syntax. I found an IDE crashing error when I tried the following with one object in my scene.

scene = PhysicsScene2D(1.0, 60)
scene:getDefaultCamera():setOrthoSize(0, 14)

level = SceneEntityInstance(scene, "Resources/Scenes/scene.entity")
scene:addChild(level)

playerMesh = level.getEntityById("player", false)

The problem is in the last line where I wrote level.getEntityById("player", false) instead of level:getEntityById("player", false)

While I understand that I am partially to blame at this point, a runtime error in my code should not cause the entire editor to crash. It would be better if only the process running my game crashed (or better yet if it didn't and displayed an error instead) and the editor remained unaffected by my scripting mistake.

Edit1: I am attaching some images of the debug info for this bug. Unfortunately I can't seem to figure out how to run the StandalonePlayer from VisualStudio using my built main.polyapp so this is the best I can give you. Hope it helps.
callstack
debug1

@fodinabor
Copy link
Contributor

Is this always with this issue?
I already tried once to track this down: the errors are transmitted via TCP to the IDE and sometimes a message causes a crash, but I haven't found out, yet, what is wrong with this message...

@Prime8bit
Copy link
Author

I get this consistently with the binary version of Polycode. I will try it out with the master branch build when I get home from work. In the meantime I'll give you a copy of project that will show the results I am getting with the binary version. This link will expire on 10/16/2015.

It should be noted that I am using an irregular mesh in a 2D game. If you manage to load the project you will see what I mean.

@fodinabor
Copy link
Contributor

I traced it down.. but not sure what to do... I could push the fix just for you, or already apply it to goodbye_cmake branch.. I also could just create an up-to-date binary... tell me your wish 😏

fodinabor pushed a commit to fodinabor/Polycode that referenced this issue Oct 1, 2015
@Prime8bit
Copy link
Author

I'm fine with it for now. Just fix it in the goodbye_cmake branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants