EXC_BAD_ACCESS calling wx.TextCtrl.SetValue in 2.9 carbon

Hey,

I've got a program which worked fine on 2.8 however after changing to
2.9 I got Python quit unexpectedly errors when running. I've stepped
through the code and found its a .SetValue call on a TextCtrl which is
causing the program to crash. Is this known about? Is there a change
in 2.9 or a work around for this? Any ideas what I can do to get this
working in 2.9?

Cheers!

Paul

I noticed creating a wx.lib.masked.TimeCtrl causes the same error, in
TextBase ChangeValue on the line:
_core_.TextEntryBase_ChangeValue(*args, **kwargs)

I've also noticed that I can't see the selection in combo boxes (they
always look blank)

When I call GetValue on a ComboBox I get:
wx._core.PyAssertionError: C++ assertion "IsValid(n)" failed at /BUILD/
wxPython-src-2.9.3.1/src/osx/choice_osx.cpp(212) in GetString():
wxChoice::GetString(): invalid index

There's other problems as well, mainly visual with custom drawn items
and layouts that I guess are just differences in 2.9

Basically my motivation for switching to 2.9 is the frame native
toolbar in mac is drag-able by the whole toolbar and not just the
title bar like in 2.8 but it looks like I would have to overcome all
these issues if I were to do so. Is there a way instead I could
perhaps take the toolbar part of 2.9 and include it, or overwrite it
in 2.8 somehow?

What's my best option?

···

On Mar 22, 10:19 am, Paul <poal...@gmail.com> wrote:

Hey,

I've got a program which worked fine on 2.8 however after changing to
2.9 I got Python quit unexpectedly errors when running. I've stepped
through the code and found its a .SetValue call on a TextCtrl which is
causing the program to crash. Is this known about? Is there a change
in 2.9 or a work around for this? Any ideas what I can do to get this
working in 2.9?

Cheers!

Paul

Hey,

I've got a program which worked fine on 2.8 however after changing to
2.9 I got Python quit unexpectedly errors when running. I've stepped
through the code and found its a .SetValue call on a TextCtrl which is
causing the program to crash. Is this known about? Is there a change
in 2.9 or a work around for this? Any ideas what I can do to get this
working in 2.9?

Cheers!

Paul

I noticed creating a wx.lib.masked.TimeCtrl causes the same error, in
TextBase ChangeValue on the line:
_core_.TextEntryBase_ChangeValue(*args, **kwargs)

I've also noticed that I can't see the selection in combo boxes (they
always look blank)

When I call GetValue on a ComboBox I get:
wx._core.PyAssertionError: C++ assertion "IsValid(n)" failed at /BUILD/
wxPython-src-2.9.3.1/src/osx/choice_osx.cpp(212) in GetString():
wxChoice::GetString(): invalid index

Please make small runnable samples for that demonstrates each of these problems. MakingSampleApps - wxPyWiki Also, what version of OSX are you using? Carbon or Cocoa build of wxPython? Running Python in 32-bit or 64-bit mode?

There's other problems as well, mainly visual with custom drawn items
and layouts that I guess are just differences in 2.9

Basically my motivation for switching to 2.9 is the frame native
toolbar in mac is drag-able by the whole toolbar and not just the
title bar like in 2.8 but it looks like I would have to overcome all
these issues if I were to do so. Is there a way instead I could
perhaps take the toolbar part of 2.9 and include it, or overwrite it
in 2.8 somehow?

No.

···

On 3/22/12 3:59 AM, Paul wrote:

On Mar 22, 10:19 am, Paul<poal...@gmail.com> wrote:

--
Robin Dunn
Software Craftsman

Hey,

I’ve got a program which worked fine on 2.8 however after changing to
2.9 I got Python quit unexpectedly errors when running. I’ve stepped
through the code and found its a .SetValue call on a TextCtrl which is
causing the program to crash. Is this known about? Is there a change
in 2.9 or a work around for this? Any ideas what I can do to get this
working in 2.9?

Cheers!

Paul

I noticed creating a wx.lib.masked.TimeCtrl causes the same error, in
TextBase ChangeValue on the line:
core.TextEntryBase_​ChangeValue(*args, **kwargs)

I’ve also noticed that I can’t see the selection in combo boxes (they
always look blank)

When I call GetValue on a ComboBox I get:
wx._core.PyAssertionError: C++ assertion “IsValid(n)” failed at /BUILD/
wxPython-src-2.9.3.1/src/osx/​choice_osx.cpp(212) in GetString():
wxChoice::GetString(): invalid index
Please make small runnable samples for that demonstrates each of these
problems. http://wiki.wxpython.org/​MakingSampleApps Also, what version
of OSX are you using? Carbon or Cocoa build of wxPython? Running Python
in 32-bit or 64-bit mode?

I’ve attached a small program with the problems reproduced, just change the value of i to see them all

I’m on OSX 10.6.8, on carbon build 2.9.3.1 osx-carbon (classic) with running python in 32-bit mode

There’s other problems as well, mainly visual with custom drawn items
and layouts that I guess are just differences in 2.9

Basically my motivation for switching to 2.9 is the frame native
toolbar in mac is drag-able by the whole toolbar and not just the
title bar like in 2.8 but it looks like I would have to overcome all
these issues if I were to do so. Is there a way instead I could
perhaps take the toolbar part of 2.9 and include it, or overwrite it
in 2.8 somehow?

No.

I didn’t think so :stuck_out_tongue:

problems2.9.py (1.35 KB)

···

On Thursday, 22 March 2012 17:11:14 UTC, Robin Dunn wrote:

On 3/22/12 3:59 AM, Paul wrote:

On Mar 22, 10:19 am, Paulpoal...@gmail.com wrote:


Robin Dunn
Software Craftsman
http://wxPython.org

Hey Robin did you get a chance to run the sample?

Was wondering if there was any news?

Not yet, I haven't done a another Carbon build in a while.

···

On 4/10/12 7:08 AM, Paul Wiseman wrote:

Hey Robin did you get a chance to run the sample?

Was wondering if there was any news?

--
Robin Dunn
Software Craftsman

Hey,

I’ve got a program which worked fine on 2.8 however after changing to

2.9 I got Python quit unexpectedly errors when running. I’ve stepped

through the code and found its a .SetValue call on a TextCtrl which is

causing the program to crash. Is this known about? Is there a change

in 2.9 or a work around for this? Any ideas what I can do to get this

working in 2.9?

Cheers!

Paul

I noticed creating a wx.lib.masked.TimeCtrl causes the same error, in

TextBase ChangeValue on the line:

core.TextEntryBase_ChangeValue(*args, **kwargs)

I’ve also noticed that I can’t see the selection in combo boxes (they

always look blank)

When I call GetValue on a ComboBox I get:

wx._core.PyAssertionError: C++ assertion “IsValid(n)” failed at /BUILD/

wxPython-src-2.9.3.1/src/osx/choice_osx.cpp(212) in GetString():

wxChoice::GetString(): invalid index

Please make small runnable samples for that demonstrates each of these problems. http://wiki.wxpython.org/MakingSampleApps Also, what version of OSX are you using? Carbon or Cocoa build of wxPython? Running Python in 32-bit or 64-bit mode?

There’s other problems as well, mainly visual with custom drawn items

and layouts that I guess are just differences in 2.9

Basically my motivation for switching to 2.9 is the frame native

toolbar in mac is drag-able by the whole toolbar and not just the

title bar like in 2.8 but it looks like I would have to overcome all

these issues if I were to do so. Is there a way instead I could

perhaps take the toolbar part of 2.9 and include it, or overwrite it

in 2.8 somehow?

No.

Sorry to revive this older post- and also baring in mind you did say no.

How can I get this working? I don’t mind getting my hands dirty and making some cpp changes and building from source.

I was looking to see if I could find which file this might have been fixed in in 2.9, but where the toolbar is loaded in as a CDLL from the carbon framework I’m not really sure where to start looking.

Which files contain the fix for the draggable toolbar in 2.9? and roughly what changes would be needed in 2.8.12 to get it working (what wasn’t working in the last version of 2.8 that disabled the dragging? I’m led to believe it used to work in earlier versions 2.8 but broke at some point?)

···

On 22 March 2012 17:11, Robin Dunn robin@alldunn.com wrote:

On 3/22/12 3:59 AM, Paul wrote:

On Mar 22, 10:19 am, Paulpoal...@gmail.com wrote:

Robin Dunn

Software Craftsman

http://wxPython.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Sorry, I don't know. You may be able to find it with some searching through the SVN history in Trac.

http://trac.wxwidgets.org/log/wxWidgets/trunk

You may also want to try with the latest SVN version of the 2.8 branch, if you haven't already. The fix may have been applied there since the last release.

https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH/
https://svn.wxwidgets.org/svn/wx/wxPython/branches/WX_2_8_BRANCH/

···

On 10/5/12 5:38 AM, Paul Wiseman wrote:

Sorry to revive this older post- and also baring in mind you did say no.

How can I get this working? I don't mind getting my hands dirty and
making some cpp changes and building from source.

I was looking to see if I could find which file this might have been
fixed in in 2.9, but where the toolbar is loaded in as a CDLL from the
carbon framework I'm not really sure where to start looking.

Which files contain the fix for the draggable toolbar in 2.9? and
roughly what changes would be needed in 2.8.12 to get it working (what
wasn't working in the last version of 2.8 that disabled the dragging?
I'm led to believe it used to work in earlier versions 2.8 but broke at
some point?)

--
Robin Dunn
Software Craftsman