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

Neko+Tilemap problem #1757

Closed
xerosugar opened this issue Mar 2, 2016 · 22 comments
Closed

Neko+Tilemap problem #1757

xerosugar opened this issue Mar 2, 2016 · 22 comments

Comments

@xerosugar
Copy link

  • Flixel version: 4.0.0.
  • OpenFL version: 3.6.0
  • Lime version: 2.9.0
  • Affected targets: Neko

When trying to "trace" a FlxTilemap the program crashes because it cannot "stringify" it for some reason. Win target works tho.

Observed behavior:
"$nargs
Called from Type::createInstance line 102
Called from flixel.util.FlxPool_flixel_util_LabelValuePair::get line 34
Called from flixel.util.LabelValuePair::weak line 603
Called from flixel.FlxObject::toString line 1088
..."

Expected behavior: To see something like: (x: 0 | y: 0 | w: 336 | h: 336 | visible: true | velocity: FlxPoint)

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Please provide some code to reproduce. Doing this in Mode works fine.

@xerosugar
Copy link
Author

Hm, that's odd. I'm doing this with a TiledLevel also, if that could have something to do with it.
In the Tiled demo, try and add 'trace(tilemap);' under 'collidableTileLayers.push(tilemap);' on (row 94) to see what happens. That crashes it for me.

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

That gets me this output, no crash:

TiledLevel.hx:92: (x: 0 | y: 0 | w: 7040 | h: 576 | visible: true | velocity: (x: 0 | y: 0))

What Haxe version are you on?

@xerosugar
Copy link
Author

3.2.1

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

No issues there either (I was on 3.2.0).

@xerosugar
Copy link
Author

interesting
how do you generate a Tiled demo again?

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

With flixel-tools you mean? flixel create <demo-name> (TiledEditor in this case).

@xerosugar
Copy link
Author

ok, doing it from a fresh Tiled demo project worked

@xerosugar
Copy link
Author

wonder if it's my .tmx file or something else that's messed up

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Try cleaning your export directory in the project where you have issues maybe?

Either way, seems like there isn't a bug here (with Flixel at least). Would still be interesting to know what's happening here.

@Gama11 Gama11 closed this as completed Mar 2, 2016
@xerosugar
Copy link
Author

nah, shouldn't be the tmx file. it works on win...
alright, thanks for the help!

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Do you have DCE enabled in the other project by chance?

@xerosugar
Copy link
Author

I dunno, what's that?

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Dead code elimination, a Haxe feature that removes unused code. Can sometimes cause issues with code that isn't fully statically typed, like the Type.createInstance() call in your stacktrace. However, you would have to add that manually to your Project.xml, so I guess you're not using it. :)

http://haxe.org/manual/cr-dce.html

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Nevermind, that's actually exactly the stacktrace I get as well with <haxedef name="dce=full" />.

@Gama11 Gama11 reopened this Mar 2, 2016
@Gama11 Gama11 added Bug and removed Can't reproduce labels Mar 2, 2016
@xerosugar
Copy link
Author

hehe, I had that in my project-file :)
ah, and I could trace the tilemap if I remove DCE, but it still crashes. same error message too.

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Are you sure it's the exact same error message?

@xerosugar
Copy link
Author

the lines in my 1st message are the same at least

@Gama11 Gama11 closed this as completed in b66a701 Mar 2, 2016
@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

Should be fixed.. can you try with DCE enabled and latest dev?

@xerosugar
Copy link
Author

the error is gone, yay :)
but now something else happens; the 'widthInTiles' property on my map is always the same as the heightInTiles... that's... interesting. And I can change the map's width in Tiled and the height will always get the same value as the width :D

@xerosugar
Copy link
Author

oh, wait. hold on

yeah, that was my fault! phew everything works now, thanks!

@Gama11
Copy link
Member

Gama11 commented Mar 2, 2016

👍

Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this issue Apr 18, 2018
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