-
Notifications
You must be signed in to change notification settings - Fork 12
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
Synchronization Issue #98
Comments
I had the same issue. Synched everything and program wouldn't even load the gui, just output three lines from the Market. Removing the sync around the iteration in the Market's scheduler fixed the issue but wondering how to have that sync without the hold up. |
Does anyone know how much extra credit is given for incorporating Astar into this project? |
Well I can't say for certain without playing around with your code to pinpoint the exact issue, but in a broader sense this problem will happen when you have a synchronized block of code that waits on another synchronized block of code to finish and both blocks of code are monitoring the same data. And Bach, that question is completely unrelated to the issue at hand, but I don't quite know either. |
Yea, that's what I kind of figured. I don't really know a proper fix though... |
You could just start removing synchronized blocks and see when you stop getting errors, and then check to see why that synchronized block would cause your program to die. |
Can you locate where the issue is? I fixed my problem by changing the synchronized block to a try/catch. |
Yea, I'm just trying removing and changing things, but I don't really get WHY it's just dying |
This happens when there are "synchronization loops" where thread A is waiting to access data locked by thread B, but thread B is waiting to access data locked by thread A. What you can do is open your program in debug mode, and when it get frozen, pause the program and look at the stacks of each of your threads. It will show what threads are waiting for data, and what threads are holding said data. That can help you figure it out. |
Hi, I implemented the synchronization steps and all of that worked great for the most part.
However, there was a portion of my program that was unable to run because of the synchronization blocks. It would just halt my program completely. How do we get around this? (I did use synch blocks and created synched ArrayLists, it just completely halts my program.)
The text was updated successfully, but these errors were encountered: