I keep getting this error in the dev environment - 'A SafeHandle or CriticalHandle of type 'System.Data.SqlServerCe.HasSafeHandle' failed to properly release the handle with value ...."
It is in a VS 2012 Winforms application and only seems to happen if a particular piece of code is run at some point. The error shows after the form is closed, but I can't understand why. It only happens in the dev environment and seems to be OK in the compiled version, but I don't want to just ignore it.
The error seems to be caused by this line of code, although weirdly at this point in time I have not opened a connection to the SQL ce database and the directory it is searching in does not have the SQL ce database in it. It is mearly reading in txt files that match a pattern
string[] fileNames = Directory.GetFiles(importDirectory, "BucketHistory*.txt")
I'll do some more digging tomorrow, it's late now, and I have no idea what is causing it.
Any pointers ??!
Turns out I was having a bit of brain fade yesterday. Been working too long hours !
For anyone interested, the problem was that I was opening a connection, then copying the file and running a shrink whilst the connection was still open. It had nothing to do with that line of code.
I would have expected the copy to have thrown an exception, but it didn't appear to. Oh, and opening another connection inside the using statement of the first one. Sigh.
Related
After a server crash, I get a weird problem concerning database fixup. The console constantly throws a block of errors "Error checking database File does not exist" I did not find any databases with these names.
Here is an image as I am notz allowed to directly include pics:
https://pbs.twimg.com/media/CA87BQfUcAA21Cq.png:large
Where does domino know which databases to fixup?
How may I get rid of these errors?
Any idea appreciated.
Rene
Apparently I found a clue, myself:
http://www-01.ibm.com/support/docview.wss?uid=swg1LO78425
So, my next steps were fixup -j & compact on command line level without the server being up. Also, I deleted the dbdirman.nsf as suggested by Torsten.
I stumbled over a corrrupt database which caused a crash of the fixup. After moving the DB and recreating it from backup, the server could be started without an issue.
For now, the problem seems to be solved.
I have a package with a ForEach Loop Container that is looping through Excel files in directory. Everything is fine until I add #User::Excel to the expressions box in the ExcelFile Path connection manager properties. Then I always get this error:
...DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER......failed with error code 0xC02020096...
I have been dealing with this all day yesterday and this error is killing my deadline. I have everything setup just like any other package I have run with ForLoop and Excel. Why is this time giving me so many problems?
May someone please guide me through some troubleshooting? I have tried everything I know.
Apparantly the package didn't like my ForEach Loop container in a Sequence Container...took the loop out of the Sequence Container, reconfigured, put back in the Sequence Container and worked fine.
Moving my project from my local (osx) development to (debian) production put's me in some erros. Everything works wel on my local dev but on the debian two things goes wrong.
My layout.phtml won't render (no error) and I get this error for partial loops.
Paste of error output:
http://pastebin.com/74g1dL8g
Thanks! :)
nick
As Error states.
"Rows as part of this DataSource, with type object cannot be cast to an array".
You must have moved your database with structure only option without data. In your code somewhere, you have not place empty checks to verify dataset or records. I think it is trying to caste empty object into array....
You need to debug your application either using XDebug which provides step-by-step debugging, and can be used with eclipse PDT, netbeans and even vim.
Or
use old fashioned way
echo "programing working to till this line";
exit();
I am having a problem with a workbook. It works fine on my machine but when it is run by someone else it is giving a problem with an error message "Compile error can't find project or library"- thing is, it is doing it on a Mid$ string command!
Anyone know what could cause this? Is there a setting they need somewhere? The code was written in Excel 2010 and they are running Excel 2010
This is caused when you have a missing reference. Have a look in Tools > References on the machines that are throwing the error. You should see that certain references are prefixed with MISSING.
These libraries will need to be installed on the other machines in order to use them, alternatively, you could try late binding if they have an earlier version of the reference you are using.
If the above doesn't work, I have experienced this problem when there is a failed installation on the machine. None of the references are missing, but upon opening Excel a (usually unrelated) application gets stuck in a failed install loop. If this is what is happening, you'll need to rectify the failed installation.
I have an app that has been running fine on the iPhone simulator for some time. Recently, I decided I wanted to re-use the data model and related classes in another project - so I dragged them from this project window to the other then told Xcode not to copy, just to make references. At first this didn't work so I jumped through a number of hoops to try to fix it (I may be asking more about that in another post). After all this, I re-compiled and tried to run the original app -- and it's not working any more. On further investigation, I discovered that when I re-compile the original app, I end up with a bundle that contains a .momd package but it contains only a Versioninfo.plist file - no .mom file, no .omo file like I'm expecting to see. I don't recall making any changes to the original app. I don't get any warnings. I just get an incomplete .momd package (and, not surprisingly, my app now crashes).
What's going on here?
BTW, the app now crashes with this message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Which I get when executing this line of code:
self.productRegistry = [[UIManagedDocument alloc] initWithFileURL:self.productRegistryURL];
I figured this out by looking more closely at the file locations in the project directory using Finder. In the Xcode window, everything looks normal but in the actual project directory I found that the .datamodeld package had ended up at the top level of the project directory -- at the same level as the project package itself. Xcode apparently did not like this but unfortunately it did not complain -- it just created a partial build output. Once I moved the .datamodeld package into the same folder as the rest of the project's code, everything worked just fine.
This would appear to be just a quirk. I would expect that Xcode would either see that all is well and build correctly OR it would see that things weren't quite as they should be and fail. In this case, it did not build correctly but was silent about it.
Hope this answer helps someone else someday.