Skip site navigation (1) Skip section navigation (2)

[wxMac] Possible wxProcess bug in wxMac 2.7

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Stefan Csomor" <csomor(at)advancedconcepts(dot)ch>
Cc: <pgadmin-hackers(at)postgresql(dot)org>
Subject: [wxMac] Possible wxProcess bug in wxMac 2.7
Date: 2006-10-22 00:00:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Hi Stefan,

I think I've uncovered another wxMac bug that shows up in pgAdmin. In
sysProcess::ReadInputStream() and wxString sysProcess::ReadErrorStream()
in *our* code (see
rocess.cpp?rev=5466&view=markup) it seems that doing anything other than
just returning wxEmptyString will cause a crash on Mac. Calling
IsInputAvailable() or IsErrorAvailable() and then returning
wxEmptyString will crash, as will simply returning wxT("Foo").

As you can see, the code is quite simple, and it works perfectly on
wxMSW. Any ideas?

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000002c
0x102c5e1c in wxProcess::IsInputAvailable (this=0x0) at
126         return m_inputStream && m_inputStream->CanRead();
(gdb) bt
#0  0x102c5e1c in wxProcess::IsInputAvailable (this=0x0) at
#1  0x00218e78 in sysProcess::ReadInputStream (this=0x0) at
#2  0x00169cc4 in ExternProcessDialog::checkStreams (this=0x11069a00) at
#3  0x00169d38 in ExternProcessDialog::OnPollProcess (this=0x11069a00,
event=(at)0xbffff1c8) at ./main/dlgClasses.cpp:628
#4  0x1026bbd0 in wxAppConsole::HandleEvent (this=0x10c25f90,
handler=0x11069a00, func={__pfn = (void ( wxEvtHandler::*)(wxEvent &,))
185250, __delta = 0}, event=(at)0xbffff1c8) at ./src/common/appbase.cpp:321
#5  0x10313ba4 in wxEvtHandler::ProcessEventIfMatches (entry=(at)0x4b3d68,
handler=0x11069a00, event=(at)0xbffff1c8) at ./src/common/event.cpp:1201
#6  0x10314204 in wxEventHashTable::HandleEvent (this=0x4b2688,
event=(at)0xbffff1c8, self=0x11069a00) at ./src/common/event.cpp:878
#7  0x10315b18 in wxEvtHandler::ProcessEvent (this=0x11069a00,
event=(at)0xbffff1c8) at ./src/common/event.cpp:1263
#8  0x0bfbc5b8 in wxTimerBase::Notify (this=0x146f49a0) at
#9  0x0beddca0 in wxProcessTimer (theTimer=0x14850810, data=0x146f49a0)
at ./src/mac/carbon/timer.cpp:52
#10 0x907f0550 in __CFRunLoopDoTimer ()
#11 0x907dcec8 in __CFRunLoopRun ()
#12 0x907dc47c in CFRunLoopRunSpecific ()
#13 0x93208740 in RunCurrentEventLoopInMode ()
#14 0x93207dd4 in ReceiveNextEventCommon ()
#15 0x9330c940 in ReceiveNextEventInMode ()
#16 0x0be71f38 in wxApp::MacDoOneEvent (this=0x10c25f90) at
#17 0x0be9f7f4 in wxEventLoop::Dispatch (this=0x13d265e0) at
#18 0x0bf555a0 in wxEventLoopManual::Run (this=0x13d265e0) at
#19 0x0bf247d4 in wxAppBase::MainLoop (this=0x10c25f90) at
#20 0x0bf24a68 in wxAppBase::OnRun (this=0x10c25f90) at
#21 0x102b02a4 in wxEntry (argc=(at)0xbffffc98, argv=0x10c20fb0) at
#22 0x102b03c0 in wxEntry (argc=(at)0xbffffc98, argv=0xbffffd2c) at
#23 0x00008128 in main (argc=1, argv=0xbffffd2c) at ./pgAdmin3.cpp:102
Current language:  auto; currently c++

Regards, Dave.

pgadmin-hackers by date

Next:From: svnDate: 2006-10-22 19:30:29
Subject: SVN Commit by dpage: r5512 - in trunk/pgadmin3/src: dlg include
Previous:From: svnDate: 2006-10-21 23:48:32
Subject: SVN Commit by dpage: r5511 - trunk/pgadmin3/src/frm

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group