My app crashes on Windows, but not on OSX.

Brian,

That’s already done. I work at a console prompt so that’s where I prefer to see messages. The only output I get is the diagnostics from the various print statements I put in the code to track down the problem.

No trace back, no nothing until I get the segmentation fault printed on the screen.

···

On Thu, Jul 17, 2008 at 7:20 AM, brian.d.fett@seagate.com wrote:

I would start to track this down by
disabling the stout forwarding:

app = wx.App(redirect=False)

If you create your wx.App with argument
False, then the stout information is kept in the calling program (be it
drPython, or X) rather than sent to a GUI window. Very useful for fixing
bugs that cause crashes.

I am not sure if this is what you needed,
but this is how I would start to “go about tracking
this down.”

-Brian

Brian Fett

1280 Disc Dr

SHK224

Shakopee, MN 55379

Phone: (952)402-2595

Brian.D.Fett@seagate.com

“Timothy Grant”
timothy.grant@gmail.com

Sent by: wxpython-users-bounces@lists.wxwidgets.org

No Phone Info Available
07/16/2008 04:33 PM

Please respond to

wxpython-users@lists.wxwidgets.org

To

wxPython-users@lists.wxwidgets.org
cc

Subject

[wxpython-users] My app crashes on Windows,
but not on OSX.

Up until today, the code I have written on my PowerBook
has performed flawlessly on Windows too. I don’t have a windows box to
test on, so rely on a friend who has a Vista box.

My most recent iteration of code works just fine for me, but when he gets
it he can make it crash, a hard crash, no traceback no anything, and I
have no idea where to start debugging this process.

I’m using a Notebook and have some widgets on Tab 1, that affect the content
of Tab 2. The crash occurs when clicking on Tab 2.

Does anyone have any ideas on how I should go about tracking this down?

Stand Fast,

wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

tjg. [Timothy Grant] _______________________________________________


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Stand Fast,
tjg. [Timothy Grant]

It was a good assumption. It took me a while before I learned that trick and I lived in frustration for a few days watching windows pop up on my screen with information in them and then vanishing before I had time to read what they said.

OSX believes the segfault is in one of the wx for OSX libs, not in python itself.

···

On Thu, Jul 17, 2008 at 9:21 AM, brian.d.fett@seagate.com wrote:

Ah, I would have assumed, but you know
what they say.

I guess I don’t know the last time I
managed to get a segfault in python, I always seem to get a traceback.

-Brian

Brian Fett

1280 Disc Dr

SHK224

Shakopee, MN 55379

Phone: (952)402-2595

Brian.D.Fett@seagate.com

“Timothy Grant”
timothy.grant@gmail.com

Sent by: wxpython-users-bounces@lists.wxwidgets.org

No Phone Info Available

07/17/2008 10:45 AM

Please respond to

wxpython-users@lists.wxwidgets.org

To

wxpython-users@lists.wxwidgets.org

cc

Subject

Re: [wxpython-users] My app crashes
on Windows, but not on OSX.

Brian,

That’s already done. I work at a console prompt so that’s where I prefer
to see messages. The only output I get is the diagnostics from the various
print statements I put in the code to track down the problem.

No trace back, no nothing until I get the segmentation fault printed on
the screen.

On Thu, Jul 17, 2008 at 7:20 AM, brian.d.fett@seagate.com > wrote:

I would start to track this down by disabling the stout forwarding:

app = wx.App(redirect=False)

If you create your wx.App with argument False, then the stout information
is kept in the calling program (be it drPython, or X) rather than sent
to a GUI window. Very useful for fixing bugs that cause crashes.

I am not sure if this is what you needed, but this is how I would start
to “go about tracking this down.”

-Brian

Brian Fett

1280 Disc Dr

SHK224

Shakopee, MN 55379

Phone: (952)402-2595

Brian.D.Fett@seagate.com

“Timothy Grant”
<timothy.grant@gmail.com>

Sent by: wxpython-users-bounces@lists.wxwidgets.org

No Phone Info Available
07/16/2008 04:33 PM

Please respond to

wxpython-users@lists.wxwidgets.org

To

wxPython-users@lists.wxwidgets.org
cc

Subject

[wxpython-users] My app crashes on Windows,
but not on OSX.

Up until today, the code I have written on my PowerBook
has performed flawlessly on Windows too. I don’t have a windows box to
test on, so rely on a friend who has a Vista box.

My most recent iteration of code works just fine for me, but when he gets
it he can make it crash, a hard crash, no traceback no anything, and I
have no idea where to start debugging this process.

I’m using a Notebook and have some widgets on Tab 1, that affect the content
of Tab 2. The crash occurs when clicking on Tab 2.

Does anyone have any ideas on how I should go about tracking this down?

Stand Fast,

tjg. [Timothy Grant] _______________________________________________

`

wxpython-users mailing list``

wxpython-users@lists.wxwidgets.org

[http://lists.wxwidgets.org/mailman/listinfo/wxpython-users`](http://lists.wxwidgets.org/mailman/listinfo/wxpython-users)


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Stand Fast,

tjg. [Timothy Grant] `_______________________________________________

wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

`


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Stand Fast,
tjg. [Timothy Grant]

I may have missed this, but I'm curious if you considered using the
TreeListCtrl. Sure, you don't get complete control over rendering,
but you *can* get complete control over editing in-place.

- Josiah

···

On Thu, Jul 17, 2008 at 9:54 AM, Timothy Grant <timothy.grant@gmail.com> wrote:

It was a good assumption. It took me a while before I learned that trick and
I lived in frustration for a few days watching windows pop up on my screen
with information in them and then vanishing before I had time to read what
they said.

OSX believes the segfault is in one of the wx for OSX libs, not in python
itself.

On Thu, Jul 17, 2008 at 9:21 AM, <brian.d.fett@seagate.com> wrote:

Ah, I would have assumed, but you know what they say.

I guess I don't know the last time I managed to get a segfault in python,
I always seem to get a traceback.

-Brian

Brian Fett
1280 Disc Dr
SHK224
Shakopee, MN 55379

Phone: (952)402-2595
Brian.D.Fett@seagate.com

"Timothy Grant" <timothy.grant@gmail.com>
Sent by: wxpython-users-bounces@lists.wxwidgets.org
No Phone Info Available

07/17/2008 10:45 AM

Please respond to
wxpython-users@lists.wxwidgets.org
To
wxpython-users@lists.wxwidgets.org
cc
Subject
Re: [wxpython-users] My app crashes on Windows, but not on OSX.

Brian,

That's already done. I work at a console prompt so that's where I prefer
to see messages. The only output I get is the diagnostics from the various
print statements I put in the code to track down the problem.

No trace back, no nothing until I get the segmentation fault printed on
the screen.

On Thu, Jul 17, 2008 at 7:20 AM, <brian.d.fett@seagate.com> wrote:

I would start to track this down by disabling the stout forwarding:
app = wx.App(redirect=False)

If you create your wx.App with argument False, then the stout information
is kept in the calling program (be it drPython, or X) rather than sent to a
GUI window. Very useful for fixing bugs that cause crashes.

I am not sure if this is what you needed, but this is how I would start to
"go about tracking this down."

-Brian

Brian Fett
1280 Disc Dr
SHK224
Shakopee, MN 55379

Phone: (952)402-2595
Brian.D.Fett@seagate.com

"Timothy Grant" <timothy.grant@gmail.com>
Sent by: wxpython-users-bounces@lists.wxwidgets.org
No Phone Info Available

07/16/2008 04:33 PM

Please respond to

wxpython-users@lists.wxwidgets.org
To
wxPython-users@lists.wxwidgets.org
cc
Subject
[wxpython-users] My app crashes on Windows, but not on OSX.

Up until today, the code I have written on my PowerBook has performed
flawlessly on Windows too. I don't have a windows box to test on, so rely on
a friend who has a Vista box.

My most recent iteration of code works just fine for me, but when he gets
it he can make it crash, a hard crash, no traceback no anything, and I have
no idea where to start debugging this process.

I'm using a Notebook and have some widgets on Tab 1, that affect the
content of Tab 2. The crash occurs when clicking on Tab 2.

Does anyone have any ideas on how I should go about tracking this down?

--
Stand Fast,
tjg. [Timothy Grant] _______________________________________________

wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Stand Fast,
tjg. [Timothy Grant] _______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Stand Fast,
tjg. [Timothy Grant]
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Josiah,

I played with TreeCtrl, TreeListCtrl and HyperTreeListCtrl.

TreeCtrl doesn’t have the functionality I need by itself, though it works very well.

TreeListCtrl will allow me to present my data exactly as I would like it, but I could find no way to make some of the columns in the ListCtrl portion editable (IntCtrls or SpinCtrls) I may have missed something there and would be happy to learn that I did.

HyperTreeListCtrl provides all the functionality I need, but has some severe flaws on OSX (I posted about that a few days back).

Then I started to try to marry a TreeCtrl to a Grid and got great results on insantiation, it looked beautiful, but when data started changing, and things started resizing it was a mess and I didn’t know where to go to untangle it.

So I simplified. Took a Grid, made the first column look somewhat tree like (though things aren’t collapsable), and went from there. It looks pretty good (though I am unhappy that I can’t have the Editors “float” on top of the grid and that you have to click into the cell to see them [I have seen a couple of solutions that make this not so bad]).

Things work as expected (except for the segfault I’m dealing with and that is currently not a showstopper as I can code other bits of that UI (though I’m a bit worried it may become a show-stopper later if I can’t disable editing in that row. I guess since I have code to colour the cells individually I could disable editing individually)

I would love to know of a better approach, so if you have one please let me know and I’ll take a look at implementation.

···

On Thu, Jul 17, 2008 at 11:09 AM, Josiah Carlson josiah.carlson@gmail.com wrote:

I may have missed this, but I’m curious if you considered using the

TreeListCtrl. Sure, you don’t get complete control over rendering,

but you can get complete control over editing in-place.

  • Josiah

On Thu, Jul 17, 2008 at 9:54 AM, Timothy Grant timothy.grant@gmail.com wrote:

It was a good assumption. It took me a while before I learned that trick and

I lived in frustration for a few days watching windows pop up on my screen

with information in them and then vanishing before I had time to read what

they said.

OSX believes the segfault is in one of the wx for OSX libs, not in python

itself.

On Thu, Jul 17, 2008 at 9:21 AM, brian.d.fett@seagate.com wrote:

Ah, I would have assumed, but you know what they say.

I guess I don’t know the last time I managed to get a segfault in python,

I always seem to get a traceback.

-Brian

Brian Fett

1280 Disc Dr

SHK224

Shakopee, MN 55379

Phone: (952)402-2595

Brian.D.Fett@seagate.com

“Timothy Grant” timothy.grant@gmail.com

Sent by: wxpython-users-bounces@lists.wxwidgets.org

No Phone Info Available

07/17/2008 10:45 AM

Please respond to

wxpython-users@lists.wxwidgets.org

To

wxpython-users@lists.wxwidgets.org

cc

Subject

Re: [wxpython-users] My app crashes on Windows, but not on OSX.

Brian,

That’s already done. I work at a console prompt so that’s where I prefer

to see messages. The only output I get is the diagnostics from the various

print statements I put in the code to track down the problem.

No trace back, no nothing until I get the segmentation fault printed on

the screen.

On Thu, Jul 17, 2008 at 7:20 AM, brian.d.fett@seagate.com wrote:

I would start to track this down by disabling the stout forwarding:

app = wx.App(redirect=False)

If you create your wx.App with argument False, then the stout information

is kept in the calling program (be it drPython, or X) rather than sent to a

GUI window. Very useful for fixing bugs that cause crashes.

I am not sure if this is what you needed, but this is how I would start to

“go about tracking this down.”

-Brian

Brian Fett

1280 Disc Dr

SHK224

Shakopee, MN 55379

Phone: (952)402-2595

Brian.D.Fett@seagate.com

“Timothy Grant” timothy.grant@gmail.com

Sent by: wxpython-users-bounces@lists.wxwidgets.org

No Phone Info Available

07/16/2008 04:33 PM

Please respond to

wxpython-users@lists.wxwidgets.org

To

wxPython-users@lists.wxwidgets.org

cc

Subject

[wxpython-users] My app crashes on Windows, but not on OSX.

Up until today, the code I have written on my PowerBook has performed

flawlessly on Windows too. I don’t have a windows box to test on, so rely on

a friend who has a Vista box.

My most recent iteration of code works just fine for me, but when he gets

it he can make it crash, a hard crash, no traceback no anything, and I have

no idea where to start debugging this process.

I’m using a Notebook and have some widgets on Tab 1, that affect the

content of Tab 2. The crash occurs when clicking on Tab 2.

Does anyone have any ideas on how I should go about tracking this down?

Stand Fast,

tjg. [Timothy Grant] _______________________________________________

wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Stand Fast,

tjg. [Timothy Grant] _______________________________________________

wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Stand Fast,

tjg. [Timothy Grant]


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Stand Fast,
tjg. [Timothy Grant]

Mike,

Thanks for taking the time to look that info up. My reading of those docs was that the leaf-nodes of the tree were editable. But I very well could have completely misunderstood what I was reading. I will investigate that as soon as I click “Send.”

As to your last point, that was what I was attempting.

All that said, I have now figured out what the problem was. As I said in an earlier message I was going to set each cell individually to ReadOnly. This worked exactly as expected and I got no seg-faults. However, I did start generating and exception on my SetColAttr() call. A little experimentation showed that CellAttributes die when a Cell gets destroyed, So my self.attr was getting garbage collected and I was still trying to reference it. Creating a new CellAttr object each time I rebuilt the table has stopped the crash.

Of course if you’re reading of the TreeListCtrl is correct I will have done all this simply as an educational experience!

···

On Thu, Jul 17, 2008 at 12:02 PM, Mike Driscoll mike@pythonlibrary.org wrote:

Timothy Grant wrote:

Josiah,

I played with TreeCtrl, TreeListCtrl and HyperTreeListCtrl.

TreeCtrl doesn’t have the functionality I need by itself, though it works very well.

TreeListCtrl will allow me to present my data exactly as I would like it, but I could find no way to make some of the columns in the ListCtrl portion editable (IntCtrls or SpinCtrls) I may have missed something there and would be happy to learn that I did.

Maybe I’m being naive here, but isn’t the SetColumnEditable() method of the TreeListCtrl what you want?

http://www.wxpython.org/docs/api/wx.gizmos.TreeListCtrl-class.html

Looks like SetItemText might work too:

http://lists.wxwidgets.org/pipermail/wxpython-users/2005-July/041220.html

//SetItemText(self, item, text, column)

//

Admittedly, I’ve never used this widget…I’m using Google right now…

HyperTreeListCtrl provides all the functionality I need, but has some severe flaws on OSX (I posted about that a few days back).

Then I started to try to marry a TreeCtrl to a Grid and got great results on insantiation, it looked beautiful, but when data started changing, and things started resizing it was a mess and I didn’t know where to go to untangle it.

So I simplified. Took a Grid, made the first column look somewhat tree like (though things aren’t collapsable), and went from there. It looks pretty good (though I am unhappy that I can’t have the Editors “float” on top of the grid and that you have to click into the cell to see them [I have seen a couple of solutions that make this not so bad]).

Things work as expected (except for the segfault I’m dealing with and that is currently not a showstopper as I can code other bits of that UI (though I’m a bit worried it may become a show-stopper later if I can’t disable editing in that row. I guess since I have code to colour the cells individually I could disable editing individually)

I would love to know of a better approach, so if you have one please let me know and I’ll take a look at implementation.

You should be able to set rows to read only by using the SetReadOnly method of the grid widget. See the following:

http://www.nabble.com/Enable-Disable-editing-on-a-cell-in-wx.grid.-td17968856.html


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Python Extension Building Network: http://www.pythonlibrary.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Stand Fast,
tjg. [Timothy Grant]

Mike you were indeed correct. You can set a column to editable.

I just got a newfound appreciation for the Demo app. I tested that concept inside the demo so I didn’t have to build a toy app to test with.

Thank you Robin, that is a VERY cool feature of the Demo.

···

On Thu, Jul 17, 2008 at 12:27 PM, Timothy Grant timothy.grant@gmail.com wrote:

Mike,

Thanks for taking the time to look that info up. My reading of those docs was that the leaf-nodes of the tree were editable. But I very well could have completely misunderstood what I was reading. I will investigate that as soon as I click “Send.”

As to your last point, that was what I was attempting.

All that said, I have now figured out what the problem was. As I said in an earlier message I was going to set each cell individually to ReadOnly. This worked exactly as expected and I got no seg-faults. However, I did start generating and exception on my SetColAttr() call. A little experimentation showed that CellAttributes die when a Cell gets destroyed, So my self.attr was getting garbage collected and I was still trying to reference it. Creating a new CellAttr object each time I rebuilt the table has stopped the crash.

Of course if you’re reading of the TreeListCtrl is correct I will have done all this simply as an educational experience!

On Thu, Jul 17, 2008 at 12:02 PM, Mike Driscoll mike@pythonlibrary.org wrote:

Timothy Grant wrote:

Josiah,

I played with TreeCtrl, TreeListCtrl and HyperTreeListCtrl.

TreeCtrl doesn’t have the functionality I need by itself, though it works very well.

TreeListCtrl will allow me to present my data exactly as I would like it, but I could find no way to make some of the columns in the ListCtrl portion editable (IntCtrls or SpinCtrls) I may have missed something there and would be happy to learn that I did.

Maybe I’m being naive here, but isn’t the SetColumnEditable() method of the TreeListCtrl what you want?

http://www.wxpython.org/docs/api/wx.gizmos.TreeListCtrl-class.html

Looks like SetItemText might work too:

http://lists.wxwidgets.org/pipermail/wxpython-users/2005-July/041220.html

//SetItemText(self, item, text, column)

//

Admittedly, I’ve never used this widget…I’m using Google right now…

HyperTreeListCtrl provides all the functionality I need, but has some severe flaws on OSX (I posted about that a few days back).

Then I started to try to marry a TreeCtrl to a Grid and got great results on insantiation, it looked beautiful, but when data started changing, and things started resizing it was a mess and I didn’t know where to go to untangle it.

So I simplified. Took a Grid, made the first column look somewhat tree like (though things aren’t collapsable), and went from there. It looks pretty good (though I am unhappy that I can’t have the Editors “float” on top of the grid and that you have to click into the cell to see them [I have seen a couple of solutions that make this not so bad]).

Things work as expected (except for the segfault I’m dealing with and that is currently not a showstopper as I can code other bits of that UI (though I’m a bit worried it may become a show-stopper later if I can’t disable editing in that row. I guess since I have code to colour the cells individually I could disable editing individually)

I would love to know of a better approach, so if you have one please let me know and I’ll take a look at implementation.

You should be able to set rows to read only by using the SetReadOnly method of the grid widget. See the following:

http://www.nabble.com/Enable-Disable-editing-on-a-cell-in-wx.grid.-td17968856.html


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Python Extension Building Network: http://www.pythonlibrary.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


Stand Fast,
tjg. [Timothy Grant]


Stand Fast,
tjg. [Timothy Grant]

Timothy Grant wrote:

Mike you were indeed correct. You can set a column to editable.

I just got a newfound appreciation for the Demo app. I tested that concept inside the demo so I didn't have to build a toy app to test with.

Thank you Robin, that is a VERY cool feature of the Demo.

--
Stand Fast,
tjg. [Timothy Grant]

That's great. I thought I'd read about people doing just that on the list earlier in the year. It may have been before you joined. Not sure why someone else didn't jump in though. The treelist guys must be on vacation.

And the demo is definitely cool.

Mike