Xcode Runtime Error log: What does the [#:#] mean in AppName[#:#]? - swift

I got the following runtime error:
2014-12-10 19:26:39.695 Bliss2[21855:994070] Error: object not found for update (Code: 101, Version: 1.5.0)
I assume the [21855:994070] has a meaning.
How do I use it to track down the error in the code?

That is not a "runtime error". It is an NSLog message and has been executed and logged in perfectly good order (e.g. by some third-party code you are using?). Of course the code may then have thrown an exception / aborted, but if it did (and I don't know whether it did), that has nothing to do with the log message itself, except that you're being told first that there's a problem, apparently as a courtesy.
As for the numbers, they probably have nothing to say that will concern you here. The first number is your process number and won't be stable between invocations; it is rarely of interest. The second number is the thread number and is of interest when there are many log statements for discovering whether this log statement is executed in a background thread (or in the same thread as other log statements).

Related

Silence "unknown OID 17227: failed to recognize type of 'geography'. It will be treated as String."

I'm using columns of type "geography" for some few "point within polygon" queries. They are too few and too simple to bundle a GIS gem, I handle it all on the SQL level.
However, every time Rails boots (rake tasks, console etc), the following warning is spit:
unknown OID 17227: failed to recognize type of 'geography'. It will be treated as String.
I'm fine with "geography" being treated as "String", but the warning triggers warning mails every time a cronjob executes any rake task.
Any idea how I can silence this warning?
Thanks for your hints!
Looking at the source of ActiveRecord, I can answer the question myself:
The warning is hardcoded and therefore can't be silenced by AR configuration. However, RUBYOPT=-W0 gets rid of warnings altogether. This is a big chopper of course, but since I'm still getting those warnings in local development, I can live with a totally warning-less production system.
Since this is the first question/answer that appears given that the title is the error, I would recommend following this answer to fix it: What is the source of "unknown OID" errors in Rails?

Lync 2013 Modality.ModalityStateChanged callback not always being called

So the issue I'm having only recently started after an update to the Lync client somewhere around version 15.0.4849.1000. The issue revolves around app sharing conferences, which I have working fine still in 2016 SFB and anything prior to 15.0.4849.1000.
The core issue as far as I can tell deals with Modality.BeginConnect, the passed in callback does not get called. Although, I have had it get called when I'm debugging, stepping through the code and hitting breakpoints, etc. So that leads me to think that normally maybe something's not getting initialized in time, or some sort of race condition, but I haven't been able to pin down exactly what makes it function correctly in that case.
EDIT: I just realized another exception occurs during the call to BeginConnect:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Lync.Model.dll
Additional information: Exception from HRESULT: 0x80F10083
And that HRESULT translates to: "The operation is disabled by capability". What in the world does that mean?
The odd thing is (or seems odd to me) that even though the callback is never called, I do receive a ModalityStateChanged event for ModalityState.Connected...
So if you have any ideas what would perhaps cause that, please share!
I don't think these this is related, but a call to this:
m_aeConversationWnd = AutomationElement.FromHandle(m_ConversationWindow.Handle);
shortly before calling BeginConnect, fails with the exception:
A first chance exception of type 'System.ArgumentException' occurred in UIAutomationClientsideProviders.dll
Additional information: Value does not fall within the expected range.

Force javac to run processors

AFAIK when some errors were reported from within one processor, other will not be run.
Is there any way to force processing independently?
According to the documentation, only uncaught errors or exceptions stop further processing:
If a processor throws an uncaught exception, the tool may cease other active annotation processors. [...] Since annotation processors are run in a cooperative environment, a processor should throw an uncaught exception only in situations where no error recovery or reporting is feasible.
If a processor reports an error, the errorRaised() method should return true in the next round but not stop processing:
Printing a message with an error kind will raise an error.
If a processor raises an error, the current round will run to completion and the subsequent round will indicate an error was raised.
It says "the tool may cease other active annotation processors" (emphasis added). So if you need to keep going on even in case of uncaught exceptions, it should be possible with the right processing tool. I don't know if there are any tools that support this though. At least the processing tool should be the direction to look for if you need this feature.

Sqlite Finalize statement failing

Error: sqlite3_finalize failed (database is locked). I have released memory also properly in each view. Has anyone faced this issue?
I think you're hitting some legacy cruft in the SQLite interface. To summarize, when you sqlite3_step and the result is an error, slite3_finalize will return the same error. Pay attention to the error from sqlite3_step and other SQLite calls, and ignore the error from slite3_finalize.
Per SQLite documentation for sqlite3_finalize:
If the most recent evaluation of the statement encountered no errors or or if the statement is never been evaluated, then sqlite3_finalize() returns SQLITE_OK. If the most recent evaluation of statement S failed, then sqlite3_finalize(S) returns the appropriate error code or extended error code.
It talks about the most recent evaluation of the statement rather than the finalize itself. This is nowhere near explicit enough, but there's another comment in the documentation that is:
Goofy Interface Alert: In the legacy interface, the sqlite3_step() API always returns a generic error code, SQLITE_ERROR, following any error other than SQLITE_BUSY and SQLITE_MISUSE. You must call sqlite3_reset() or sqlite3_finalize() in order to find one of the specific error codes that better describes the error.
It goes on to say this is fixed by the v2 APIs, but I think that's only partially correct. When using the v2 APIs, sqlite3_step returns an error code directly. However, there's no sqlite3_finalize_v2. And in my testing, sqlite3_finalize continues to return the error code from sqlite3_step.
In other words: Ignore the error from sqlite3_finalize. Pay attention to the error you're almost certainly getting but ignoring from sqlite3_step.
"Database is locked" means that (duh!) the database is locked. Some other sqlite operation against the database is still "pending", possibly because you failed to finalize an earlier query, or possibly because there's a query going on in an async thread.

Matlab: getting "Unexpected error status flag encountered. Resetting to proper state"

I have a matlab script, that every now and them produces the message:
Caught std::exception Exception message is:
bad allocation
Unexpected error status flag encountered. Resetting to proper state.
What could be causing this?
This is a bug in MATLAB, in which some part of MATLAB is not handling a std::bad_alloc exception correctly (std::bad_alloc is an out-of-memory exception thrown from the C++ runtime library).
The "Unexpected error status flag encountered. Resetting to proper state." is an internal diagnostic - you shouldn't see it unless MATLAB has gotten into a bad state, which in this case is happening because it's encountering the bad_alloc someplace where it was not expected. Recent versions of MATLAB have fixed most of these issues, except in extremely low-memory situations (like, there's less than 1 kilobyte of free memory left). What version are you using?
My best guess is that your script is trying to allocate some memory and failing. The occurrence of such an error will depend on the availability of memory on your computer at the time allocation is attempted. The available memory will vary according to what is going on at the time in other programs, the operating system, even the state of your Matlab session.
For a more accurate diagnosis, you'll have to tell us more, maybe even post your script.
It was happening to me, and it turned out I had too many files open. fclose('all') set everything back to normal, and I made sure that all my fopen were followed by fclose.