larsiusprime / crashdumper

A cross-platform automated crash report generator/sender for Haxe/OpenFL apps.
MIT License
113 stars 33 forks source link

Line and function refer to wrong end of stack #26

Open IBwWG opened 8 years ago

IBwWG commented 8 years ago

At least, in my opinion. E.g.


openfl._legacy.display.Stage.__pollTimers (openfl/_legacy/display/Stage.hx line 1084)

openfl._legacy.display.Stage.__checkRender (openfl/_legacy/display/Stage.hx line 351)

openfl._legacy.display.Stage.__render (openfl/_legacy/display/Stage.hx line 1103)

openfl._legacy.display.DisplayObjectContainer.__broadcast (openfl/_legacy/display/DisplayObjectContainer.hx line 286)

openfl._legacy.display.DisplayObject.__broadcast (openfl/_legacy/display/DisplayObject.hx line 161)

openfl._legacy.display.DisplayObject.__dispatchEvent (openfl/_legacy/display/DisplayObject.hx line 182)

openfl._legacy.events.EventDispatcher.dispatchEvent (openfl/_legacy/events/EventDispatcher.hx line 98)

flixel.FlxGame.onEnterFrame (flixel/FlxGame.hx line 530)

flixel.FlxGame.step (flixel/FlxGame.hx line 663)

flixel.FlxGame.update (flixel/FlxGame.hx line 750)

flixel.input.mouse.FlxMouseEventManager.update (flixel/input/mouse/FlxMouseEventManager.hx line 404)

minigames.general.NiceButton.clickHandler (minigames/general/NiceButton.hx line 137)

ConfirmExitSubState.yes (ConfirmExitSubState.hx line 49)

Main.crashOnPurpose (Main.hx line 230)

Currently I think it would make sense to display crashOnPurpose rather than __pollTimers, since a heck of a lot of stack traces would start with that.

IBwWG commented 8 years ago

Or maybe it's more that stacks get output upside-down, at least compared with, e.g., HaxeDevelop's stack panel (with the latest frame on top.)

mastef commented 8 years ago

That seems to be due to the different stack order based on the targets - and report.php takes the line number from the first line of the stack entry

IBwWG commented 8 years ago

It's different for different targets? I thought it was more or less a conventional standard...as the name "stack" suggests visually, even though that's opposite of just printing the array from 0 onwards. (They don't call them "hanging vine traces", eh? ;) )

mastef commented 8 years ago

I'm not 100% sure when or what specific options it's based on, but yeah, the current report.php version for example works for me. But I also remember that others devs had the line numbers the other way around based on IDE or maybe targets. So hardcoding it one way or the other is going to break it for somebody else

IBwWG commented 8 years ago

Ah, OK, so there isn't as much of a standard as I thought. Nonetheless I'd leave this as a feature request, then, to be able to set the order to one's preference (without breaking the line number part.)