I also had a same issue. I was in UAE 2008-2009, mid of 2009 i lost my job due to financial crisis.

What my employer told to me, they ask me to leave from the uae without canceling the visa.I had some outstanding credit card payments. I could not able to pay my credit cards outstanding amount is AED 35k. without paying i was exit.

After two months later i came to Qatar as a business visa. finally i was manage to find the new job and submit my all the documents to arrange the Qatar Resident permit. at that time i'm out of UAE more than 7 months.

What Ministry of interior said to me. first i have to cancel my UAE resident visa. UAE Resident permit is valid 3 years. To cancel the UAE Resident permit i have to settle all my outstanding credit cards. After settle all the credit cards and i was managed to cancel the UAE visa.

After that my company was arrange Qatar Resident permit.