IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage C++ Discussion :

Crash depuis cet après midi.


Sujet :

Langage C++

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Invité
    Invité(e)
    Par défaut Crash depuis cet après midi.
    Salut, j'ai un crash depuis cet après midi, pourtant je n'ai pas modifié mon code depuis et ce matin ça marchait.

    Voici ce que m'indique valgrind :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
     
    ==11959== Invalid read of size 1
    ==11959==    at 0x4C2E0F4: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==11959==    by 0x6486160: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
    ==11959==    by 0x4523C8: odfaeg::network::Network::sendPbKey(odfaeg::network::User&) (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x44F575: odfaeg::network::SrkServer::checkMessages() (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x4330F1: odfaeg::core::Application::exec() (application.h:84)
    ==11959==    by 0x432E1A: main (main.cpp:4)
    ==11959==  Address 0xc278f50 is 0 bytes after a block of size 32 alloc'd
    ==11959==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==11959==    by 0x44AA48: odfaeg::network::AES_ENC::AES_ENC() (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x4312A8: _GLOBAL__sub_I_symEncPacket.cpp (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x4DF14C: __libc_csu_init (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x6C6FE54: (below main) (libc-start.c:246)
    ==11959== 
    ==11959== Conditional jump or move depends on uninitialised value(s)
    ==11959==    at 0x4C2E0F8: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==11959==    by 0x6486160: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
    ==11959==    by 0x452407: odfaeg::network::Network::sendPbKey(odfaeg::network::User&) (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x44F575: odfaeg::network::SrkServer::checkMessages() (in /home/laurent/Développement/Projets-c++/ODFAEGVIDEOTUTORIAL/bin/Debug/ODFAEGVIDEOTUTORIAL)
    ==11959==    by 0x4330F1: odfaeg::core::Application::exec() (application.h:84)
    ==11959==    by 0x432E1A: main (main.cpp:4)
    ==11959== 
    client connected!
    ==11959== Jump to the invalid address stated on the next line
    ==11959==    at 0x3F800000: ???
    ==11959==  Address 0x3f800000 is not stack'd, malloc'd or (recently) free'd
    ==11959== 
    ==11959== 
    ==11959== Process terminating with default action of signal 11 (SIGSEGV)
    ==11959==  Access not within mapped region at address 0x3F800000
    ==11959==    at 0x3F800000: ???
    ==11959==  If you believe this happened as a result of a stack
    ==11959==  overflow in your program's main thread (unlikely but
    ==11959==  possible), you can try to increase the size of the
    ==11959==  main thread stack using the --main-stacksize= flag.
    ==11959==  The main thread stack size used in this run was 8388608.
    ==11959== 
    ==11959== HEAP SUMMARY:
    ==11959==     in use at exit: 2,448,804 bytes in 4,056 blocks
    ==11959==   total heap usage: 10,013 allocs, 5,957 frees, 3,926,877 bytes allocated
    ==11959== 
    ==11959== LEAK SUMMARY:
    ==11959==    definitely lost: 2,540 bytes in 14 blocks
    ==11959==    indirectly lost: 0 bytes in 0 blocks
    ==11959==      possibly lost: 18,759 bytes in 254 blocks
    ==11959==    still reachable: 2,427,505 bytes in 3,788 blocks
    ==11959==         suppressed: 0 bytes in 0 blocks
    ==11959== Rerun with --leak-check=full to see details of leaked memory
    ==11959== 
    ==11959== For counts of detected and suppressed errors, rerun with: -v
    ==11959== Use --track-origins=yes to see where uninitialised values come from
    ==11959== ERROR SUMMARY: 5 errors from 3 contexts (suppressed: 1 from 1)
    Processus arrêté

  2. #2
    Membre émérite
    Avatar de Daïmanu
    Homme Profil pro
    Développeur touche à tout
    Inscrit en
    Janvier 2011
    Messages
    736
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur touche à tout

    Informations forums :
    Inscription : Janvier 2011
    Messages : 736
    Par défaut
    Bonsoir.

    Sans code c'est difficile de dire ce qui cloche.
    Mais dans le log, il est question de network, peut être le problème vient du réseau ?

  3. #3
    Expert éminent
    Avatar de koala01
    Homme Profil pro
    aucun
    Inscrit en
    Octobre 2004
    Messages
    11 644
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : Belgique

    Informations professionnelles :
    Activité : aucun

    Informations forums :
    Inscription : Octobre 2004
    Messages : 11 644
    Par défaut
    Salut,

    Heu, tu as pensé à la solution universelle : le débuggeur ???

    Car, sans le code qui reproduit l'erreur, il sera difficile de te venir en aide.

    Et, comme il s'agit d'un crash sauvage, j'aurais tendance à croire que tu fais encore de la semoule avec tes pointeurs, ce qui tendrait, en plus à faire en sorte que l'erreur réelle se trouve en réalité bien loin de l'endroit où le crash se produit
    A méditer: La solution la plus simple est toujours la moins compliquée
    Ce qui se conçoit bien s'énonce clairement, et les mots pour le dire vous viennent aisément. Nicolas Boileau
    Compiler Gcc sous windows avec MinGW
    Coder efficacement en C++ : dans les bacs le 17 février 2014
    mon tout nouveau blog

  4. #4
    Invité
    Invité(e)
    Par défaut
    Salut,

    Heu, tu as pensé à la solution universelle : le débuggeur ???

    Car, sans le code qui reproduit l'erreur, il sera difficile de te venir en aide.

    Et, comme il s'agit d'un crash sauvage, j'aurais tendance à croire que tu fais encore de la semoule avec tes pointeurs, ce qui tendrait, en plus à faire en sorte que l'erreur réelle se trouve en réalité bien loin de l'endroit où le crash se produit
    Le débuggeur ne m'indique rien. (Il ne m'indique pas le nom de la fonction qui plante)

  5. #5
    Expert éminent

    Femme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    5 202
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 5 202
    Par défaut
    tu as bien compilé avec les informations de débug (-g pour gcc)?

  6. #6
    Invité
    Invité(e)
    Par défaut
    Oui.

Discussions similaires

  1. [forum] Suractivité de la Taverne le vendredi après midi
    Par haltabush dans le forum La taverne du Club : Humour et divers
    Réponses: 34
    Dernier message: 19/10/2007, 16h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo