|
|
Author: Date: Subject:
Timothy Grant
2008-07-16 14:33:17
[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]
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.<br><br>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.<br>
<br>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.<br><br>Does anyone have any ideas on how I should go about tracking this down?<br clear="all">
<br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author: Date: Subject:
Paul Hartley
2008-07-16 16:26:05
Re: [wxpython-users] My app crashes on Windows, but not on OSX.
If it were me, I would probably try to figure out which widgets are known to
have inconsistencies between platforms and check over the code for those...
but obviously something has to have changed if things stopped working, so
tracing back what could have changed (i.e. in your code, or especially in
your friend's box) could be what you need to do...
paul
On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <[email protected]>
wrote:
> 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
> [email protected]
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
<div dir="ltr"><br>If it were me, I would probably try to figure out which widgets are known to have inconsistencies between platforms and check over the code for those... but obviously something has to have changed if things stopped working, so tracing back what could have changed (i.e. in your code, or especially in your friend's box) could be what you need to do...<br>
<br>paul<br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <<a href="mailto:timothy.grant@gmail.com">timothy.grant@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.<br><br>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.<br>
<br>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.<br><br>Does anyone have any ideas on how I should go about tracking this down?<br clear="all">
<font color="#888888">
<br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
</font><br>_______________________________________________<br>
wxpython-users mailing list<br>
<a href="mailto:wxpython-users@lists.wxwidgets.org">wxpython-users@lists.wxwidgets.org</a><br>
<a href=" http://lists.wxwidgets.org/mailman/listinfo/wxpython-users" target="_blank"> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users</a><br>
<br></blockquote></div><br></div>
_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author: Date: Subject:
Timothy Grant
2008-07-16 16:32:04
Re: [wxpython-users] My app crashes on Windows, but not on OSX.
I know what changed as I'm adding new functionality. Situation gets a bit
funny though. I took my PowerBook down to his office and said "See it works
for me." and showed him just how well it worked. Then he said "Let me try."
So I let him try and he's managed to make it break on OSX, and I can
replicate the problem. It just needed to be exercised more thoroughly on OSX
than it did on Vista. Immediate crash on Vista, not so immediate crash on
OSX.
So now I'm trying to figure out why my abuse of a wx.Grid is causing a
segfault.
On Wed, Jul 16, 2008 at 4:26 PM, Paul Hartley <[email protected]> wrote:
>
> If it were me, I would probably try to figure out which widgets are known
> to have inconsistencies between platforms and check over the code for
> those... but obviously something has to have changed if things stopped
> working, so tracing back what could have changed (i.e. in your code, or
> especially in your friend's box) could be what you need to do...
>
> paul
>
> On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <[email protected]>
> wrote:
>
>> 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
>> [email protected]
>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>>
>>
>
> _______________________________________________
> wxpython-users mailing list
> [email protected]
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
--
Stand Fast,
tjg. [Timothy Grant]
I know what changed as I'm adding new functionality. Situation gets a bit funny though. I took my PowerBook down to his office and said "See it works for me." and showed him just how well it worked. Then he said "Let me try." So I let him try and he's managed to make it break on OSX, and I can replicate the problem. It just needed to be exercised more thoroughly on OSX than it did on Vista. Immediate crash on Vista, not so immediate crash on OSX.<br>
<br>So now I'm trying to figure out why my abuse of a wx.Grid is causing a segfault.<br><br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 4:26 PM, Paul Hartley <<a href="mailto:phartley@gmail.com">phartley@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>If it were me, I would probably try to figure out which widgets are known to have inconsistencies between platforms and check over the code for those... but obviously something has to have changed if things stopped working, so tracing back what could have changed (i.e. in your code, or especially in your friend's box) could be what you need to do...<br>
<br>paul<br><br><div class="gmail_quote"><div><div></div><div class="Wj3C7c">On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <<a href="mailto:timothy.grant@gmail.com" target="_blank">timothy.grant@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
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.<br><br>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.<br>
<br>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.<br><br>Does anyone have any ideas on how I should go about tracking this down?<br clear="all">
<font color="#888888">
<br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
</font><br></div></div>_______________________________________________<br>
wxpython-users mailing list<br>
<a href="mailto:wxpython-users@lists.wxwidgets.org" target="_blank">wxpython-users@lists.wxwidgets.org</a><br>
<a href="http://lists.wxwidgets.org/mailman/listinfo/wxpython-users" target="_blank">http://lists.wxwidgets.org/mailman/listinfo/wxpython-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
wxpython-users mailing list<br>
<a href="mailto:wxpython-users@lists.wxwidgets.org">wxpython-users@lists.wxwidgets.org</a><br>
<a href="http://lists.wxwidgets.org/mailman/listinfo/wxpython-users" target="_blank">http://lists.wxwidgets.org/mailman/listinfo/wxpython-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author: Date: Subject:
Timothy Grant
2008-07-16 19:42:01
Re: [wxpython-users] My app crashes on Windows, but not on OSX.
On Wed, Jul 16, 2008 at 4:32 PM, Timothy Grant <[email protected]>
wrote:
> I know what changed as I'm adding new functionality. Situation gets a bit
> funny though. I took my PowerBook down to his office and said "See it works
> for me." and showed him just how well it worked. Then he said "Let me try."
> So I let him try and he's managed to make it break on OSX, and I can
> replicate the problem. It just needed to be exercised more thoroughly on OSX
> than it did on Vista. Immediate crash on Vista, not so immediate crash on
> OSX.
>
> So now I'm trying to figure out why my abuse of a wx.Grid is causing a
> segfault.
>
>
>
> On Wed, Jul 16, 2008 at 4:26 PM, Paul Hartley <[email protected]> wrote:
>
>>
>> If it were me, I would probably try to figure out which widgets are known
>> to have inconsistencies between platforms and check over the code for
>> those... but obviously something has to have changed if things stopped
>> working, so tracing back what could have changed (i.e. in your code, or
>> especially in your friend's box) could be what you need to do...
>>
>> paul
>>
>> On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <[email protected]>
>> wrote:
>>
>>> 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]
>>>
>>
I've got a bit more information now, narrowed it down to one line of code. I
have the following class. When I uncomment the line in blue. The app
segfaults without it all is fine. I find it particularly puzzling that I can
use the attribute on a column with no problem, but when applied to the row
it segfaults. Any insight would be greatly appreciated.
(and yes, I am aware of a violation of the Law of Demeter It's on the todo
list to be fixed).
class SkillGrid(wxgrd.Grid):
def __init__(self, parent, *args, **kwargs):
wxgrd.Grid.__init__(self, parent, *args, **kwargs)
self.column_headings = ['Skill Name', 'Ability', 'Skill',
'Modifier', 'Misc. Mod']
self.CreateGrid(0, len(self.column_headings))
self.SetRowLabelSize(0)
for i, ch in enumerate(self.column_headings):
self.SetColLabelValue(i, ch)
self.SetColSize(col=i, width=77)
self.SetColSize(col=0, width=200)
self.SetColLabelSize(20)
self.engine = wx.GetApp().engine
self.attr = self.GetOrCreateCellAttr(0,0)
self.attr.SetReadOnly(True)
self.build_skill_grid()
Publisher().subscribe(self.build_skill_grid,
('update', 'character',
'character_class'))
def build_skill_grid(self, message=None):
def add_row_and_data(row, data, format_string="%s"):
self.AppendRows(1)
self.SetCellValue(row=row, col=0,
s=format_string % self.engine.skill_name_for_code(data))
self.SetCellBackgroundColour(row, 0,
self.GetLabelBackgroundColour())
if self.GetNumberRows() > 0:
self.DeleteRows(0, self.GetNumberRows())
cc = self.engine.character_class_for_code_or_name(
name=self.engine.character.character_class)
row = 0
for s in cc.skills:
if type(s) == type([]):
#######################################
# self.SetRowAttr(row - 1, self.attr) #
#######################################
for col in range(len(self.column_headings)):
self.SetCellBackgroundColour(row - 1, col,
self.GetLabelBackgroundColour())
for ss in s:
add_row_and_data(row=row, data=ss, format_string="
%s")
row += 1
else:
add_row_and_data(row, s)
row += 1
self.SetColAttr(0, self.attr)
--
Stand Fast,
tjg. [Timothy Grant]
On Wed, Jul 16, 2008 at 4:32 PM, Timothy Grant <<a href="mailto:timothy.grant@gmail.com">timothy.grant@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I know what changed as I'm adding new functionality. Situation gets a bit funny though. I took my PowerBook down to his office and said "See it works for me." and showed him just how well it worked. Then he said "Let me try." So I let him try and he's managed to make it break on OSX, and I can replicate the problem. It just needed to be exercised more thoroughly on OSX than it did on Vista. Immediate crash on Vista, not so immediate crash on OSX.<br>
<br>So now I'm trying to figure out why my abuse of a wx.Grid is causing a segfault.<div><div></div><div class="Wj3C7c"><br><br><br><div class="gmail_quote">On Wed, Jul 16, 2008 at 4:26 PM, Paul Hartley <<a href="mailto:phartley@gmail.com" target="_blank">phartley@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>If it were me, I would probably try to figure out which widgets are known to have inconsistencies between platforms and check over the code for those... but obviously something has to have changed if things stopped working, so tracing back what could have changed (i.e. in your code, or especially in your friend's box) could be what you need to do...<br>
<br>paul<br><br><div class="gmail_quote"><div><div></div><div>On Wed, Jul 16, 2008 at 2:33 PM, Timothy Grant <<a href="mailto:timothy.grant@gmail.com" target="_blank">timothy.grant@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
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.<br><br>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.<br>
<br>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.<br><br>Does anyone have any ideas on how I should go about tracking this down?<br clear="all">
<font color="#888888">
<br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
</font><br></div></div></blockquote></div></div></blockquote></div></div></div></blockquote><div><br>I've got a bit more information now, narrowed it down to one line of code. I have the following class. When I uncomment the line in blue. The app segfaults without it all is fine. I find it particularly puzzling that I can use the attribute on a column with no problem, but when applied to the row it segfaults. Any insight would be greatly appreciated.<br>
<br>(and yes, I am aware of a violation of the Law of Demeter It's on the todo list to be fixed).<br><br><font face="courier new,monospace">class SkillGrid(wxgrd.Grid):<br> def __init__(self, parent, *args, **kwargs):<br>
wxgrd.Grid.__init__(self, parent, *args, **kwargs)<br><br> self.column_headings = ['Skill Name', 'Ability', 'Skill', <br> 'Modifier', 'Misc. Mod']<br>
<br> self.CreateGrid(0, len(self.column_headings))<br> self.SetRowLabelSize(0)<br><br> for i, ch in enumerate(self.column_headings):<br> self.SetColLabelValue(i, ch)<br> self.SetColSize(col=i, width=77)<br>
<br> self.SetColSize(col=0, width=200)<br> self.SetColLabelSize(20)<br><br> self.engine = wx.GetApp().engine<br><br> self.attr = self.GetOrCreateCellAttr(0,0)<br> self.attr.SetReadOnly(True)<br>
<br> self.build_skill_grid() <br><br> Publisher().subscribe(self.build_skill_grid,<br> ('update', 'character', 'character_class'))<br><br><br> def build_skill_grid(self, message=None):<br>
def add_row_and_data(row, data, format_string="%s"):<br> self.AppendRows(1)<br> self.SetCellValue(row=row, col=0, <br> s=format_string % self.engine.skill_name_for_code(data))<br>
self.SetCellBackgroundColour(row, 0, self.GetLabelBackgroundColour())<br><br> if self.GetNumberRows() > 0:<br> self.DeleteRows(0, self.GetNumberRows())<br><br> cc = self.engine.character_class_for_code_or_name(<br>
name=self.engine.character.character_class) <br><br> row = 0<br> for s in cc.skills:<br> if type(s) == type([]):<br><span style="color: rgb(51, 51, 255);"> #######################################</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"> # self.SetRowAttr(row - 1, self.attr) #</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"> #######################################</span><br>
for col in range(len(self.column_headings)):<br> self.SetCellBackgroundColour(row - 1, col, <br> self.GetLabelBackgroundColour())<br><br> for ss in s:<br>
add_row_and_data(row=row, data=ss, format_string=" %s")<br> row += 1<br> else:<br> add_row_and_data(row, s)<br> row += 1<br><br>
self.SetColAttr(0, self.attr)<br></font> <br></div></div><br><br clear="all"><br>-- <br>Stand Fast,<br>tjg. [Timothy Grant]
_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
|