Search found 210 matches

by Ronald
Mon Jan 18, 2021 1:42 pm
Forum: Platform Related Issues
Topic: Is it an implementation problem of operator new in debug mode
Replies: 6
Views: 134

Re: Is it an implementation problem of operator new in debug mode

First of all, it is still not clear whether you are using the shared or static build of wxWidgets, and whether your compiler and linker command options are properly set accordingly. The application is using shared build of wxWidgets. I think I've set everything properly. Thanks for your detailed an...
by Ronald
Mon Jan 18, 2021 6:15 am
Forum: Platform Related Issues
Topic: Is it an implementation problem of operator new in debug mode
Replies: 6
Views: 134

Re: Is it an implementation problem of operator new in debug mode

For quite a while you are presenting artifical examples here in the forum, which exhibit memory leaks for you under certain circumstances. Without full information which steps exactly you take, it is extremely difficult to give you useful advice. As with any memory leaks you have to track down wher...
by Ronald
Sun Jan 17, 2021 1:44 pm
Forum: Platform Related Issues
Topic: Is it an implementation problem of operator new in debug mode
Replies: 6
Views: 134

Re: Is it an implementation problem of operator new in debug mode

doublemax wrote:
Sun Jan 17, 2021 8:56 am
There is no need to create multiple threads for the same topic. Apparently nobody here knows a solution.

Maybe try your luck on the wx-users group where the core wx developers can see it:
https://groups.google.com/g/wx-users
OK, thanks.
by Ronald
Sun Jan 17, 2021 4:30 am
Forum: Platform Related Issues
Topic: Is it an implementation problem of operator new in debug mode
Replies: 6
Views: 134

Is it an implementation problem of operator new in debug mode

The codes below runs as expected, but reports memory leak in debug mode in VS2019 on Windows #define WXUSINGDLL #include <wx/wx.h> #include <libpq-fe.h> int main() { const char * keys[6] = { "host", "port", "user", "password", "dbname", nullptr }; const char * values[6] = { "192.168.1.100", "3333", ...
by Ronald
Fri Jan 08, 2021 7:54 am
Forum: C++ Development
Topic: leak problem
Replies: 7
Views: 198

Re: leak problem

ONEEYEMAN wrote:
Fri Jan 08, 2021 6:09 am
You probably need to raise this with popler...
Yes, the problem is related to both libraries.
I've posted the issue for poppler, one maintainer said that the maintainer for poppler for Windows is not around.
by Ronald
Fri Jan 08, 2021 3:51 am
Forum: C++ Development
Topic: leak problem
Replies: 7
Views: 198

Re: leak problem

crt leak info #define WXUSINGDLL #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #pragma warning(disable: 4996) #include "wx/wx.h" #include <poppler/cpp/poppler-global.h> int main() { wxString * p = nullptr; if (false) p = new wxString[10]; delete (poppler::ustring *)nullptr; if (p...
by Ronald
Fri Jan 08, 2021 3:02 am
Forum: C++ Development
Topic: leak problem
Replies: 7
Views: 198

Re: leak problem

new whatever[10] This is bad. You're trying to create an array of "whatever" objects, but you don't give a name to that array. How would you delete that array? The best you can hope is that the compiler will dismiss that try. But it's also the worst, because you don't know if the compiler did it or...
by Ronald
Fri Jan 08, 2021 2:59 am
Forum: C++ Development
Topic: leak problem
Replies: 7
Views: 198

Re: leak problem

ONEEYEMAN wrote:
Thu Jan 07, 2021 6:45 pm
Did you try to run it under VLD?
Yes, no clue.
The leak seems to occur when loading both dll's.
If no #define WXUSINGDLL, no leak. I have tried to find what #define WXUSINGDLL makes diffence, just can't find out.
by Ronald
Thu Jan 07, 2021 4:21 am
Forum: C++ Development
Topic: leak problem
Replies: 7
Views: 198

leak problem

OS: Windows IDE: VS2019 wxWidgets: 3.1.4 (dll) poppler: 20.12.1 (dll) arch: x64 The problem was posted before (https://forums.wxwidgets.org/viewtopic.php?f=1&t=47770), Now I'm trying to debug it by reducing the codes in API level, the sample leaks is as below: #define WXUSINGDLL #pragma warning(disa...
by Ronald
Tue Jan 05, 2021 11:24 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

I can't reproduce behaviour with your minimal code if add Layout in the most bottom of constructor. Yes. If making the text longer and show the frame maximized, it can be reproduce. #include "wx/wx.h" class MyApp : public wxApp { public: virtual bool OnInit() wxOVERRIDE; }; class MyFrame : public w...
by Ronald
Tue Jan 05, 2021 2:58 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

[email protected] wrote:
Mon Jan 04, 2021 2:56 pm
I tried it and can confirm the strange behavior. It's also strange that i've never seen this before...

But i haven't found a workaround yet.
Thanks, I'll report the problem.
by Ronald
Tue Jan 05, 2021 2:57 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

Just do what doublemax said earlier - add Layout() after changing of widgets state: __tc_test->SetValue(wxT("123456789abcdefghijklmnopqrstuvwxyz")); this->Layout(); After calling Layout before setting the value of the text ctrl in the dialog's ctor, the problem is the same essentially, only more bu...
by Ronald
Mon Jan 04, 2021 11:40 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

Reproduce the problem in minimal.cpp in samples of wxWidgets #include "wx/wx.h" class MyApp : public wxApp { public: virtual bool OnInit() wxOVERRIDE; }; class MyFrame : public wxFrame { public: // ctor(s) MyFrame(const wxString & title); private: wxTextCtrl * __tc_test; private: // event handlers (...
by Ronald
Mon Jan 04, 2021 10:35 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

Too me it looks like the textcontrol is just too small. Try editing the text manually to confirm Is that real code, are you setting the value of the textcontrol after setting the sizer? Try calling Layout() afterwards. Real code. The dialog's default size in ctor is 800 x 600. The way it is shown i...
by Ronald
Mon Jan 04, 2021 7:04 am
Forum: C++ Development
Topic: Long text only displays last part in wxTextCtrl
Replies: 14
Views: 243

Re: Long text only displays last part in wxTextCtrl

How do you construct the wxTextCtrl? What's its size? Does it cover the whole visible area? wxBoxSizer * pSizer_0 = new wxBoxSizer(wxVERTICAL); { wxBoxSizer * pSizer_0_0 = new wxBoxSizer(wxHORIZONTAL); __tc_path = new wxTextCtrl(this, wxID_ANY); pSizer_0_0->Add(__tc_path, 1, wxEXPAND); __btn_choose...