Program doesn't work with Win XP Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
eriX
Experienced Solver
Experienced Solver
Posts: 84
Joined: Wed Feb 04, 2009 2:08 pm
Location: Germany
Contact:

Program doesn't work with Win XP

Post by eriX » Wed Jul 20, 2011 7:21 pm

I have finished my program a few days ago and was testing it today with different machines.
My program worked fine in beta (7 days ago) but now with the final version, the program does not start with XP.

The program works with Win 7 and Vista but does not start in XP.
The program terminated unexpected... and DrWatson32 crashes within the program too.

Maybe you have some tips for me to find the reason/problem?
(I've tryed to undo my last changes to the code, but that doesn't help)

I can only give you a link to the program (it is only German): www.lavo-trainer.de/download

catalin
Moderator
Moderator
Posts: 1583
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Program doesn't work with Win XP

Post by catalin » Wed Jul 20, 2011 8:08 pm

eriX wrote:My program worked fine in beta (7 days ago) but now with the final version, the program does not start with XP.

The program works with Win 7 and Vista but does not start in XP.
The program terminated unexpected... and DrWatson32 crashes within the program too.

Maybe you have some tips for me to find the reason/problem?
:)
http://forums.wxwidgets.org/viewtopic.p ... 74#p117735

User avatar
doublemax
Moderator
Moderator
Posts: 14990
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Program doesn't work with Win XP

Post by doublemax » Wed Jul 20, 2011 9:03 pm

The program crashes with an access to memory location 0x00000000, so most likely you're using a pointer somewhere but didn't check it for NULL.

As it crashes before a window appears, it must happen early, probably in wxApp::OnInit(). The last thing your program does before it crashes is loading "update.png".

Also, there's a 0-byte "msw.dll" in the program directory, is that intentional?

This should give you some hints on where to look.
Use the source, Luke!

eriX
Experienced Solver
Experienced Solver
Posts: 84
Joined: Wed Feb 04, 2009 2:08 pm
Location: Germany
Contact:

Re: Program doesn't work with Win XP

Post by eriX » Thu Jul 21, 2011 9:23 am

the msw.dll is not important, it is only a plain text file, where the user shouldn't look in.

The Debugger in wxDevC++ says: "An Access Violation (Segmentation Fault) has been raised in your program." Yes No Abort

If I click on Yes, the file string.h becomes opened and the line *this= s; is marked:

Code: Select all

    // string += C string
  wxString& Append(const wxString& s)
    {
        // test for empty() to share the string if possible
        if ( empty() )
            *this = s;
        else
            append(s);
        return *this;
    }

I would post some more code, but I don't know which parts...

eriX
Experienced Solver
Experienced Solver
Posts: 84
Joined: Wed Feb 04, 2009 2:08 pm
Location: Germany
Contact:

Re: Program doesn't work with Win XP

Post by eriX » Thu Jul 21, 2011 9:34 am

Ok. I got it!

It was caused by the following (manual added) code in the Event Table:
EVT_TEXT(ID_WXEDIT1,LAVO_TrainerFrm::WxButton14Click)
This should call the function, if the user types text in the EditBox (in the last WxNotepadPage)
It worked fine on Win7 but caused the access violation under XP.


Ok. Now I need new code for the "live" search. #-o

Post Reply