Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2009
    Messaggi
    59

    [c#] Errore esecuzione programma

    Ho creato un software che presenta questo errore se eseguita su una macchina con xp sp3 (sulle altre funziona con win7 e xp sp3)

    codice:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box. 
    
    ************** Exception Text ************** 
    System.NullReferenceException: Object reference not set to an instance of an object. 
       at Rete.Form1.traceroot() 
       at Rete.Form1.button1_Click(Object sender, EventArgs e) 
       at System.Windows.Forms.Control.OnClick(EventArgs e) 
       at System.Windows.Forms.Button.OnClick(EventArgs e) 
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 
       at System.Windows.Forms.Control.WndProc(Message& m) 
       at System.Windows.Forms.ButtonBase.WndProc(Message& m) 
       at System.Windows.Forms.Button.WndProc(Message& m) 
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 
    
    
    ************** Loaded Assemblies ************** 
    mscorlib 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3603 (GDR.050727-3600) 
        CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll 
    ---------------------------------------- 
    Rete 
        Assembly Version: 1.0.0.0 
        Win32 Version: 1.0.0.0 
        CodeBase: file:///C:/Downloads/Software/Test%20Rete.exe 
    ---------------------------------------- 
    System.Windows.Forms 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
    ---------------------------------------- 
    System 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll 
    ---------------------------------------- 
    System.Drawing 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
    ---------------------------------------- 
    System.Configuration 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll 
    ---------------------------------------- 
    System.Xml 
        Assembly Version: 2.0.0.0 
        Win32 Version: 2.0.50727.3082 (QFE.050727-3000) 
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll 
    ---------------------------------------- 
    
    ************** JIT Debugging ************** 
    To enable just-in-time (JIT) debugging, the .config file for this 
    application or computer (machine.config) must have the 
    jitDebugging value set in the system.windows.forms section. 
    The application must also be compiled with debugging 
    enabled. 
    
    For example: 
    
    <configuration> 
        <system.windows.forms jitDebugging="true" /> 
    </configuration> 
    
    When JIT debugging is enabled, any unhandled exception 
    will be sent to the JIT debugger registered on the computer 
    rather than be handled by this dialog box.
    cosa può essere?? GRazie

  2. #2
    Hai cercato di utilizzare una variabile oggetto non inizializzata, in particolare nella funzione Rete.Form1.traceroot(), richiamata da Rete.Form1.button1_Click(Object sender, EventArgs e). Per il resto, bisognerebbe vedere il codice.

    P.S.: se ho indovinato cosa fa il programma, non è traceroot, ma traceroute.
    Amaro C++, il gusto pieno dell'undefined behavior.

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2009
    Messaggi
    59
    Ok ho messo tutte le inizializzazioni ,ed è vero era traceroute. Appena provato riferisco. Comunque è possibile che questo errore venga solo su una macchina e nelle altre funziona??

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2009
    Messaggi
    59
    Ora funzione mancava un " " per inizializzare una stringa. Grazie mille per l'aiuto.

  5. #5
    Di niente; ciao!
    Amaro C++, il gusto pieno dell'undefined behavior.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.