Triangle stack-trace

Discussion in 'Plugin Development' started by Blacktiger07, Dec 4, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Blacktiger07

    i get this error when i load my plugin:
    Code:
            at me.blacktiger07.signinteract.SignInteractBlockListener.<init>(SignInteractBlockListener.java:43)
            at me.blacktiger07.signinteract.SignInteractPlayerListener.<init>(SignInteractPlayerListener.java:20)
            at me.blacktiger07.signinteract.SignInteract.<init>(SignInteract.java:38)
    These are the lines in the classes.
    SignInteract.java:
    Code:
        private SignInteractPlayerListener playerListener = new SignInteractPlayerListener();
    SignInteractBlockListener.java:
    Code:
        private SignInteract mainB = new SignInteract();
    SignInteractPlayerListener.java:
    Code:
        private SignInteractBlockListener blockListenerP = new SignInteractBlockListener();
    All the lines go to the next class, where the line goes again to next and so on...
    i don't know whats wrong there
     
  2. Offline

    ItsHarry

    You're creating a new instance of SignInteract, which means a new instance of SignInteractPlayerListener is created, which means a new instance of blocklistener is created, which means signinteract is created, and so on and so on..
     
  3. Offline

    Blacktiger07

    and how to fix this?
     
Thread Status:
Not open for further replies.

Share This Page