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: E7F85A1B5FF8D44C8A1AF6885BC9A0E40176D7DB@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
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
http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/src/utils/sysP
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
./src/common/process.cpp:126
126         return m_inputStream && m_inputStream->CanRead();
(gdb) bt
#0  0x102c5e1c in wxProcess::IsInputAvailable (this=0x0) at
./src/common/process.cpp:126
#1  0x00218e78 in sysProcess::ReadInputStream (this=0x0) at
./utils/sysProcess.cpp:73
#2  0x00169cc4 in ExternProcessDialog::checkStreams (this=0x11069a00) at
./main/dlgClasses.cpp:637
#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
./src/common/timercmn.cpp:57
#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
./src/mac/carbon/app.cpp:1202
#17 0x0be9f7f4 in wxEventLoop::Dispatch (this=0x13d265e0) at
./src/mac/carbon/evtloop.cpp:107
#18 0x0bf555a0 in wxEventLoopManual::Run (this=0x13d265e0) at
./src/common/evtloopcmn.cpp:98
#19 0x0bf247d4 in wxAppBase::MainLoop (this=0x10c25f90) at
./src/common/appcmn.cpp:264
#20 0x0bf24a68 in wxAppBase::OnRun (this=0x10c25f90) at
./src/common/appcmn.cpp:319
#21 0x102b02a4 in wxEntry (argc=(at)0xbffffc98, argv=0x10c20fb0) at
./src/common/init.cpp:440
#22 0x102b03c0 in wxEntry (argc=(at)0xbffffc98, argv=0xbffffd2c) at
./src/common/init.cpp:452
#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-2014 The PostgreSQL Global Development Group