Severe crash problems with windows Me

Hi,

I have the following problem on Windows Me. When I run a simple scripts two times, it works fine the first time and crash completely the computer the second time forcing me to reboot. This problem does not appear under Win98.

Would you have any idea?

Thanks in advance,

Boris

import os
from wxPython.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
    def __init__(self,parent,id,title):
        wxFrame.__init__(self,parent,-4,title,size=(200,100),style=wxDEFAULT_FRAME_STYLE)
               panel = wxPanel(self, -1)

        self.CreateStatusBar()
        filemenu=wxMenu()
        filemenu.Append(ID_ABOUT, "&About","Info")
        filemenu.AppendSeparator()
        filemenu.Append (ID_EXIT, "E&xit","Terminate")
        menuBar=wxMenuBar()
        menuBar.Append (filemenu,"&File")
        self.SetMenuBar(menuBar)
               sizer = wxBoxSizer(wxVERTICAL)
        box = wxBoxSizer(wxHORIZONTAL)
               label = wxStaticText(self, -1, "Field #1:")
        box.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)
               text = wxTextCtrl(self, -1, "", size=(80,-1))
        box.Add(text, 1, wxALIGN_CENTRE|wxALL, 5)
               btn = wxButton(self, wxID_OK, " OK ")
        box.Add(btn, 0, wxALIGN_CENTRE|wxALL, 5)
               sizer.AddSizer(box, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5)

               self.Show(true)
app = wxPySimpleApp ()
frame = MainWindow (None, -1, "Join")
app.MainLoop ()

···

_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France

Hi!

I have the following problem on Windows Me. When I run a simple scripts
two times, it works fine the first time and crash completely the
computer the second time forcing me to reboot. This problem does not
appear under Win98.

Would you have any idea?

wxPython 2.4.2 (nonunicode build)
(Unicode build have some problems on win9x OSes.
  You better use nonunicode version.)
python 2.2
win2000 prof.
works fine both times.

Thanks in advance,

Boris
import os
from wxPython.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
    def __init__(self,parent,id,title):
        
wxFrame.__init__(self,parent,-4,title,size=(200,100),style=wxDEFAULT_FRAME_STYLE)

    ^^^^^^^^^^^^^ Fix indentation on this line.

···

        panel = wxPanel(self, -1)

        self.CreateStatusBar()
        filemenu=wxMenu()
        filemenu.Append(ID_ABOUT, "&About","Info")
        filemenu.AppendSeparator()
        filemenu.Append (ID_EXIT, "E&xit","Terminate")
        menuBar=wxMenuBar()
        menuBar.Append (filemenu,"&File")
        self.SetMenuBar(menuBar)
       
        sizer = wxBoxSizer(wxVERTICAL)
        box = wxBoxSizer(wxHORIZONTAL)
       
        label = wxStaticText(self, -1, "Field #1:")
        box.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)
       
        text = wxTextCtrl(self, -1, "", size=(80,-1))
        box.Add(text, 1, wxALIGN_CENTRE|wxALL, 5)
       
        btn = wxButton(self, wxID_OK, " OK ")
        box.Add(btn, 0, wxALIGN_CENTRE|wxALL, 5)
       
        sizer.AddSizer(box, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5)

        self.Show(true)
app = wxPySimpleApp ()
frame = MainWindow (None, -1, "Join")
app.MainLoop ()

--
Igor.

I am using the latest unicode build on WinMe (turkish) without problems. The
main problem I initially had was related to the code for displaying a tray
icon. I commented out a few lines in the main.py of the wxPython demo and
everything was fine after that. Unfortunately I cannot look it up right now.
I posted about it then, try looking in the archives or try to find the code
in main.py that displays the trayicon. Also, forget about displaying a tray
icon in your own code, stay away from it and you'll be fine. If you can't
find the lines I told you, feel free to ask again.

Regards,

Oktay

···

----- Original Message -----
From: "Igor Prischepoff" <igor@tyumbit.ru>
To: "Boris New" <wxPython-users@lists.wxwindows.org>
Sent: Tuesday, December 09, 2003 1:34 PM
Subject: Re: [wxPython-users] Severe crash problems with windows Me

Hi!
> I have the following problem on Windows Me. When I run a simple

scripts

> two times, it works fine the first time and crash completely the
> computer the second time forcing me to reboot. This problem does not
> appear under Win98.

> Would you have any idea?
wxPython 2.4.2 (nonunicode build)
(Unicode build have some problems on win9x OSes.
  You better use nonunicode version.)
python 2.2
win2000 prof.
works fine both times.

> Thanks in advance,

> Boris
> import os
> from wxPython.wx import *
> ID_ABOUT=101
> ID_EXIT=110
> class MainWindow(wxFrame):
> def __init__(self,parent,id,title):

>

wxFrame.__init__(self,parent,-4,title,size=(200,100),style=wxDEFAULT_FRAME_S
TYLE)

    ^^^^^^^^^^^^^ Fix indentation on this line.
> panel = wxPanel(self, -1)

> self.CreateStatusBar()
> filemenu=wxMenu()
> filemenu.Append(ID_ABOUT, "&About","Info")
> filemenu.AppendSeparator()
> filemenu.Append (ID_EXIT, "E&xit","Terminate")
> menuBar=wxMenuBar()
> menuBar.Append (filemenu,"&File")
> self.SetMenuBar(menuBar)

> sizer = wxBoxSizer(wxVERTICAL)
> box = wxBoxSizer(wxHORIZONTAL)

> label = wxStaticText(self, -1, "Field #1:")
> box.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)

> text = wxTextCtrl(self, -1, "", size=(80,-1))
> box.Add(text, 1, wxALIGN_CENTRE|wxALL, 5)

> btn = wxButton(self, wxID_OK, " OK ")
> box.Add(btn, 0, wxALIGN_CENTRE|wxALL, 5)

> sizer.AddSizer(box, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL,

5)

> self.Show(true)
> app = wxPySimpleApp ()
> frame = MainWindow (None, -1, "Join")
> app.MainLoop ()

--
Igor.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Boris New wrote:

Hi,

I have the following problem on Windows Me. When I run a simple scripts two times, it works fine the first time and crash completely the computer the second time forcing me to reboot. This problem does not appear under Win98.

How are you running it each time? From a command-line, dclicking the icon in Explorer, or from something like Idle or PythonWin? If the latter, that is the problem (different GUI models don't play nice together) so try either of the first two.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!