SmartFoxServer Basic user leaveRoom error - actionscript-3

User 1 is opening the application from Flash and user 2 from browser
User 1 creates room A
User 2 joins room A
User 2 exits room A
... and I get this error:
[ RECEIVED ]: <msg t='sys'><body action='uCount' r='2' u='1'></body></msg>, (len: 60)
[ RECEIVED ]: <msg t='sys'><body action='userGone' r='89'><user id='91' />, (len: 73)
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleUserLeaveRoom()[/Users/Lapo/Documents/Flex Builder 2/SmartFoxClient_AS3/src/it/gotoandplay/smartfoxserver/handlers/SysHandler.as:353]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleMessage()[/Users/Lapo/Documents/Flex Builder 2/SmartFoxClient_AS3/src/it/gotoandplay/smartfoxserver/handlers/SysHandler.as:84]
at it.gotoandplay.smartfoxserver::SmartFoxClient/xmlReceived()[/Users/Lapo/Documents/Flex Builder 2/SmartFoxClient_AS3/src/it/gotoandplay/smartfoxserver/SmartFoxClient.as:327]
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleMessage()[/Users/Lapo/Documents/Flex Builder 2/SmartFoxClient_AS3/src/it/gotoandplay/smartfoxserver/SmartFoxClient.as:1418]
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleSocketData()[/Users/Lapo/Documents/Flex Builder 2/SmartFoxClient_AS3/src/it/gotoandplay/smartfoxserver/SmartFoxClient.as:1401]
If user 2 creates room A
User 1 joins room A
User 2 exits room A
... there is no error when user 2 exits room.
So, I have a button that connects user to server, when user is connected and joined the "lobby" room he can join and create rooms, when 2 players joined, game begins.
I am using SFS Basic with AS3, I don't call getRoomList() anywhere and I need to mention that I have another application similar to this that is working without error (same api, same server, similar function flow).
Tried different solutions, but no help...
I don't understand why I get this error on this application and the other one works fine and why do I get this error only when I create the room and I expect to get an error when any user creates room, not only when user 1 creates the room.
Any help or suggestions are greatly appreciated, I'm struggling with this problems for days...
Update:
If I create a 3 players room (game room) and the game is not started and I connect 2 players and then they disconnect everything is fine, but if the game starts and then they disconnect I get this error.

I found the problem and I hope I save someone some time with this answer:
The problem was this line:
sfs.getActiveRoom().getUserList().sort(randomize)[0].getName();
I was using this code to generate a random user to be the first to play, but actualy it seems that I was changing the user list array (by sorting it) (sfs.getActiveRoom().getUserList()) and when the user was leaving the room. Boom! Error! Null Object!
So, I changed with this:
var userList:Array = new Array();
userList = userList.concat(sfs.getActiveRoom().getUserList());
var randomUser = userList.sort(randomize)[0].getName();

Related

RTweet new lookup_users continued excess error

I was using R's RTweet lookup_users to successfully pull data on 6 IDs
test<-c("ID1","ID2","ID3","ID4","ID5","ID6")
detail_followers <- lookup_users(users=test,
parse=TRUE,
token=[bearer_token here],
retryonratelimit=TRUE,
verbose=TRUE)
Update: I created a loop so I could get more visibility on the run, which made it profoundly slow. This would be tolerable, except for two new problems. First, some lookup_user are missing the "profile_banner_url" variable. I built a function to check for this problem and insert a NULL value for those users missing it, further slowing the run.
Finally, many users in this set appear to be bots, as they are deleted within 24 hours of my having just pulled them from the API. The error provided from lookup_users is "Error: $ operator is invalid for atomic vectors". is.atomic eval is not useful, because the fault occurs when lookup_user is called. There are far too many of these fake/suspended/deleted users for manual prompts.
These may be issues with the new RTweet from GitHub.

EWS SyncFolderItems is giving me exception "An internal server error occurred. The operation failed."

I have a Synchronisation tool which uses EWS Managed API 'SyncFolderItems' to retrieve changed items in a Calendar folder. It has been running fine for 18 months or so but this week two customers both experienced the same issue. (Could be a coincidence). Both are Office 365 customers.
The sync started failing to complete, and on closer analysis, the SyncFolderItems call was failing with error "An internal server error occurred. The operation failed." No further details given in the error.
I reset the sync (ie set the syncstate back to null so it sync everything in the folder again) . It worked fine for several pagination iterations getting 250 items at a time, but them at some point it failed.
I thought maybe there was an item with alot of data. I reduced the page size to 25 and it worked OK for a bit, then failed. I reduced it a page size of 1 and it fails. There are 1250 items in the folder, so I haven't worked out which item it is failing at yet. It seems inconsistent and I wonder if there is a throttle which has been set higher recently?
I think my next step is to see if there is one offending item and delete it, but its hard work out which item it might be.
Does anyone have any suggestions for what might be going wrong?
icc = service.SyncFolderItems(Connection.SourceID, ps, null, 1,
SyncFolderItemsScope.NormalItems, syncstate);
I having the same issue with SyncFolderItems(..).
The problem seems to exist only in public folders? I tested with a public calender folder. If I call SyncFolderItems for the first time with no status, I get no error. But if I have a status and delete one item in the public folder, I get this error on the next call of SyncFolderItems().
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2016, TimeZoneInfo.Local);
service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
service.Credentials = new WebCredentials("x.y#germany.de", "pwd");
Folder f1 = Folder.Bind(service, new FolderId("SOMEFOLDERID OF A PUBLIC CALENDAR FOLDER"), BasePropertySet.FirstClassProperties);
Console.WriteLine(f1.DisplayName);
String status = "";
do
{
ChangeCollection<ItemChange> changes = service.SyncFolderItems(f1.Id, BasePropertySet.IdOnly, null, 100, SyncFolderItemsScope.NormalItems, status);
Console.Write(changes.Count+",");
status = changes.SyncState;
} while (true);
ServerInfo: {15.01.1101.019} V2017_04_14

"No database selected" when running procedures

Hello there I am new to all of this and recently took over my cricket teams website. I have been doing this procedure for 3 month without any problem but today this happened when I ran this query in the SQL section:
CALL refresh_batting_profile_snapshot(#rc);
CALL refresh_bowling_profile_snapshot(#rc);
CALL refresh_mvp_snapshot();
CALL refresh_mvp_derived_moms();
The error message I got back was this:
CALL refresh_batting_profile_snapshot(#rc)
);
MySQL said:
1046 - No database selected
You should have a database list in the left pane. Click on the one you want to use in order to select it:
One you do that, the SQL pane will reflect the currently selected database:

"Cannot access a property or method of a null object reference" - very strange error

I am working on an AIR application with 2 windows: One to create a new customer and another to display some information about the customer. On window 1, there is also a textfield to search for a customer by Id or name.
These are the steps to create a new customer:
with an "add" button on window 1, I open window 2.
on window 2, the user completes a form to create a new customer.
the information is saved in a MySQL Database over an HttpService.
The result handler method calls a public function on window 1:
result = "new wWin1().resultSaveCustomer(event)"
This part works well - the new customer Id is received.
In some cases, according customer data, I change the component color - this operation works well, if I load a customer after a using the search field, but if I search directly from the resultSaveCustomer function (after completion of step 3), a message appears:
Cannot access a property or method of a null object reference.
I don't understand why, because all the components in window 1, have an Id name!
Or the property is a label with Id Name.
Thanks for helping me.

Linq 2 SQL on shared host

I recently ran into an issue with linq on a shared host.
The host is Shared Intellect and they support v3.5 of the framework. However, I am uncertain to whether they have SP1 installed. My suspicion is that they do not.
I have a simple News table that has the following structure:
NewsID uniqueidentifier
Title nvarchar(250)
Introduction nvarchar(1000)
Article ntext
DateEntered datetime (default getdate())
IsPublic bit (default true)
My goal is to display the 3 most recent records from this table. I initially went the D&D method (I know, I know) and created a linq data-source and was unable to find a way to limit the results the way I desired, so I removed that and wrote the following:
var dc = new NewsDataContext();
var news = from a in dc.News
where a.IsPublic == true
orderby a.DateEntered descending
select new { a.NewsID, a.Introduction };
lstNews.DataSource = news.Take(3);
lstNews.DataBind();
This worked perfectly on my local machine.
However, when I uploaded everything to the shared host, I recieved the following error:
.Read_<>f__AnonymousType0`2
(System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MethodAccessException:
.Read_<>f__AnonymousType0`2
(System.Data.Linq.SqlClient.Implementation.ObjectMaterializer`1<System.Data.SqlClient.SqlDataReader>)
I tried to search the error on Google, but met with no success. I then tried to modify my query in every way I could imagine, removing various combinations of the where/orderby parameters as well as limiting my query to a single column and even removing the Take command.
My Question therefore comes in 3 parts:
Has anyone else encountered this and if so, is there a "quick" fix?
Is there a way to use the datasource to limit the rows?
Is there some way to determine what version of the framework the shared host is running short of emailing them directly (which I have done and am awaiting an answer)
System.MethodAccessException is thrown by the framework when it is missing an assembly, or one of the references are of the wrong version.
The first thing I would do is try uploading and referencing your code to the LINQ assemblies in your BIN, instead of the shared hosting providers GAC.