Bonjour,

J'ai un probleme avec mon threads , a la fermeture du programme le threads s'arrête avec un segfault que je lance le thread avec la sdl ou pthread ....
Ici les dernier souffle du debugger:

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
55
56
57
58
59
In SDL_Delay () (D:\CodeBlocks\projets\34\bin\Debug\SDL.dll)
In SDL_SemPost () (D:\CodeBlocks\projets\34\bin\Debug\SDL.dll)
In msvcrt!free () (C:\Windows\syswow64\msvcrt.dll)
In msvcrt!memset () (C:\Windows\syswow64\msvcrt.dll)
In msvcrt!free () (C:\Windows\syswow64\msvcrt.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!ZwAccessCheckByTypeAndAuditAlarm () (C:\Windows\system32\ntdll.dll)
In ntdll!AlpcMaxAllowedMessageLength () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlSidHashLookup () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!TpReleaseTimer () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrAddRefDll () (C:\Windows\system32\ntdll.dll)
In ntdll!TpReleaseTimer () (C:\Windows\system32\ntdll.dll)
In ntdll!TpDbgSetLogRoutine () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!CsrAllocateCaptureBuffer () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlCreateUserStack () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlGetDaclSecurityDescriptor () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlImageRvaToSection () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlGetDaclSecurityDescriptor () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlCreateUserStack () (C:\Windows\system32\ntdll.dll)
In ntdll!CsrAllocateCaptureBuffer () (C:\Windows\system32\ntdll.dll)
In ntdll!TpQueryPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlValidateHeap () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!ZwAccessCheckByTypeAndAuditAlarm () (C:\Windows\system32\ntdll.dll)
In ntdll!AlpcMaxAllowedMessageLength () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlGetThreadPreferredUILanguages () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!ZwAccessCheckByTypeAndAuditAlarm () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlEncodePointer () (C:\Windows\system32\ntdll.dll)
In ntdll!ZwAccessCheckByTypeAndAuditAlarm () (C:\Windows\system32\ntdll.dll)
In ntdll!AlpcMaxAllowedMessageLength () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlImageRvaToSection () (C:\Windows\system32\ntdll.dll)
In ntdll!AlpcMaxAllowedMessageLength () (C:\Windows\system32\ntdll.dll)
In ntdll!ZwAccessCheckByTypeAndAuditAlarm () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlIdnToAscii () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlLeaveCriticalSection () (C:\Windows\system32\ntdll.dll)
In ntdll!AlpcMaxAllowedMessageLength () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlLeaveCriticalSection () (C:\Windows\system32\ntdll.dll)
In wcsnicmp () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlLeaveCriticalSection () (C:\Windows\system32\ntdll.dll)
In ntdll!EtwTraceEventInstance () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrGetDllHandleEx () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrLoadAlternateResourceModuleEx () (C:\Windows\system32\ntdll.dll)
Program received signal SIGSEGV, Segmentation fault.
In newton!NewtonCreateCompoundCollisionFromMesh () (D:\CodeBlocks\projets\34\bin\Debug\newton.dll)
Et la la fonction du thread:
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
int f_prepare (void* fpsetworld)
{
    argnewtonupdate* arg=(argnewtonupdate*)fpsetworld;
 
    while(!(*(arg->end)))
    {
        if(!(*(arg->pause)))
        {
            (*arg->progress) = IN_PROGRESS;
            SDL_framerateDelay ((arg->manager));
            NewtonUpdate ((arg->nWorld), 1.0f/80.0f);
        }
        else
        {
        SDL_Delay(50);
        }
        (*arg->progress) = IDLE;
    }
    return 0;
}
Je sèche complètement quelqu'un peut il m'aider ??

ps: a noter que je n'utilise pas la fonction NewtonCreateCompoundCollisionFromMesh () qui provoque la segfault dans mon programme.