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

did not work #19

Open
hopewise opened this issue Oct 26, 2015 · 17 comments
Open

did not work #19

hopewise opened this issue Oct 26, 2015 · 17 comments

Comments

@hopewise
Copy link

I am using openfl 3.3.9, I've opened the log file, but it has no lines number nor stack, I tried to both release and debug build, I've included both of:

<haxedef name="HXCPP_STACK_LINE" />
<haxedef name="HXCPP_STACK_TRACE" />

Thanks for great extension, I think it might need minor fix? I am haxe 3.2.1

@jarbot
Copy link

jarbot commented Oct 29, 2015

crashdumper creates a txt file saved to the device. it does not trace to the log as far as I know, but that would be a nice option.

@larsiusprime
Copy link
Owner

What log file are you referring to?

@jarbot
Copy link

jarbot commented Oct 29, 2015

I assumed @hopewise was referring to the output from logcat.

@larsiusprime
Copy link
Owner

Ah, so a mobile device thing? I'd be happy to output to that if I knew how. As of right now crashdumper reports the crash via trace(), and writing a file to disk. I could add more logging methods, but I don't have a mobile device so I'd have to lean on the community a little for stuff like that.

@jarbot
Copy link

jarbot commented Oct 29, 2015

trace() shows up in logcat on android and ios but I don't think crashdumper is logging when the stack trace is collected, I could be wrong or it might be trace stops working after a crash. I added my own traces and got stack traces to show up but I can't recall where I put them.

@larsiusprime
Copy link
Owner

Something like this?

if (traceToLog)
{
    trace("CRASH session.id = " + session.id);
    trace("MESSAGE = " + errorMessage);
}

That should include the same basic information that's currently being logged to disk.

@jarbot
Copy link

jarbot commented Oct 29, 2015

Yeah that would be perfect!

@larsiusprime
Copy link
Owner

Gimme a sec

@larsiusprime
Copy link
Owner

Okay, Crashdumper now has a third parameter in the private doErrorStuff function:

private function doErrorStuff(e:Dynamic, writeToFile:Bool = true, sendToServer:Bool = true, traceToLog:Bool = true):Void

if traceToLog is true then it will also output the crash dump message via trace(), and this should include the stack trace and regular information. If you override doErrorStuff be advised you'll have to update your function signature. If you do nothing, the parameter is true by default so it should trace out now if you update.

Let me know how this behaves.

@hopewise
Copy link
Author

I am experimenting on my galaxy S3, it has android 4.4.4 , here is a snapshot that shows the path and file name:
crashdump

And here is the file content:
crashdump2

What I expected is that it will include the stack trace into the _error.txt file
So, how would I get the stack trace? as I already set in build.xml:
haxedef name="HXCPP_STACK_LINE"
haxedef name="HXCPP_STACK_TRACE"

@jarbot
Copy link

jarbot commented Oct 30, 2015

Awesome thanks @larsiusprime I will try it out tomorrow. Many thanks.

@jarbot
Copy link

jarbot commented Oct 30, 2015

The trace functionality is working as expected. Thank you!

@hopewise
Copy link
Author

@jarbot, did you successfully viewed the error stack list? can you please deploy a simple project example? as you can see above the stack is empty

@jarbot
Copy link

jarbot commented Nov 2, 2015

@hopewise I am able to see the stack trace in logcat as well as the txt file generated by crashdumper. I would be more than happy to test a simple project.

@hopewise
Copy link
Author

hopewise commented Nov 3, 2015

@jarbot thank you, as for logcat, wouldn't it view tons of non-my-app related info beside my app's log? is it possible to let it view only my app logs? is there a tool to make it simple?

also, I will truly appreciate it if you can share your simple working project that could trace logs to logcat..

@jarbot
Copy link

jarbot commented Nov 3, 2015

@hopewise sorry I was confused I thought you had a simple project you wanted me to test. It will take me a bit of time to get a sample project running.

You can use the Monitor app that is provided by the android sdk. Make sure you have installed the platform tools. http://developer.android.com/tools/help/monitor.html This tool has a handy console where you can filter by tag, pid, app name, etc.

Or from the command line you can do a simple filter like this to see logs for your app:

adb logcat | grep trace

This is pretty rudimentary but works for basic trace debugging and seeing the stack trace from crashdumper

@hopewise
Copy link
Author

hopewise commented Nov 4, 2015

Thanks @jarbot for link, I will check that

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

3 participants