Unix Technical Forum

Segfault in wxMBConvUTF8::MB2WC on startup

This is a discussion on Segfault in wxMBConvUTF8::MB2WC on startup within the pgsql Interfaces Pgadmin Support forums, part of the PostgreSQL category; --> I built pgadmin3 1.2.1 with wkGTK-2.6.2 on NetBSD/i386 2.0_BETA by means of pkgsrc-wip, but the resulting binary segfaults on ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:09 PM
Andreas Gustafsson
 
Posts: n/a
Default Segfault in wxMBConvUTF8::MB2WC on startup

I built pgadmin3 1.2.1 with wkGTK-2.6.2 on NetBSD/i386 2.0_BETA by
means of pkgsrc-wip, but the resulting binary segfaults on startup:

Program received signal SIGSEGV, Segmentation fault.
0x48a47178 in wxMBConvUTF8::MB2WC(wchar_t*, char const*, unsigned) const () from /usr/pkg/lib/libwx_base-2.6.so
(gdb) where
#0 0x48a47178 in wxMBConvUTF8::MB2WC(wchar_t*, char const*, unsigned) const () from /usr/pkg/lib/libwx_base-2.6.so
#1 0x0819bb82 in wxUtfFile::Read(wxString&, long long) (this=0xbfbff500, str=@0xbfbff530, nCount=1654) at utils/utffile.cpp:92
#2 0x08194f8a in FileRead(wxString const&, int) (filename=@0xbfbff6e0, format=1) at utils/misc.cpp:482
#3 0x08065a6a in pgAdmin3::OnInit() (this=0x830a980) at pgAdmin3.cpp:228
#4 0x08066ee4 in wxAppConsole::CallOnInit() (this=0x830a980)
at /usr/pkgsrc/wip/pgadmin3/work/.buildlink/include/wx-2.6/wx/app.h:87
#5 0x48a2c13c in wxEntry(int&, char**) () from /usr/pkg/lib/libwx_base-2.6.so
#6 0x080651f1 in main (argc=1, argv=0xbfbff83c) at pgAdmin3.cpp:81
#7 0x08064ef2 in ___start ()

This looks like the same crash as that reported in
<http://lists.freebsd.org/pipermail/freebsd-ports/2005-January/019694.html>
The following patch appears to fix the problem. Is it the correct fix?

--- utffile.cpp.old 2005-10-06 16:49:28.000000000 +0300
+++ utffile.cpp 2005-10-06 16:28:09.000000000 +0300
@@ -89,7 +89,8 @@
if (decr)
Seek(-decr, wxFromCurrent);

- m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, nLen+1), (const char*)buffer, (size_t)(nLen+1));
+ m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, (nLen+1) * sizeof(wchar_t)),
+ (const char*)buffer, (size_t)(nLen+1));
}
else
str = (wxChar*)buffer;

--
Andreas Gustafsson, gson@araneus.fi

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:09 PM
Andreas Pflug
 
Posts: n/a
Default Re: Segfault in wxMBConvUTF8::MB2WC on startup

Andreas Gustafsson wrote:
> I built pgadmin3 1.2.1 with wkGTK-2.6.2 on NetBSD/i386 2.0_BETA by
> means of pkgsrc-wip, but the resulting binary segfaults on startup:


Use at least 1.2.2, or even better test the new 1.4 beta-1.
If the problem persists, post a fresh stack trace here.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com