Trouble, unemployment is actually probably the biggest factor, aside culture diffrences.
Read carefully. I m gonna use Germany as example as it is best to do.
----------------------------------------------------------------------------------
Situation now:
Germany is one of main countries in Europe, with leading incomes and generally good working industry and business.
Germany is full of people in productive age, working and paying taxes. Taxes paid allow germans to have big social care and refounds.
----------------------------------------------------------------------------------
Situation in 20-30 years future, if hypotetically muslim take more or less 40% population:
Germany isn't stong anymore. Mostly of immigrants (who were accepted and let in in 2015/2016) have many kids, who have another loads of kids. They do not work, only are on social care.
Overal amount people in productive age is reduced. Less people work, so less people pay taxes. Less taxes paid, lead to situation where country budget isn't that big as before.
Social care and other refounds are taken from constantly decreasing budget. Goes like that for few years. At some point taxes income isn't big enough to make sure social care and other refounds be keep on. Social is decreased. People who were on it, are getting angry. We talk about huge amount of people. At some point social is so low or totally taken out. These unhappy people masses go out on streets, demand getting social back. Government can't do it, coz country budget isn't enough for it. People co crazy and start riots, they say they are threaten bad and so on.
----------------------------------------------------------------------------------
This is one of main problems with immigrants. Not terrorism, coz it can be done by anyone.
Look on example of USA, it was made mostly by immigrants, but due to lack of social care, they were forced to start working.
The only right choice it to take immigrants, BUT do not give them any financial help. They have to work their stay here, not just comming for money.
As You said, such situation isn't big problem in Grece, Poland, Hungary and so on. Thats coz we have extremally low money offered in social care.
There were group of immigrants we helped them here. They had home, food and basics to live. You know what they did after 2 weeks? Escaped to Germany.
They were totally save here, coz no war all around, but just not enough money given. One of them, when found out he is gonna be located in Poland, said that "if this is case, then I'mma back to Siria/Turkey". Some escape war, agree but mostly just go to rich countries, thats all. Grece, Italy, Hungary or ex-soviet block isn't intresting place for them. They aim Germany, France, UK or north, scandinavian countries - Norway, Sweden.