0

Well, for the first time it seems I have stumbled onto a bug I have never been able to figure out with google.

Application Type:
wxPython 2.8.9.1 (Python 2.6 Version ANSI)
Python 2.6
py2exe 0.6.9

Anyways,
I compiled an application that uses wxPython. I then proceeded to run the application where after it draws the dialog it crashes.

I proceeded to try and see what the errors were. In my research I came across something interesting. It only crashed when I placed my mouse over the dialog.

Moreover, I did more studying...

If I compiled it with windows or console option both times it crashed the same way.

I then ported it to my XP in which it ran successfully.

That XP system did not have Python 2.6.

To check I ported it to another XP system with Python 2.5 on it. It also ran successfully.

To counter the Vista check I ran it on my other Vista system and it also failed. It did not have Python.

On all systems I have installed the MSVC++ 2008 Redistributable.

The specific error vista returns in the dialog is:

Problem signature:
Problem Event Name: APPCRASH
Application Name: main.exe
Application Version: 0.0.0.0
Application Timestamp: 4918019b
Fault Module Name: comctl32.dll_unloaded
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 4791a629
Exception Code: c0000005
Exception Offset: 73ff5a6e
OS Version: 6.0.6001.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 1232
Additional Information 2: 10e25307b813d6e65f8eb51d97c44275
Additional Information 3: 3174
Additional Information 4: 8a855819960845fb14a1cadd6ffc819b

Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409

Attached is everything from the source, the DLLs used, the build data and the distributed executable. (Basically, everything)

Edit: Attachment wouldn't work... 7mb is evidently too big to handle. I uploaded it onto my website: http://www.auburnflame.com/error.zip

Anyways, if you need more information or have a solution please go ahead and post!

Oh by the way,
I don't believe it is a permissions problem as I ran it as Administrator both times on vista and not and it didn't work either way.
Running it with XP computability mode failed as well.

Thanks for your help!
Raygoe

3
Contributors
9
Replies
10
Views
8 Years
Discussion Span
Last Post by jbennet
0

Ok, does any other wxpy program run successful? I ask because may be version is wrong (I always prefer unicode). Another problem is installing wxpy with less admin rights. Try to re-install wxpy in Admin level. Try same code but compile with 2.5

0

I just tried compiling a different program and it did not crash.

I will try compiling under 2.5 and see if that makes any difference.

0

Oh, this is interesting...

I just tried running the main.py in the source through python and it crashes the same way as the py2exe does.

I guess that means it isn't py2exe that is the problem...

0

I've narrowed down the problem to this:

This works when python.exe runs it:

import wx

class MyMenu(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(200, 150))

        
	menubar = wx.MenuBar()
        file = wx.Menu()
        edit = wx.Menu()
        help = wx.Menu()
        file.Append(101, '&Open', 'Open a new document')
        file.Append(102, '&Save', 'Save the document')
        file.AppendSeparator()
        quit = wx.MenuItem(file, 105, '&Quit\tCtrl+Q', 'Quit the Application')
        #quit.SetBitmap(wx.Image('stock_exit-16.png', wx.BITMAP_TYPE_PNG).ConvertToBitmap())
        file.AppendItem(quit)

        menubar.Append(file, '&File')
        menubar.Append(edit, '&Edit')
        menubar.Append(help, '&Help')
        self.SetMenuBar(menubar)
        self.CreateStatusBar()
		

class MyApp(wx.App):
    def OnInit(self):
        frame = MyMenu(None, -1, 'menu1.py')
        frame.Show(True)
        return True

app = MyApp(0)
app.MainLoop()

This doesn't:

import wx

class MyMenu(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(200, 150))

        """
	menubar = wx.MenuBar()
        file = wx.Menu()
        edit = wx.Menu()
        help = wx.Menu()
        file.Append(101, '&Open', 'Open a new document')
        file.Append(102, '&Save', 'Save the document')
        file.AppendSeparator()
        quit = wx.MenuItem(file, 105, '&Quit\tCtrl+Q', 'Quit the Application')
        #quit.SetBitmap(wx.Image('stock_exit-16.png', wx.BITMAP_TYPE_PNG).ConvertToBitmap())
        file.AppendItem(quit)

        menubar.Append(file, '&File')
        menubar.Append(edit, '&Edit')
        menubar.Append(help, '&Help')
        self.SetMenuBar(menubar)
        self.CreateStatusBar()
		"""

class MyApp(wx.App):
    def OnInit(self):
        frame = MyMenu(None, -1, 'menu1.py')
        frame.Show(True)
        return True

app = MyApp(0)
app.MainLoop()

Basically, adding just a
self.CreateStatusBar() keeps it from crashing... strange errors!

0

Hmm yeah i just whipped up a test program and managed to recreate the same issue on server 2008

must be some bug in NT6

0

Confirmed.

I added a self.CreateStatusBar() to the code on the main.py and it worked like a charm.

Why? What's the significance of that?

Thanks for the info bennet!

Just to be thorough: does that work for everyone? If so, I'd love to mark solved but I really want to know why that works...

0

All of my testing was done on 32 bit systems. Both Vistas were SP1

0

hmm yeah it must be an issue which affects all vista-based systems, which is annoying

you should submit a bug report

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.