Projet

Général

Profil

Bug #3992

Redémarrage windows suite switch serveur

Ajouté par Icham Sirat il y a plus de 9 ans. Mis à jour il y a plus de 9 ans.

Statut:
Rejected - Rejeté
Priorité:
Normale
Assigné à:
Icham Sirat
Version cible:
Début:
02/12/2014
Echéance:
% réalisé:

100%

Temps estimé:
1.00 h

Description

Le redémarrage se fait trop rapidement parfois et on a deux processus qui se font concurrence -> obligé de les tuer en passant par le gestionnaire des tâches.

Historique

#1 Mis à jour par Icham Sirat il y a plus de 9 ans

Bon ça fonctionne sous QtCreator, puis ça ne fonctionne plus lorsque le code est compilé et installé (avec un paquet normal).

J'ai fait quelques tests et maintenant l'appli crash sur la construction de l'AbulEduNetworkManagerV1.
Après quelques recherches, il est possible que le QNetWorkAccessManager soit bloquant et empêche le redémarrage :

http://stackoverflow.com/questions/23302930/qnetworkaccessmanager-get-method-crashes-on-restart?lq=1

Voici le copié-collé de la partie importante du thread :

I've done some investigation on the crash. It's indeed caused by destruction of QApplication. QNetworkAccessManager internally uses a QNetworkConfigurationManagerPrivate object. This object is created when needed and used until the application finishes. The qNetworkConfigurationManagerPrivate function is used to create or get existing object.

When QApplication is destroyed, it executes all post routines, including connManager_cleanup. This function indirectly destroys QNetworkConfigurationManagerPrivate object and sets appShutdown local flag. When this flag is set, qNetworkConfigurationManagerPrivate function will not create new QNetworkConfigurationManagerPrivate objects anymore. So after destruction of QApplication QNetworkAccessManager becomes non-functional.

I thought it's a misuse of QApplication object, but recently I found a proof link that the use is correct.

Qt's Coding Conventions state:

Q[Core]Application is a singleton class. There can only be one instance at a time. However, that instance can be destroyed and a new one can be created.

So this issue should be considered a Qt bug.

#2 Mis à jour par Icham Sirat il y a plus de 9 ans

suite à cette découverte, je supprime la feature du redémarrage.
A implémenter :
+ feed back sur la fermeture de l'appli
+ demande de redémarrage.

#3 Mis à jour par Icham Sirat il y a plus de 9 ans

  • Statut changé de Assigned - En cours à Rejected - Rejeté
  • Priorité changé de Haute à Normale
  • % réalisé changé de 0 à 100

Formats disponibles : Atom PDF

Redmine Appliance - Powered by TurnKey Linux