My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label fatal. Show all posts
Showing posts with label fatal. Show all posts

Friday, March 24, 2017

Fatal: bad Object error in Git cherry-pick - Why Exception is thrown during cherry picking in Git ? *

In one of my earlier blog post, I explained how to cherry-pick in Git. To understand more about what does cherry picking a commit in git mean and how to do it, refer:
W3LC: Git Cherry Pick Command Tutorial

This post is to deal a situation when you get a fatal error in your attempt to cherry pick. The error is as follows:
"fatal: bad object"

So here I would like to explain why this occurs. The cause is that there is no information about remote branch on your local system.

Technically, if the branch is not locally present - you don't have the right data. You will errors like " fatal: bad object "

Solution:
To solve this you first need to fetch information on your local system. To do this use fetch command of Git.

1. fetch just the one remote
git fetch
2. or fetch from all remotes
git fetch --all

Here we should take a short break and understand what is Git Fetch command:

W3LC Definition: In the simplest terms, git pull does a git fetch followed by a git merge.
This means that the fetch operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. A git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches. This updating your other remote-tracking branches is called as fetch.


So, let us assume that you fetched the information about all branches.

Now, make sure you're back on the branch you want to cherry-pick to. And use the git cherry-pick command again. Example:
git cherry-pick 9505ac61c924de0bba404f40f8abdc53af1909d8

Great. Now it should work!


Do also read if you want to change the name of your git branch. The process to do so is explained fully on my earlier blog post:
W3LC: Git Rename a Branch Name

Tuesday, April 26, 2011

Visual Studio C++ : fatal error C1902: Program database manager mismatch

Visual C++ gave to me an error which I didn’t see earlier. It was a fatal error. The error message was:
“fatal error C1902: Program database manager mismatch; please check your installation”


In order to solve this issue do the following steps:
1: Once you have installed VC++, goto the IDE folder of the Visual Studio 2005 install. It is usually at
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
2: Copy these 3 files:

mspdb80.dll
mspdbcore.dll
mspdbsrv.exe

Copy these to the "\VC\bin" directory of the Visual Studio 2008 installation. It is usually at
"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"

You can find related article at Softpedia Article
Detailed description of this problem and causes can also be found on Fatal Error C1902 provided by MSDN Community Content - Visual C++.

This would solve the problem. The reason of the error is that the vesrion of these files especially in the 2008 edition are mismatching and do not have compatibility with each other. The program database file (.pdb) were created using a newer version of mspdbXX.dll [eg. Mspdb70.dll]. This may not be the one with the compiler found on your system. This error usually indicates that mspdbsrv.exe or mspdbcore.dll are missing. Also there is a chance that they have different versions than mspdbXX.dll. So the solution would be ensuring that the same versions of mspdbsrv.exe, mspdbcore.dll, and mspdbXX.dll are present on your installed file system. This is small step but if this workaround is not known, it would waste your time in installing, reinstalling Visual C++. Hope this helps if ever you fall into this trap. ;) Enjoy.