Skip to content
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

Exception: E1212012 no more free items #4468

Closed
DorpsGek opened this issue Feb 5, 2011 · 6 comments
Closed

Exception: E1212012 no more free items #4468

DorpsGek opened this issue Feb 5, 2011 · 6 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Feb 5, 2011

PulsarPL opened the ticket and wrote:

Bug in 1.1.0-beta4 & 1.1.0-beta5 under WIN 7 x64
Savegame is unfortunately too big to attach here

Attachments

Reported version: 1.1.0-beta5
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4468
@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2011

michi_cc wrote:

You have managed to create more than 64000 orders. Raising that limit is probably not trivial.

Do you use http://wiki.openttd.org/Shared_orders# Shared_orders ?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468#comment9600

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2011

PulsarPL wrote:

Thank you for your reply.
I don't use shared orders. I wasn't aware of that option.
Maybe it's time for a new map.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468#comment9601

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2011

SmatZ wrote:

Raising the limit isn't a solution. If this happens, there is a place where Order::CanAllocateItems() isn't called before 'new Order()'. That's a serious problem, as it can be used to easily DoS a server.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468#comment9606

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2011

SmatZ wrote:

Index: src/vehicle.cpp

--- src/vehicle.cpp (revision 21962)
+++ src/vehicle.cpp (working copy)
@@ -1849,7 +1849,8 @@
Order *in_list = this->GetOrder(this->cur_auto_order_index);
if (in_list != NULL && this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID &&
(!in_list->IsType(OT_AUTOMATIC) ||
- in_list->GetDestination() != this->last_station_visited)) {
+ in_list->GetDestination() != this->last_station_visited) &&
+ Order::CanAllocateItem()) {
Order *auto_order = new Order();
auto_order->MakeAutomatic(this->last_station_visited);
InsertOrder(this, auto_order, this->cur_auto_order_index);

Something like this can be used to solve this problem, but maybe there are other places that need fixing.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468#comment9607

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 6, 2011

SmatZ wrote:

http://devs.openttd.org/~smatz/verify_can_allocate.diff

This patch adds a verification that CanAllocateItem() is called before each operator new. There are many fixes needed just to load the intro game.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468#comment9608

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2011

SmatZ closed the ticket.

Reason for closing: Fixed

r22022


This comment was imported from FlySpray: https://bugs.openttd.org/task/4468

@DorpsGek DorpsGek closed this as completed Feb 8, 2011
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant