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

Getting an error when deleting an object immediately after creating it. #109

Open
Siddhant085 opened this issue Jul 11, 2016 · 9 comments
Open

Comments

@Siddhant085
Copy link

usr/local/lib/steam/tmp/net/coal/protocoll.pike:174: /kernel/securesocket()->COAL_command(42,Server Object,({}))
usr/local/lib/steam/tmp/net/coal.pike:175: /kernel/securesocket()->receive_message("")
usr/local/lib/steam/tmp/kernel/securesocket.pike:30: /kernel/securesocket()->receive_message("�\0\0\0#\0\0\0_\1\0\0\0\0\0\0\0\0\5\0\2\3\0\0\0\6delete\5\0\0")
usr/local/lib/steam/tmp/kernel/coalsocket.pike:68: /kernel/securesocket()->f_read_callback(0,"�\0\0\0#\0\0\0_\1\0\0\0\0\0\0\0\0\5\0\2\3\0\0\0\6delete\5\0\0")
-:1: Pike.Backend(0)->`()(3600.0)
usr/local/pike/7.8.866/lib/master.pike:3908: master()->_main(({"steam","server/server.pike","--pid=/var/run/steam.pid","--quiet","--auto-restart"}))

delete:Bad line array
1
Function: delete not found inside (0)
192

This error is occurring in the create test case sometimes but not always. The object is being deleted immediately after creation so this error shouldn't be there.

@eMBee
Copy link
Contributor

eMBee commented Jul 11, 2016 via email

@Siddhant085
Copy link
Author

I am getting the error for other call also. I tried query_attribute instead of delete. The problem persists.

The code is:
int result =_Server->get_factory("Calendar")->execute((["name":"TestCalendar"]))->move(OBJ(me->get_last_trail()->query_attribute("OBJ_PATH")));
OBJ(me->get_last_trail()->query_attribute("OBJ_PATH")+"/TestCalendar")->query_attribute("OBJ_NAME");

The error does not occur 100% of the times I run the code. Sometimes restarting the server or the client fixes the error but it comes back on repeated execution.

@eMBee
Copy link
Contributor

eMBee commented Jul 11, 2016 via email

@Siddhant085
Copy link
Author

object room = OBJ("/TestRoom");
int result =_Server->get_factory("Calendar")->execute((["name":"TestCalendar"]))->move(room);
OBJ("TestRoom/TestCalendar")->delete();

I changed the code to this and removed all references to get _trail, however the error persists.

@eMBee
Copy link
Contributor

eMBee commented Jul 12, 2016 via email

@Siddhant085
Copy link
Author

No the problem is not only for the calendar class. It is occurring quite randomly. I am creating 4 objects Document, Calendar, Date and Container and the error occurs for any one of the class and that also not always so reproducing the problem is difficult.

@Siddhant085
Copy link
Author

Siddhant085 commented Jul 17, 2016

@eMBee This problem is occurring not only with the delete function but also other functions like get_class(). In fact I changed the code so as to make sure that the object exists.
_Server->get_factory("Room")->execute((["name":"move2Room"]))->move(OBJ("/TestRoom")); _Server->get_factory("User")->execute((["name":"move2User","pw":"testpass","email":"[email protected]"])); _Server->get_module("users")->get_user("move2User")->activate_user(); array(object) testObjects = allocate(2); do{ testObjects[0]=OBJ("/TestRoom/move2Room"); }while(testObjects[0]==0); do{ testObjects[1]=_Server->get_module("users")->get_user("move2User"); }while(testObjects[1]==0);
Even after this when I call testObjects[0]->get_class(), I am getting the error Function: get_class not found inside (0).

@eMBee
Copy link
Contributor

eMBee commented Jul 17, 2016 via email

@Siddhant085
Copy link
Author

Yes this behavior is quite random sometimes it comes back on restarting the client and sometimes on restarting the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants