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

Entrée/Sortie Java Discussion :

Plantage applet java à cause d'un socket


Sujet :

Entrée/Sortie Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 16
    Points : 11
    Points
    11
    Par défaut Plantage applet java à cause d'un socket
    Bonjour à tous,

    J'ai un petit souci sur un applet java que j'ai développé. Chez certains utilisateurs ma fonction qui se connecte au serveur pour récupèrer le résultat d'un script php (une chaine de caractères) plante le navigateur.

    Voici la fonction en question :

    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
     
      public String lectureUrl(String url){
            URL u ; 
            DataInputStream is ;
            try { 
                u = new URL(url);
                try { 
     
                    BufferedReader dis = new BufferedReader(new InputStreamReader(u.openStream()));
                    String tmp;
                    String ligne = "";
                    while((tmp = dis.readLine()) != null){
                        ligne = ligne + tmp;
                    }
     
     
                    dis.close();
                    return ligne;
                }
                catch (Exception e) {
                    e.printStackTrace(); 
                } 
            }
            catch (MalformedURLException e) {
                e.printStackTrace();
                return "";
            }
            return "";
        }
    En dépit de la gestion d'une éventuelle exception chez certains utilisateurs java se plante de temps en temps et le navigateur plante complètement et se ferme

    Je ne comprend pas pourquoi? Peut être est ce que je ne procède pas de façon sûre pour récupèrer le flux de caractères de l'url.

    Chez un utilisateur il y a carrément eu un log de généré suite à un plantage je le mets ici peut etre que ca peut vous aider pour comprendre d'où viens le problème

    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
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
     
    #
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x33256576, pid=3700, tid=3152
    #
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_10-b03 mixed mode, sharing)
    # Problematic frame:
    # C 0x33256576
    #
     
    --------------- T H R E A D ---------------
     
    Current thread (0x094c8618): JavaThread "Timer-121" [_thread_in_native, id=3152]
     
    siginfo: ExceptionCode=0xc0000005, reading address 0xffffffff
     
    Registers:
    EAX=0x25333100, EBX=0x0953af00, ECX=0x00000000, EDX=0x05e7ed08
    ESP=0x05e7ecf4, EBP=0x0a6ecae5, ESI=0x01c92470, EDI=0x01c92470
    EIP=0x33256576, EFLAGS=0x00010202
     
    Top of Stack: (sp=0x05e7ecf4)
    0x05e7ecf4: 74746575 42332565 42332532 32253331
    0x05e7ed04: 69726746 45434341 44455353 34314200
    0x05e7ed14: 70333225 7571616c 65747465 30423325
    0x05e7ed24: 31423325 46322533 6c697267 3325656c
    0x05e7ed34: 33253842 25333142 00003332 00000000
    0x05e7ed44: 00000004 84971aa0 0000403c 00000000
    0x05e7ed54: ffffffff 7c920732 7c9206ab 7c9206eb
    0x05e7ed64: 0608be81 00000088 00000000 00000024
     
    Instructions: (pc=0x33256576)
    0x33256566: cf 00 b7 af cf 00 b7 af cf 00 b7 af cf 00 b7 af
    0x33256576: cf 00 b7 af cf 00 b7 af cf 00 b7 af cf 00 b7 af
     
     
    Stack: [0x05d80000,0x05e80000), sp=0x05e7ecf4, free space=1019k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C 0x33256576
     
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.net.SocketOutputStream.socketWrite0(Ljava/io/FileDescriptor;[BII)V+0
    j java.net.SocketOutputStream.socketWrite([BII)V+44
    j java.net.SocketOutputStream.write([BII)V+4
    j java.io.BufferedOutputStream.flushBuffer()V+20
    j java.io.BufferedOutputStream.flush()V+1
    j java.io.PrintStream.flush()V+12
    j sun.net.www.MessageHeader.print(Ljava/io/PrintStream;)V+101
    j sun.net.www.http.HttpClient.writeRequests(Lsun/net/www/MessageHeader;Lsun/net/www/http/PosterOutputStream;)V+13
    j sun.net.www.protocol.http.HttpURLConnection.writeRequests()V+541
    j sun.net.www.protocol.http.HttpURLConnection.getInputStream()Ljava/io/InputStream;+264
    j java.net.URL.openStream()Ljava/io/InputStream;+4
    j JeuIHM.lectureUrl(Ljava/lang/String;)Ljava/lang/String;+14
    j TimerConnexionValidation.run()V+13
    J java.util.TimerThread.mainLoop()V
    v ~RuntimeStub::alignment_frame_return Runtime1 stub
    j java.util.TimerThread.run()V+1
    v ~StubRoutines::call_stub
     
    --------------- P R O C E S S ---------------
     
    Java Threads: ( => current thread )
    =>0x094c8618 JavaThread "Timer-121" [_thread_in_native, id=3152]
    0x08b29fb0 JavaThread "Timer-120" [_thread_in_native, id=3596]
    0x09489540 JavaThread "Timer-119" [_thread_in_native, id=3684]
    0x094d1488 JavaThread "Timer-118" [_thread_in_native, id=2840]
    0x094c8900 JavaThread "Timer-117" [_thread_in_native, id=1380]
    0x09468cd0 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=944]
    0x08b2ad50 JavaThread "Timer-116" [_thread_in_native, id=3032]
    0x094bcbd8 JavaThread "Timer-115" [_thread_in_native, id=3624]
    0x08aa7c60 JavaThread "Timer-7" [_thread_blocked, id=1192]
    0x08a3bcb8 JavaThread "Timer-6" [_thread_blocked, id=1200]
    0x0952e1d0 JavaThread "Timer-5" [_thread_in_native, id=3068]
    0x04ecbc58 JavaThread "Java Sound Event Dispatcher" daemon [_thread_blocked, id=3504]
    0x08b879f8 JavaThread "Timer-2" [_thread_blocked, id=2920]
    0x04ec5330 JavaThread "Timer-1" [_thread_blocked, id=3252]
    0x04eb5b30 JavaThread "Timer-0" [_thread_in_native, id=2720]
    0x04e9ed98 JavaThread "AWT-EventQueue-2" [_thread_in_native, id=3008]
    0x04ec6d28 JavaThread "TimerQueue" daemon [_thread_blocked, id=2984]
    0x04eb56b8 JavaThread "thread applet-Room.class" [_thread_blocked, id=2916]
    0x08a04220 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=1712]
    0x089e6ba0 JavaThread "AWT-Shutdown" [_thread_blocked, id=2764]
    0x089e9e58 JavaThread "traceMsgQueueThread" daemon [_thread_blocked, id=1076]
    0x089e6fc0 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3292]
    0x089e5a48 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2960]
    0x04e99340 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4048]
    0x04e97f18 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2912]
    0x04e97290 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2996]
    0x04e92608 JavaThread "Finalizer" daemon [_thread_blocked, id=2908]
    0x04e91b30 JavaThread "Reference Handler" daemon [_thread_blocked, id=524]
    0x04dede58 JavaThread "main" [_thread_in_native, id=772]
     
    Other Threads:
    0x04de2530 VMThread [id=244]
    0x04de71e8 WatcherThread [id=2972]
     
    VM state:not at safepoint (normal )
     
    VM Mutex/Monitor currently owned by a thread: None
     
    Heap
    def new generation total 1408K, used 1013K [0x20a80000, 0x20c00000, 0x211e0000)
    eden space 1280K, 78% used [0x20a80000, 0x20b79eb0, 0x20bc0000)
    from space 128K, 10% used [0x20bc0000, 0x20bc3850, 0x20be0000)
    to space 128K, 0% used [0x20be0000, 0x20be0000, 0x20c00000)
    tenured generation total 15644K, used 9502K [0x211e0000, 0x22127000, 0x26a80000)
    the space 15644K, 60% used [0x211e0000, 0x21b27808, 0x21b27a00, 0x22127000)
    compacting perm gen total 8192K, used 2920K [0x26a80000, 0x27280000, 0x2aa80000)
    the space 8192K, 35% used [0x26a80000, 0x26d5a2a8, 0x26d5a400, 0x27280000)
    ro space 8192K, 63% used [0x2aa80000, 0x2af8eda8, 0x2af8ee00, 0x2b280000)
    rw space 12288K, 46% used [0x2b280000, 0x2b8212b8, 0x2b821400, 0x2be80000)
     
    Dynamic libraries:
    0x00400000 - 0x00419000 C:\Program Files\Internet Explorer\iexplore.exe
    0x7c910000 - 0x7c9c7000 C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c904000 C:\WINDOWS\system32\kernel32.dll
    0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll
    0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll
    0x77ef0000 - 0x77f37000 C:\WINDOWS\system32\GDI32.dll
    0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
    0x77da0000 - 0x77e4c000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77e50000 - 0x77ee1000 C:\WINDOWS\system32\RPCRT4.dll
    0x77720000 - 0x7788f000 C:\WINDOWS\system32\SHDOCVW.dll
    0x779e0000 - 0x77a76000 C:\WINDOWS\system32\CRYPT32.dll
    0x77a80000 - 0x77a92000 C:\WINDOWS\system32\MSASN1.dll
    0x76610000 - 0x76694000 C:\WINDOWS\system32\CRYPTUI.dll
    0x76be0000 - 0x76c0e000 C:\WINDOWS\system32\WINTRUST.dll
    0x76c40000 - 0x76c68000 C:\WINDOWS\system32\IMAGEHLP.dll
    0x770e0000 - 0x7716c000 C:\WINDOWS\system32\OLEAUT32.dll
    0x774a0000 - 0x775dd000 C:\WINDOWS\system32\ole32.dll
    0x6fee0000 - 0x6ff34000 C:\WINDOWS\system32\NETAPI32.dll
    0x77aa0000 - 0x77b47000 C:\WINDOWS\system32\WININET.dll
    0x76f10000 - 0x76f3d000 C:\WINDOWS\system32\WLDAP32.dll
    0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
    0x77390000 - 0x77493000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x7c9d0000 - 0x7d1f3000 C:\WINDOWS\system32\SHELL32.dll
    0x58b50000 - 0x58bea000 C:\WINDOWS\system32\comctl32.dll
    0x5b090000 - 0x5b0c8000 C:\WINDOWS\system32\uxtheme.dll
    0x10000000 - 0x10007000 C:\Program Files\Logitech\MouseWare\System\LgWndHk.dll
    0x75f10000 - 0x7600d000 C:\WINDOWS\system32\BROWSEUI.dll
    0x20000000 - 0x20013000 C:\WINDOWS\system32\browselc.dll
    0x77b50000 - 0x77b72000 C:\WINDOWS\system32\appHelp.dll
    0x76f80000 - 0x76fff000 C:\WINDOWS\system32\CLBCATQ.DLL
    0x77000000 - 0x770d4000 C:\WINDOWS\system32\COMRes.dll
    0x7df30000 - 0x7dfd0000 C:\WINDOWS\system32\urlmon.dll
    0x765b0000 - 0x76606000 C:\WINDOWS\System32\cscui.dll
    0x76590000 - 0x765ad000 C:\WINDOWS\System32\CSCDLL.dll
    0x778e0000 - 0x779d8000 C:\WINDOWS\system32\SETUPAPI.dll
    0x00b00000 - 0x00b0e000 C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroIEHelper.dll
    0x7c340000 - 0x7c396000 C:\WINDOWS\system32\MSVCR71.dll
    0x6d600000 - 0x6d66a000 C:\Program Files\Java\jre1.5.0_10\bin\ssv.dll
    0x5f140000 - 0x5f157000 C:\WINDOWS\system32\OLEPRO32.DLL
    0x00d10000 - 0x01052000 c:\program files\google\googletoolbar4.dll
    0x745e0000 - 0x748a6000 C:\WINDOWS\system32\msi.dll
    0x76ae0000 - 0x76b0f000 C:\WINDOWS\system32\WINMM.dll
    0x71a10000 - 0x71a1a000 C:\WINDOWS\system32\WSOCK32.dll
    0x719f0000 - 0x71a07000 C:\WINDOWS\system32\WS2_32.dll
    0x719e0000 - 0x719e8000 C:\WINDOWS\system32\WS2HELP.dll
    0x76320000 - 0x7633d000 C:\WINDOWS\system32\IMM32.dll
    0x76310000 - 0x76315000 C:\WINDOWS\system32\MSIMG32.dll
    0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
    0x77210000 - 0x772c1000 C:\WINDOWS\system32\SXS.DLL
    0x01900000 - 0x0198e000 C:\WINDOWS\system32\shdoclc.dll
    0x01990000 - 0x01c6a000 C:\WINDOWS\system32\xpsp2res.dll
    0x75d30000 - 0x75dc1000 C:\WINDOWS\system32\mlang.dll
    0x01c70000 - 0x01c98000 C:\WINDOWS\system32\lspcs.dll
    0x71990000 - 0x719d0000 C:\WINDOWS\system32\mswsock.dll
    0x62e40000 - 0x62e99000 C:\WINDOWS\system32\hnetcfg.dll
    0x719d0000 - 0x719d8000 C:\WINDOWS\System32\wshtcpip.dll
    0x76e90000 - 0x76ecc000 C:\WINDOWS\system32\RASAPI32.DLL
    0x76e40000 - 0x76e52000 C:\WINDOWS\system32\rasman.dll
    0x76e60000 - 0x76e8f000 C:\WINDOWS\system32\TAPI32.dll
    0x76e30000 - 0x76e3e000 C:\WINDOWS\system32\rtutils.dll
    0x01cb0000 - 0x01cb7000 C:\Program Files\Logitech\iTouch\iTchHk.dll
    0x77c40000 - 0x77c63000 C:\WINDOWS\system32\msv1_0.dll
    0x76d10000 - 0x76d29000 C:\WINDOWS\system32\iphlpapi.dll
    0x72220000 - 0x72225000 C:\WINDOWS\system32\sensapi.dll
    0x76960000 - 0x76a15000 C:\WINDOWS\system32\USERENV.dll
    0x02810000 - 0x0282e000 C:\Program Files\Fichiers communs\Logitech\Scrolling\LgMsgHk.dll
    0x76ed0000 - 0x76ef7000 C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f76000 C:\WINDOWS\system32\rasadhlp.dll
    0x7dbf0000 - 0x7dee5000 C:\WINDOWS\System32\mshtml.dll
    0x02930000 - 0x02957000 C:\WINDOWS\System32\msls31.dll
    0x76ba0000 - 0x76bab000 C:\WINDOWS\System32\PSAPI.DLL
    0x66cc0000 - 0x66ccc000 C:\WINDOWS\system32\ImgUtil.dll
    0x5e680000 - 0x5e68c000 C:\WINDOWS\System32\pngfilt.dll
    0x03070000 - 0x0309a000 C:\WINDOWS\System32\msimtf.dll
    0x030a0000 - 0x030eb000 C:\WINDOWS\System32\MSCTF.dll
    0x18030000 - 0x1803b000 C:\Program Files\Network Associates\VirusScan\scriptproxy.dll
    0x12400000 - 0x12461000 C:\Program Files\Network Associates\VirusScan\mytilus.dll
    0x12580000 - 0x12588000 C:\Program Files\Network Associates\VirusScan\Res0C\McShield.dll
    0x12000000 - 0x122d3000 C:\Program Files\Fichiers communs\Network Associates\Engine\mcscan32.dll
    0x75be0000 - 0x75c4e000 C:\WINDOWS\system32\JScript.dll
    0x73250000 - 0x732b7000 C:\WINDOWS\system32\VBScript.dll
    0x73d20000 - 0x73e1e000 C:\WINDOWS\system32\MFC42.DLL
    0x61d70000 - 0x61d7e000 C:\WINDOWS\system32\MFC42LOC.DLL
    0x672b0000 - 0x672f0000 C:\WINDOWS\System32\iepeers.dll
    0x72f50000 - 0x72f76000 C:\WINDOWS\System32\WINSPOOL.DRV
    0x748f0000 - 0x749fe000 C:\WINDOWS\System32\msxml3.dll
    0x761c0000 - 0x76231000 C:\WINDOWS\System32\mshtmled.dll
    0x71a60000 - 0x71a72000 C:\WINDOWS\system32\MPR.dll
    0x75ef0000 - 0x75ef7000 C:\WINDOWS\System32\drprov.dll
    0x71b70000 - 0x71b7e000 C:\WINDOWS\System32\ntlanman.dll
    0x71c30000 - 0x71c47000 C:\WINDOWS\System32\NETUI0.dll
    0x71bf0000 - 0x71c30000 C:\WINDOWS\System32\NETUI1.dll
    0x71be0000 - 0x71be7000 C:\WINDOWS\System32\NETRAP.dll
    0x71b50000 - 0x71b63000 C:\WINDOWS\System32\SAMLIB.dll
    0x75f00000 - 0x75f09000 C:\WINDOWS\System32\davclnt.dll
    0x5a500000 - 0x5a52f000 C:\Program Files\MSN Messenger\fsshext.8.0.0812.00.dll
    0x78130000 - 0x781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\MSVCR80.dll
    0x4eb80000 - 0x4ed23000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82\gdiplus.dll
    0x73cc0000 - 0x73cd3000 C:\WINDOWS\System32\shgina.dll
    0x75900000 - 0x759f9000 C:\WINDOWS\system32\MSGINA.dll
    0x762f0000 - 0x76300000 C:\WINDOWS\system32\WINSTA.dll
    0x058d0000 - 0x0590d000 C:\WINDOWS\system32\ODBC32.dll
    0x76340000 - 0x7638a000 C:\WINDOWS\system32\comdlg32.dll
    0x05a10000 - 0x05a28000 C:\WINDOWS\system32\odbcint.dll
    0x72c70000 - 0x72c79000 C:\WINDOWS\system32\wdmaud.drv
    0x72c60000 - 0x72c68000 C:\WINDOWS\system32\msacm32.drv
    0x77bb0000 - 0x77bc5000 C:\WINDOWS\system32\MSACM32.dll
    0x77ba0000 - 0x77ba7000 C:\WINDOWS\system32\midimap.dll
    0x6d570000 - 0x6d582000 C:\Program Files\Java\jre1.5.0_10\bin\npjpi150_10.dll
    0x6d400000 - 0x6d417000 C:\Program Files\Java\jre1.5.0_10\bin\jpiexp32.dll
    0x76f60000 - 0x76f68000 C:\WINDOWS\System32\winrnr.dll
    0x6d450000 - 0x6d468000 C:\Program Files\Java\jre1.5.0_10\bin\jpishare.dll
    0x05fb0000 - 0x0614c000 C:\PROGRA~1\Java\JRE15~1.0_1\bin\client\jvm.dll
    0x6d280000 - 0x6d288000 C:\PROGRA~1\Java\JRE15~1.0_1\bin\hpi.dll
    0x05d70000 - 0x05d7c000 C:\PROGRA~1\Java\JRE15~1.0_1\bin\verify.dll
    0x6d300000 - 0x6d31d000 C:\PROGRA~1\Java\JRE15~1.0_1\bin\java.dll
    0x06150000 - 0x0615f000 C:\PROGRA~1\Java\JRE15~1.0_1\bin\zip.dll
    0x6d000000 - 0x6d169000 C:\Program Files\Java\jre1.5.0_10\bin\awt.dll
    0x736b0000 - 0x736f9000 C:\WINDOWS\system32\ddraw.dll
    0x73b10000 - 0x73b16000 C:\WINDOWS\system32\DCIMAN32.dll
    0x6d240000 - 0x6d280000 C:\Program Files\Java\jre1.5.0_10\bin\fontmanager.dll
    0x6d1f0000 - 0x6d203000 C:\Program Files\Java\jre1.5.0_10\bin\deploy.dll
    0x6d5b0000 - 0x6d5d3000 C:\Program Files\Java\jre1.5.0_10\bin\RegUtils.dll
    0x6d3e0000 - 0x6d3f5000 C:\Program Files\Java\jre1.5.0_10\bin\jpicom32.dll
    0x05cb0000 - 0x05ccf000 C:\WINDOWS\system32\xpsp3res.dll
    0x6d4c0000 - 0x6d4d3000 C:\Program Files\Java\jre1.5.0_10\bin\net.dll
    0x6d1c0000 - 0x6d1e3000 C:\Program Files\Java\jre1.5.0_10\bin\dcpr.dll
    0x6d4e0000 - 0x6d4e9000 C:\Program Files\Java\jre1.5.0_10\bin\nio.dll
     
    VM Arguments:
    jvm_args: -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0_1\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0_1\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0_10 -Djavaplugin.nodotversion=150_10 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0_1 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol -Djavaplugin.vm.options=-Djava.class.path=C:\PROGRA~1\Java\JRE15~1.0_1\classes -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0_1\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0_1\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0_10 -Djavaplugin.nodotversion=150_10 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0_1 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol vfprintf
    java_command: <unknown>
    Launcher Type: generic
     
    Environment Variables:
    PATH=C:\PROGRA~1\Java\JRE15~1.0_1\bin;C:\Program Files\Internet Explorer;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared;.
    USERNAME=Tchounette
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 8 Stepping 1, AuthenticAMD
     
     
     
    --------------- S Y S T E M ---------------
     
    OS: Windows XP Build 2600 Service Pack 2
     
    CPU:total 1 (cores per cpu 1, threads per core 1) family 6 8 stepping 1, cmov, cx8, fxsr, mmx, sse, mmxext, 3dnowext, 3dnow
     
    Memory: 4k page, physical 523760k(93444k free), swap 1279472k(737092k free)
     
    vm_info: Java HotSpot(TM) Client VM (1.5.0_10-b03) for windows-x86, built on Nov 9 2006 13:13:34 by "java_re" with MS VC++ 6.0

    Est ce que quelqu'un aurait une solution ou pourrait me dire ce que j'ai fais de faux dans ma fonction, parce que ce problème est en train de me rendre fou

  2. #2
    Expert confirmé
    Homme Profil pro
    Inscrit en
    Septembre 2006
    Messages
    2 937
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 2 937
    Points : 4 358
    Points
    4 358
    Par défaut
    Citation Envoyé par malag
    Bonjour à tous,

    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
     
     
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.net.SocketOutputStream.socketWrite0(Ljava/io/FileDescriptor;[BII)V+0
    j java.net.SocketOutputStream.socketWrite([BII)V+44
    j java.net.SocketOutputStream.write([BII)V+4
    j java.io.BufferedOutputStream.flushBuffer()V+20
    j java.io.BufferedOutputStream.flush()V+1
    j java.io.PrintStream.flush()V+12
    j sun.net.www.MessageHeader.print(Ljava/io/PrintStream;)V+101
    j sun.net.www.http.HttpClient.writeRequests(Lsun/net/www/MessageHeader;Lsun/net/www/http/PosterOutputStream;)V+13
    j sun.net.www.protocol.http.HttpURLConnection.writeRequests()V+541
    j sun.net.www.protocol.http.HttpURLConnection.getInputStream()Ljava/io/InputStream;+264
    j java.net.URL.openStream()Ljava/io/InputStream;+4
    j JeuIHM.lectureUrl(Ljava/lang/String;)Ljava/lang/String;+14
    j TimerConnexionValidation.run()V+13
    J java.util.TimerThread.mainLoop()V
    v ~RuntimeStub::alignment_frame_return Runtime1 stub
    j java.util.TimerThread.run()V+1
    v ~StubRoutines::call_stub

    Est ce que quelqu'un aurait une solution ou pourrait me dire ce que j'ai fais de faux dans ma fonction, parce que ce problème est en train de me rendre fou
    le plantage a lieu dans openStream suite - apparement - à l'envoi des headers de la requête au serveur…

    donc - a priori - ce n'est pas en regardant votre code que vous allez trouver la solution…

    est-ce que l'URL a quelque chose de particulier - par exemple https … - qui pourrait expliquer un comportement différent d'une machine à l'autre ?

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 16
    Points : 11
    Points
    11
    Par défaut
    Non l'url n'a rien de particulier, pas de https, j'appelle un script php de manière normale (http://www.xxxxxxxx/script.php)

    D'ailleurs les les utilisateurs ne plantent pas systématiquement à l'exécution de cette fonction mais de temps en temps. Donc je me demande si c'est pas une erreur de connexion qui déclenche ce plantage.
    Si c'est sur les headers alors là je ne comprendrai pas pourquoi ca ne planterait pas toujours.

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 16
    Points : 11
    Points
    11
    Par défaut
    Après reflexion j'appelle aussi cette fonction pour envoyer des messages sur un tchat.

    Et dans l'appel de mon url j'utilise des arguments en get ca peut venir de là peut etre ?


    Edit : voici un exemple d'url :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    "http://xxx.xxx.xxx.xxx/majChat3.php?salle=" + this.game.salle + "&id=" + this.game.id + "&message=" + URLEncoder.encode(mess, "UTF-8")  + "&login=" + this.login + "&lastId=" + id

  5. #5
    Expert confirmé
    Homme Profil pro
    Inscrit en
    Septembre 2006
    Messages
    2 937
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 2 937
    Points : 4 358
    Points
    4 358
    Par défaut
    Citation Envoyé par malag
    Après reflexion j'appelle aussi cette fonction pour envoyer des messages sur un tchat.

    Et dans l'appel de mon url j'utilise des arguments en get ca peut venir de là peut etre ?


    Edit : voici un exemple d'url :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    "http://xxx.xxx.xxx.xxx/majChat3.php?salle=" + this.game.salle + "&id=" + this.game.id + "&message=" + URLEncoder.encode(mess, "UTF-8")  + "&login=" + this.login + "&lastId=" + id

    étant donné que le problème se manifeste par un plantage de la JVM et non une simple exception Java, il faudrait tester le même code dans différents environnements (== autre JVM)…

    peut-être obtiendriez-vous une vraie exception Java qui pointerait alors sur la "vraie" source du problème… ou tout au moins une explication…

    mais si le résultat est que sous une autre JVM le programme fonctionne, cela voudra dire que vous avez trouvé un problème spécifique à la JVM qe vous utilisez (== bad news…)

  6. #6
    Expert éminent sénior
    Avatar de adiGuba
    Homme Profil pro
    Développeur Java/Web
    Inscrit en
    Avril 2002
    Messages
    13 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Java/Web
    Secteur : Transports

    Informations forums :
    Inscription : Avril 2002
    Messages : 13 938
    Points : 23 190
    Points
    23 190
    Billets dans le blog
    1
    Par défaut
    Salut,


    Ce serait bien que tu affiches l'URL ainsi généré, afin d'être sûr qu'elle soit bien correcte.

    Sinon deux remarques quand à ton code (mais normalement indépendante de ton problème) :
    1. Essaye de toujours fermer tes flux dans un bloc finally.
    2. Utilises un StringBuffer (ou StringBuilder à partir de Java 5.0) au lieu de faire des concaténations de chaines dans une boucle.


    Bref ta méthode devrait plus ressembler à ceci :
    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
    	public String lectureUrl(String url) {
    		try {
    			URL u = new URL(url);
    			BufferedReader dis = new BufferedReader(new InputStreamReader(u.openStream()));
    			try {
    				StringBuffer buffer = new StringBuffer();
    				String ligne;
    				while ((ligne = dis.readLine()) != null) {
    					buffer.append(ligne);
    				}
    				return buffer.toString();
    			} finally {
    				dis.close();
    			}
    		} catch (MalformedURLException e) {
    			e.printStackTrace();
    		} catch (IOException e) {
    			e.printStackTrace();
    		}
    		return "";
    	}
    a++

  7. #7
    Expert confirmé
    Homme Profil pro
    Inscrit en
    Septembre 2006
    Messages
    2 937
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 2 937
    Points : 4 358
    Points
    4 358
    Par défaut
    Citation Envoyé par adiGuba
    Salut,


    Ce serait bien que tu affiches l'URL ainsi généré, afin d'être sûr qu'elle soit bien correcte.
    bonne idée pour le debugging en effet,
    bien qu'une URL incorrecte de doit pas planter la JVM mais lever une exception Java bien propre…
    et que le stack trace du plantage montre que la parsing de l'URL a bien eut lieu… puisqu'on en est à l'envoi des headers…

  8. #8
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 16
    Points : 11
    Points
    11
    Par défaut
    étant donné que le problème se manifeste par un plantage de la JVM et non une simple exception Java, il faudrait tester le même code dans différents environnements (== autre JVM)…

    peut-être obtiendriez-vous une vraie exception Java qui pointerait alors sur la "vraie" source du problème… ou tout au moins une explication…

    mais si le résultat est que sous une autre JVM le programme fonctionne, cela voudra dire que vous avez trouvé un problème spécifique à la JVM qe vous utilisez (== bad news…)
    Sur mon pc le navigateur ne plante pas et pas d'exception dans la console, j'ai bien peur qu'il s'agisse d'un problème spécifique à la JVM alors

    Enfin j'ai encore peut être une piste avec les paramètre get que je passe dans l'url. Il pourrait peut être y avoir un problème d'encodae des accents. Ce qui pourrait expliquer que chez certains utilisateurs ca passe et d'autres pas.

    Ce serait bien que tu affiches l'URL ainsi généré, afin d'être sûr qu'elle soit bien correcte.
    Voici un exemple d'une url générée et qui pourrait peut etre posée problème (à cause des accents) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    majChatSalle3.php?salle=1&message=%5BLogin%3Adorothee%5D%5BLogin%3Adorothee%5DBonjour+Doroth%C3%A9e+-+On+s%27en+fait+1+%3F&login=craoutch&lastId=9920
    En fait c'est ce petit bout de code qui pourait peut etre posé problème :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    URLEncoder.encode(mess, "UTF-8")
    mess est un String qui récupère le contenu d'un JTextField (méthode getText());

    Peut etre un encodage particulier à spécifier pour le JTextField ????

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 16
    Points : 11
    Points
    11
    Par défaut
    Citation Envoyé par JeitEmgie
    bonne idée pour le debugging en effet,
    bien qu'une URL incorrecte de doit pas planter la JVM mais lever une exception Java bien propre…
    et que le stack trace du plantage montre que la parsing de l'URL a bien eut lieu… puisqu'on en est à l'envoi des headers…

    Effectivement, mais d'où ca peut provenir alors
    Est ce qu'il serait possible qu'une erreur de mon serveur apache entrainerait un plantage du socket, et donc java s'emballerait et le navigateur planterait ?

    J'ai un peu reardé mes logs apache et je viens de voir qu'il y aavait quleques erreur de temps à autre du genre :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    [Sun Jan 28 20:54:02 2007] [error] server reached MaxClients setting, consider raising the MaxClients setting
    En tout cas je suis un peu déçu que java ne gère pas ça dans les exceptions et que la jvm plante directement

Discussions similaires

  1. Réponses: 0
    Dernier message: 27/11/2014, 15h30
  2. Comment fixer une applet Java qui bouge à cause d'un menu déroulant ?
    Par Beginner. dans le forum Balisage (X)HTML et validation W3C
    Réponses: 9
    Dernier message: 11/02/2013, 15h31
  3. Problême de Socket avec un applet java (RMI/policy)
    Par Vesperal dans le forum API standards et tierces
    Réponses: 3
    Dernier message: 12/04/2006, 12h00
  4. applet java et socket ?
    Par ramislebob dans le forum Applets
    Réponses: 4
    Dernier message: 10/04/2006, 20h05
  5. [VB.NET] Passage de parametres à une Applet Java
    Par AntiSAL dans le forum ASP.NET
    Réponses: 4
    Dernier message: 18/08/2004, 11h04

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