-11

My question was put on hold, but I have edited to make it better now. Is it possible for it to be reopened? If so, please help me out.

6
  • 1
    I'm sorry, but it still doesn't look much better. Please re-read it, and edit where appropriate. Try focusing more on readibility, as well as stating the concrete problem. If required, post logs as well.
    – Shark
    Mar 2, 2016 at 12:24
  • 3
    I don't know who the three reopen-voters are, but I'm sure we'll find out soon enough. Dumping all your code in the question was not an improvement. Perhaps do some research on how to read Android crash reports and find the source of the issue, instead of letting Stack Overflow users do that for you.
    – CodeCaster
    Mar 2, 2016 at 12:30
  • 1
    Besides re-visiting How to Ask you might also find the question checklist useful to understand why your question should stay closed.
    – rene
    Mar 2, 2016 at 12:33
  • 1
    Have they not ported a debugger to the Android platform yet? That would be my only guess, given the current state of the android questions. Mar 2, 2016 at 12:33
  • 1
    @CodyGray Yes, there are debuggers for android. JDB works fine. And Innocence post the stack trace like I asked for- that tells you what the problem is. We're not going to read all of your code and try to figure it out when the OSes automatic logging system tells you what the problem is. Mar 2, 2016 at 12:44
  • The problem is im currently living on some rural place without pc or laptop because my parents doesnt allow that for some reason. The only thing i have is some force to learn even with AIDE on a piece of phone. Thats pretty hard when you did something you dont really want. They want me to be someone but not a programmer and stuff. This is the only chance i have to prove that my passion is in this field.
    – Innocence
    Mar 2, 2016 at 12:44

1 Answer 1

9

Your question should have stayed closed because you're basically asking us to debug it for you. Based on the comments I understand you're challenged/limited in the devices you use, but that isn't an excuse to redirect debug effort to this community.

First of all your question was lacking code in the first revision. Don't do that, ever. If you want help with a coding issue, we need the code that is relevant/related to the issue. No excuses.

When you dumped your code in the second revision you didn't pay attention to the guidance given in How to create a Minimal, Complete, Verifiable Example. The advice in the Help Center should not be ignored. No excuses.

If you would have found the Question Checklist earlier, you would have been able to recognize that your question wasn't going to be a high-flyer. Writing a good question (or answer for that matter) takes work. If you're about to copy-paste all your code in a post, that should ring many bells. No excuses.

To help you out I'll tell you what I would have tried1. In the onCreate, I would have commented all code to see if it prevents the crash. Then I would keep adding back code until it starts crashing again. The last line added is obviously the issue.

public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    b.clearBoard();
    b.parseFen(diminishedfen);
    asciiBoard = b.getAsciiBoard();
    tv = (TextView) findViewById(R.id.consoleBoard);
   /* tv.setTextSize(12);
    tv.setText(asciiBoard); */    
}

If, on my next test, tv.setTextSize(12); made my app crash, I would ask: Why can't findViewById actually find my consoleBoard? That would only need the consoleboard view and the above method. It shows my attempt at debugging and seasoned developers will spot any wrong assumption I make. Answers will be useful for me and future visitors.

If you have enough reputation to gain the privilege to use chat, you can enter either a language-/toolstack-specific chatroom or general rooms to ask for assistance. With a reputation of only 5, you can ask on meta.

I'll close vote your question as off-topic, needs an MCVE.

1. I'm not an Android developer, I really don't know what I'm talking about but I'm told I'm Toast

3
  • Okay, i gladly accept that
    – Innocence
    Mar 2, 2016 at 13:26
  • When debugging tools are limited, you can also put extra print commands in the code, to see how the code executes. On Android, you would use Toast for this, which shows the message on the screen.
    – S.L. Barth
    Mar 2, 2016 at 13:31
  • Actually, I think it would be wiser to use Log on android for debugging. There can be issues with the layout of the screen, or the creation of the Activity, and in those cases, you wouldn't see the toast at all, but would be able to catch the Log message.
    – CaptJak
    Mar 2, 2016 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .