-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fleet Movement Error Results HTTP 500 Error #448
Comments
Can you provide all steps to reproduce the issue? |
@duhow I am using version 3.2.0 (master branch/ commit 5d02f9e) I created a fleet that 5000 large cargo ships, sent them to my moon, and add some resources about 20k, 40k, 1 million. I select the transport. Here are database records from other instances, these are on different days.
This fleet movement issue does not happen all the time, so I am not sure what happens. |
Hi @asparatu, Thank you for your feedback with priority. I am using php 7.4 version. When I tried on localhost, I did not get any errors. The XGP version I use is in the link below, as you mentioned. https://github.com/XGProyect/XG-Proyect-v3.x.x/releases/tag/v3.2.0 I will experiment on hosting. |
Hello @BeReal86 I found a way to reproduce the fleet movement error. When you get the page that you select the fleet movement if you do not select anything of the option this will set For example, if you just add the resources and don't select transportation or deployment option when press continue it saves to the database. when the fleet gets to where suppose to the code does not know what do and crashes and give the HTTP 500 error because there is no fleet movement number defined. So, what I can see is there is validation before you save to the database because if there was this error would not happen. This why I said does not happen all the time. What you can do when you create the objects, set numbers to -1 so easy to validate if the values and strings to NULL and not empty strings. I have noticed that there has to be more client-side validation and feedback to what is happening, just not resetting the page going to back to the first page of the fleet movement because you do not know what you input wrong or if you are not able to do something. For example when you try to create a planet and if you are certain planet number instead of telling you can not create planet there it just resets the page that is not helpful. |
Hello @BeReal86 Here is the code I use to fix the problem in the control/game/fleet4.php. This will stop from continuing and not put zero in the fleet_mission database column.
|
@asparatu do you mean to set that code in here? XG-Proyect-v3.x.x/src/upload/app/controllers/game/fleet4.php Lines 245 to 247 in 52a10d3
|
Hello @duhow, XG-Proyect-v3.x.x/src/upload/app/controllers/game/fleet4.php Lines 562 to 563 in 52a10d3
Sorry again.. I am still get use to using git and GitHub. |
fixed on 3.3 - thanks for everybody's contribution |
Describe the bug
There is still an HTTP 500 Error that happens when you have Fleet movements. I believe has only do when transport resource to plant or moon. This error does not happen all the time, but somehow the mission does not get sometimes meaning instead of the value of 3 being set in the fleet table it is zero. I have debugged the whole fleet movement from start to finish there is no place I can see that updates the fleet_mission field expect when inserted. This makes me believe it does not get a set mission value.
app/controllers/game/fleet4.php Line 561
// add the fleet mission $this->_fleet_data['fleet_mission'] = $data['mission'];
I believe the $data['mission'] is not being set.
Screenshots
Database record showing fleet_mission is zero
Debug Error shows the same thing saying offset is zero
When I change the fleet_mission to 3 the HTTP 500 Error is gone and the game portal works again and the fleet movement is completed and deleted from the server.
I would suggest you add value 0 and just call it default or something stop this errro from happening.
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: