473,714 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

crash in wx.TreeListCtrl SelectItem()

Hello list,

I have a strange crash (segfault on FreeBSD) that I can not reliably reproduce
and therefore unfortunately can not provide a self contained test case at the
moment.

Here is what I do (and what works almost always, but sometimes crashes):

1) find an item in a wx.TreeListCtrl by its pydata (code posted to this list)
2) if the item is found:
********a) call EnsureVisible(f oundItem)
********b) call SelectItem(foun dItem)

The call to EnsureVisible() always returns, but SelectItem() crashes python
sometimes.

foundItem on a crash is something like this:
<wx._controls.T reeItemId; proxy of C++ wxTreeItemId instance at
_a0d0c708_p_wxT reeItemId>

calling GetPyData(found Item) returns the correct pydate.

Any ideas what could be happening or how to further debug this?

Thank you in advance for your time!

Johannes
Aug 18 '06 #1
1 2109
Hi,
I have a strange crash (segfault on FreeBSD) that I can not reliably reproduce
and therefore unfortunately can not provide a self contained test case at the
moment.

Here is what I do (and what works almost always, but sometimes crashes):

1) find an item in a wx.TreeListCtrl by its pydata (code posted to this list)
2) if the item is found:
a) call EnsureVisible(f oundItem)
b) call SelectItem(foun dItem)

The call to EnsureVisible() always returns, but SelectItem() crashes python
sometimes.

foundItem on a crash is something like this:
<wx._controls.T reeItemId; proxy of C++ wxTreeItemId instance at
_a0d0c708_p_wxT reeItemId>

calling GetPyData(found Item) returns the correct pydate.

Any ideas what could be happening or how to further debug this?
Try anyway to reproduce with a sample. The only way I know in this case
is to split the code and see if it happens again. If so, split again,
and again, and so on...
It can be long, but the only way. Very often, you'll find yourself the
buggy part.
Once time you'll have a sample, post it, I can try on linux and windows.
Also please give the versions of the softwares you use.
rgds
jm
Aug 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
8484
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential problem. The program may crash unexpectedly while writing to the file. If so, my program should detect this during startup, and then (during startup) probably delete the data added to the file and redo the writing operation.
8
3211
by: Eric Brunel | last post by:
Hi all, I was creating a Tkinter widget in the style of the reversed tabs below Excel worksheets and I stepped in a serious problem: the code I made makes python crash with a seg fault, bus error or X11 BadGC error on both Solaris (2.6 and 2.7) and Linux (Mandrake 8.0); it doesn't crash on Windows. I tried to simplify the script, but I couldn't reproduce the crash with a simpler code. So the code below is somewhat long; sorry for that. ...
10
9540
by: xixi | last post by:
i have db2 udb v8.1 on windows 64 bit 2003 server, after db2 server start , i found this in the db2diag.log, is this error? 2004-05-05-15.28.30.780000 Instance:DB2 Node:000 PID:1692(db2syscs.exe) TID:2860 Appid:AC10040A.GD5F.00FC56D8BEC5 base sys utilities sqledint Probe:30 Crash Recovery is needed. 2004-05-05-15.28.31.890000 Instance:DB2 Node:000
0
1173
by: sendhil kumar | last post by:
Hi all, whwn working with xml connectvity to python, i have a sash window, in which first window has a Tree Control that has 'n' parent fields preceded by + sign and on leftdown all the childs got from external xml file. when the particular parent field is selected and dragged, it must get posted to the other sash window which should in TreeList Control, bcoz iam displaying numerous xml attributes of the parent and following
34
4463
by: NewToCPP | last post by:
Hi, Why does a C/C++ programs crash? When there is access to a null pointer or some thing like that programs crash, but why do they crash? Thanks.
0
1300
by: Johannes Lochmann | last post by:
Hello list, here is a small code snippet to recursively search a wx.TreeListCtrl for an item with specific pydata. Feel free to comment! def recursiveFindItemByPydata(self, parent, pydata):     item, cookie = self.GetFirstChild(parent)
12
5585
by: benjamin.krulewitch | last post by:
I'm debugging an issue with a C program that causes the computer to crash, and I'm attempting to log information immediately before the crash occurs. I us my BKprintLog function (see below) to write information into a log file. The problem is, i'm not confident that information i write to the log gets saved onto the hard drive before the crash occurs. My understanding of hard drives and OS are that because hard drives are so slow,...
110
10603
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst case scenario for MyISAM backend? Also is it possible to not to lose data but get them corrupted?
11
3035
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7 and IE8. There is no issue when the controls are allowed to complete loading. Can you please tell me the best practice that handles this? Thanks.
0
8808
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8712
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9077
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6637
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4727
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3159
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2113
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.