Search found 5 matches

by oldrealrealman
Thu Nov 29, 2018 2:01 am
Forum: C++ Development
Topic: wxTimer m_Time cause crash
Replies: 7
Views: 911

Re: wxTimer m_Time cause crash

Thank you. not only the answer, but also your instruction. With your(above) codes, crash disapeared. Trying as your suggestion, after updating 'void test1Frame::OnTimer()' with 'void test1Frame::OnTimer(wxTimerEvent&)', then it can running well. Bind or connect, all of them are ok, you said Bind is ...
by oldrealrealman
Wed Nov 28, 2018 8:35 am
Forum: C++ Development
Topic: wxTimer m_Time cause crash
Replies: 7
Views: 911

Re: wxTimer m_Time cause crash

I don't know how to get the useful information from the trace, the following is the trace infor which I got from gdb. Debugger name and version: GNU gdb (GDB) 7.9.1 Child process PID: 34676 At C:\workcode\test1\test1Main.cpp:99 At C:\workcode\test1\test1Main.cpp:100 In wxAppConsoleBase::HandleEvent(...
by oldrealrealman
Wed Nov 28, 2018 8:30 am
Forum: C++ Development
Topic: wxTimer m_Time cause crash
Replies: 7
Views: 911

Re: wxTimer m_Time cause crash

I'm using win10. very simple codes, just to create new project with CodesBlocks wizard. The codes is as following /*************************************************************** * Name: test1Main.cpp * Purpose: Code for Application Frame * Author: () * Created: 2018-11-28 * Copyright: () * License:...
by oldrealrealman
Tue Nov 27, 2018 5:25 am
Forum: C++ Development
Topic: wxTimer m_Time cause crash
Replies: 7
Views: 911

wxTimer m_Time cause crash

codes is as following
wxTimer m_Time; in headfile

:m_Timer(this, TIMER_ID)

m_Timer.Start(1000, wxTIMER_CONTINUOUS );


in debug version it is ok, but in realease version, it crashed.

Code 17.12
wxWidgets 3.1.1

if adding m_Timer->Stop in onPaint function then all of versions are ok.
by oldrealrealman
Tue Nov 27, 2018 5:02 am
Forum: wxWidgets Development (Chinese)
Topic: wxTimer m_Timer造成的crash
Replies: 0
Views: 6744

wxTimer m_Timer造成的crash

frame中

wxTimer m_Timer;
m_Timer(this, TIMER_ID);
m_Timer.Start(1000, wxTIMER_CONTINUOUS );

在debug版本里面,没有问题,但是在release版本中程序会crash掉,

如果在onPaint函数中增加
m_Timer.Stop(); 则会正常运行。