Re: help for "quick search"

From: Dave Page <dpage(at)pgadmin(dot)org>
To: "M(at)rton Akos" <makos999(at)gmail(dot)com>
Cc: Levente Torok <toroklev(at)gmail(dot)com>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: help for "quick search"
Date: 2009-03-13 21:49:14
Message-ID: 937d27e10903131449n14ae11cer4aeab7df1f245e76@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Marton

On Fri, Mar 13, 2009 at 4:04 AM, M(at)rton Akos <makos999(at)gmail(dot)com> wrote:
> Dear Levente, Dave, List,
>
> here are patches with only the sample code of quick search.

Hmm, not sure what happened to the patch to frmMain.h - it looks like
a diff between 2 modified versions of the file, rather than the
original and new. I'd suggest just doing an 'svn diff' from the top
level directory in future - that will create a single patch for all
the changes.

> I did not attached any backtrace, because there are several points,
> where the program can suffer from segfault at my quick search, exactly
> operations with original Object browser. Please do a second search,
> don't finish at the first and you can see the error.
> Please take me a better solution for copying elements of original tree
> or how i can resolve this problem with GUI.
> I used these patches on the last repository.
> Sorry for the unfitted wxTextCtrl at new floating window, but at first
> i couldn't create it with ctlTree.

The only crash I could get in the debugger was if I searched for
'Dummy'. The treeview often has dummy nodes attached which the user
never sees - these aren't linked to an object , so when you do this:

currentObject=browser->GetObject(item);
treee->AppendItem(treee->GetRootItem(), browser->GetItemText(item),
currentObject->GetIconId(), -1, currentObject);

you end up with currentObject == NULL which results in a crash.

From what I can see in the patch, it looks like you're testing on
Linux - I do the bulk of my debugging on Windows as the MSVC++
debugger makes it much easier. My guess is the different OS is the
reason why you see a crash and I don't, however, I suspect it's
happening because you're modifying currentObject which you should
almost certainly not be touching.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Glyn Astill 2009-03-13 23:51:45 Re: pgAdmin v1.10.0 Beta 1 available for testing
Previous Message svn 2009-03-13 21:28:25 SVN Commit by guillaume: r7702 - trunk/www/locale/fr_FR/LC_MESSAGES