Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [S.O.L.V.E.D] MultiThreaded Server Freezes GUI upon bind()  (Read 648 times)
0 Members and 1 Guest are viewing this topic.
Offline GabrielBailey74
« Posted 2013-06-03 03:32:37 »

Hello JGO, I know there are countless posts relating to my error but the majority of them are pertaining to / are involving the firing of a event and than the freezing occurs.

Now I know my problem is along the same lines. Tongue

EDIT: Sorry if this question has already been answered here :<

Here is my pseudo-code:
(Custom networking kit)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
public static void main(String[] args) {
     new Loader().run();
}

public Loader() {
     // create UI's
    // show splash screen with progress bar etc..
}

public void run() {
     // fire a SwingWorker to load resources / update UI's
}

/* Called upon when the SwingWorker finishes loading resources */
protected void done() {
      loading = false;
      try {
         server.bind();
      } catch (BindException e) {
         e.printStackTrace();
      } catch (UnknownHostException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      }
      game_window.show();
}


I have tried firing both calls separately / together on SwingUtilities/invoke/wait methods and the no responding still occurs.

I've ran into this problem a couple times in the past and I've managed to solve it but now I cannot (At the moment) and that's why I'm coming here and asking for help :>

Hopefully somebody can post back with some pseudo-code on how I should do this so I don't have to spend hours trying to solve it haha ^_^

Offline GabrielBailey74
« Reply #1 - Posted 2013-06-03 03:41:29 »

I managed to solve it! :>
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
   public static void main(String[] args) {
      Thread th = new Thread() {
         public void run() {
            super.run();
            /* Initialize and bind the server */
         }
      };
      th.start();
      new Loader().run();
   }

Offline Sickan

Senior Member


Medals: 9



« Reply #2 - Posted 2013-06-03 11:48:10 »

I saw the mess that was the title and immediately thought of GabrielBailey74, I was not disappointed.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GabrielBailey74
« Reply #3 - Posted 2013-06-03 16:14:35 »

I saw the mess that was the title and immediately thought of GabrielBailey74, I was not disappointed.

I have no reply for you haha
The way I word things + how I feel about "Random Shit Talkers" / "wanna be big boys online" i'd be banned again within a few seconds :/

Anyways, regardless of if it was my issue or another persons issue it's been solved so there's NO reason for you to post here especially if it's nothing but some smart ass comment :L

Funny how even when I make a post with no sarcasm / rudeness some noob has to come along and talk shit xD

Dang I love it when people talk shit about me <3

Offline GabrielBailey74
« Reply #4 - Posted 2013-06-03 16:28:58 »

JGO needs a ignore list lol.

"Sorry you cannot make a reply to this topic, you are on his ignore list"

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #5 - Posted 2013-06-03 20:26:47 »

Calm down man. He's joking. Believe it or not, not everyone out there is there to kill you.
Talk about easily offended Roll Eyes
Offline GabrielBailey74
« Reply #6 - Posted 2013-06-03 20:37:45 »

Talk about easily offended.

Erm, when a random says something negative towards you what is it?
"Buddy Season"?
<_<...

Calm down man.

lul

I don't think everyone's out to get me o_o

When someone's posting negative comments on my post I'll speak my mind o_0

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #7 - Posted 2013-06-03 20:47:51 »

I don't have a problem with you speaking your mind, but, as I said, he was joking. I don't think you're foreign, so I doubt you didn't see that.
Offline GabrielBailey74
« Reply #8 - Posted 2013-06-03 21:24:37 »

I don't have a problem with you speaking your mind, but, as I said, he was joking. I don't think you're foreign, so I doubt you didn't see that.

(inb4ban)

He left a smart ass / negative comment (On my help thread), I spoke my mind.

Threads closed lol

Whether I picked his comment up as a joke or not has no relevance mate, point is I don't know him therefor a negative comment placed where it's not needed will be "corrected"?

I don't know how to word what I feel like saying without having riven breathing down my neck (private message center) about how I need to "respect the members here".

Once again the thread's closed, if you want to argue for someone who's offline: make a rant topic and I'll join you jimmt Wink

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 784
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2013-06-03 22:15:57 »

I think GabrielBailey deserves a polite nod in his general direction, for keeping his composure.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GabrielBailey74
« Reply #10 - Posted 2013-06-03 22:23:15 »

I think GabrielBailey deserves a polite nod in his general direction, for keeping his composure.

Bring the whole JGO gang please :>

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 784
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2013-06-03 22:27:37 »

Well, Sickan made a comment that was uncalled for. Knowing you a bit, I think you handled it pretty well. Then Jimmt started fueling the fire and it still didn't escalate. So a well timed nod is in order.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #12 - Posted 2013-06-03 22:30:06 »

Then Jimmt started fueling the fire
Sorry Undecided
Offline GabrielBailey74
« Reply #13 - Posted 2013-06-03 22:34:12 »



I'm in need of heart / lung surgery at the moment so half the shit that comes my way I'm just brushing off TBH lol.

Don't need to get into a caps lock match :c

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (40 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!