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

Visual C++ Discussion :

Plantage de la version Release sous .NET


Sujet :

Visual C++

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    24
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 24
    Par défaut Plantage de la version Release sous .NET
    Bonjour

    Je fais la migration d'un projet de Visual C++V6 vers .NET 2005.
    PC: Windows XP SP2.

    Avant sous VC6: execution Debug et Release = OK
    Apres sous .NET: execution Debug = OK, Release = KO

    Dans le projet Release, j'ai activé Map Exports et Debuggablr Assembly pour avoir un minimum d'info.

    ===============================================
    Voici la stack:
    ntdll.dll!7c9112b4()
    [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
    kernel32.dll!7c80e2c5()
    kernel32.dll!7c80b53c()
    SDK.exe!CDllIsolationWrapperBase::GetModuleHandleA() + 0x13 bytes C++
    SDK.exe!CComCtlWrapper::GetProcAddress_ImageList_Create() Line 242 + 0x13 bytes C++
    SDK.exe!CComCtlWrapper::_ImageList_Create(int cx=0x00000010, int cy=0x00000010, unsigned int flags=0x00000001, int cInitial=0x00000019, int cGrow=0x00000019) Line 242 + 0x43 bytes C++
    SDK.exe!AfxImageList_Create(int cx=0x00000010, int cy=0x00000010, unsigned int flags=0x00000001, int cInitial=0x00000019, int cGrow=0x00000019) Line 39 + 0x21 bytes C++
    SDK.exe!CImageList::Create(int cx=0x00000010, int cy=0x00000010, unsigned int nFlags=0x00000001, int nInitial=0x00000019, int nGrow=0x00000019) Line 1355 + 0x16 bytes C++
    SDK.exe!CMyApp::InitInstance() + 0xec bytes C++
    > SDK.exe!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00161efd, int nCmdShow=0x00000001) Line 37 + 0x7 bytes C++
    SDK.exe!__tmainCRTStartup() Line 315 + 0x1c bytes C
    kernel32.dll!7c816d4f()
    kernel32.dll!7c8399f3()
    ===============================================
    Output:
    'SDK.exe': Loaded 'K:\SDK\SDK.exe', Symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\winspool.drv', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\oledlg.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\EntAPI.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\psapi.dll', No symbols loaded.
    'SDK.exe': Loaded 'C:\WINDOWS\system32\netapi32.dll', No symbols loaded.
    'SDK.exe': Unloaded 'C:\WINDOWS\system32\EntAPI.dll'
    'SDK.exe': Unloaded 'C:\WINDOWS\system32\netapi32.dll'
    'SDK.exe': Unloaded 'C:\WINDOWS\system32\psapi.dll'
    'SDK.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
    First-chance exception at 0x7c9112b4 in SDK.exe: 0xC0000005: Access violation reading location 0x30000000.
    Unhandled exception at 0x7c9112b4 in SDK.exe: 0xC0000005: Access violation reading location 0x30000000.
    ===============================================

    Une idée?
    Une méthode pour touver le pb?
    Des outils?

    Merci

  2. #2
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Par défaut
    salut,
    ton ancien projet projet ne redéfinit par l'alignement des membres d'une structure par hasard ? (/zp)

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    24
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 24
    Par défaut
    salut,

    Lorsque j'ai fait la migration, j'ai pris le repertoire telquel, et j'ai ouvert Visual .NET 2005 avec le fichier dsw, et j'ai laissé faire.

    Pour les settings, j'ai Struct Memeber Alignment à 1 byte (/Zp1) aussi bien sous CV6 que sous .NET 2005.

    Y-a-t-il un autre endroit dans le projet (setting ou code source) à vérifier pour l'alignement des structures?

    Merci

  4. #4
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Par défaut
    bon c'est bien ce qu'il me semblait...
    je suis tombé dedans et j'ai mis longtemps a comprendre que c'était ça.
    voir mon tuto migration vc6 vc2005
    les MFC 8.0 ne supportent pas (plus) le changement d'alignement sur le programme ,celui-ci doit rester reglé à defaut.
    sinon tu auras des plantages en sortant en rapport avec cimagelist...
    la solution :
    entourer tes structures (uniquement) de :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    #pragma pack(push,1)
    // ma structure
     
    #pragma pack(pop)

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    24
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 24
    Par défaut
    C'est fait. Settings à Default.

    Encore merci

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Sur quelle version du framework .Net se base Delphi 2006
    Par scornille dans le forum Delphi .NET
    Réponses: 1
    Dernier message: 14/10/2005, 23h31
  2. Réponses: 3
    Dernier message: 18/08/2005, 10h17
  3. [MFC]Problème Version Release
    Par jagboys dans le forum MFC
    Réponses: 8
    Dernier message: 29/07/2005, 07h45
  4. Gravure de CD avec IMAPI en C++ sous .net
    Par ReZeDa dans le forum MFC
    Réponses: 6
    Dernier message: 08/04/2004, 23h57
  5. Ma version release ne fonctionne pas
    Par totof42 dans le forum C++Builder
    Réponses: 2
    Dernier message: 25/11/2003, 13h15

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