Do you get a dialog box?
Do you get a traceback? (To get a traceback,
run from a prompt, or open drpython.py in drpython, and
run it from the program).
When it crashes, does it crash if you save preferences
without changing it? Specific preferences?
Does 3.4.9 crash as well?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem does not occur on 3.5.0. I do not get a
traceback since python crashes totally (dialog box:
unhandled exception in python.exe)
I get the error without changing anything. I start drpython (I
have also tested to delete preferences.dat first) ->
Options/Preferences -> Save -> Crash!!!
I am using wxpython 2.5.1.5.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you delete or rename preferences.dat before,
does is exist after the crash?
What are the last entries in preferences.dat?
in mine, it is:
<print.tab.width>2</print.tab.width>
Maybe you could try:
remove the try except IOError statements in drPrefsfile.py in
fuction onbtnsave.
drPrefsFile.WritePreferences(self.GetPreferences(), preffile)
If you still get no traceback, try inserting after every line
in onbtnsave a print statement and when the crash happens,
you can discover, where it is.
If you found the offending function, you can put
print statements into this again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if the file is 0 byte, you could add
after exec(e) in WritePreferences in drPrefsfile.py
fin.flush(), and then you can see the last entry,
which was written successfully.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem seems to be the toolbar update. Toolbar
configuration -> Update also crashes. I upgraded to
wxpython 2.5.2.8 and I still have the problem. Maybe it is a
wxwidgets-on-windows-NT bug.
However, everything still works with DrPython 3.5.0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The line 3367 in your patched drpython.py:
self.SetToolBar(None)
right after self.DestroyToolBar() in updatePrefs() solved the
problem. The same problem occurs in drToolBarDialog.py,
line 406. If I add a line self.parent.SetToolBar(None) just
after self.parent.DestroyToolBar() then it works. I
commented out lines 403 and 404 before, which seem to do
something similar.
Thank you very much for your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=796750
I'll need some more information:
What version of wxPython are you using?
Do you get a dialog box?
Do you get a traceback? (To get a traceback,
run from a prompt, or open drpython.py in drpython, and
run it from the program).
When it crashes, does it crash if you save preferences
without changing it? Specific preferences?
Does 3.4.9 crash as well?
Logged In: NO
The problem does not occur on 3.5.0. I do not get a
traceback since python crashes totally (dialog box:
unhandled exception in python.exe)
I get the error without changing anything. I start drpython (I
have also tested to delete preferences.dat first) ->
Options/Preferences -> Save -> Crash!!!
I am using wxpython 2.5.1.5.
Logged In: YES
user_id=772872
if you delete or rename preferences.dat before,
does is exist after the crash?
What are the last entries in preferences.dat?
in mine, it is:
<print.tab.width>2</print.tab.width>
Maybe you could try:
remove the try except IOError statements in drPrefsfile.py in
fuction onbtnsave.
drPrefsFile.WritePreferences(self.GetPreferences(), preffile)
If you still get no traceback, try inserting after every line
in onbtnsave a print statement and when the crash happens,
you can discover, where it is.
If you found the offending function, you can put
print statements into this again.
Logged In: YES
user_id=772872
if the file is 0 byte, you could add
after exec(e) in WritePreferences in drPrefsfile.py
fin.flush(), and then you can see the last entry,
which was written successfully.
Logged In: NO
Hi,
I have tested version 3.5.5.
I have traced the problem with print statements. A
preference file gets saved, but when I run drpython next
time it complains about it.
The error occurs in drpython.py within the function
updatePrefs(self, oldprefs) in the following line (about line
no. 3363)
self.toolbar = wx.ToolBar(self, -1, wx.DefaultPosition,
wx.DefaultSize, wx.TB_HORIZONTAL)
Logged In: YES
user_id=796750
Gotcha. I think I know what is going on.
If you want you rname in the credits (as opposed to
anonymous bug-report), send an email, or post here.
I will probably release the next version sometime tonight.
Cheers,
Dan
Logged In: YES
user_id=796750
Right. No idea of what is going on. I am unable to
reproduce this bug at all.
Have you tried upgrading to wxPython 2.5.2.8?
Does this crash 3.4.9, or 3.3.x?
Logged In: YES
user_id=1133923
The problem seems to be the toolbar update. Toolbar
configuration -> Update also crashes. I upgraded to
wxpython 2.5.2.8 and I still have the problem. Maybe it is a
wxwidgets-on-windows-NT bug.
However, everything still works with DrPython 3.5.0.
Logged In: YES
user_id=796750
Allright. I changed the way the toolbar is added/removed.
(I now use the built in method, to ensure the sizing is
correct).
I have attached a possible workaround.
Plop it in your drpython-3.5.6 directory,
and run it from the command line (or run it in drpy).
Try:
1. Updating without changing anything.
2. Setting the ToolBar Icon Size to 0, then Updating.
3. Setting it from 0 to 24, then Updating.
Does any of this work now?
Patched DrPython
Logged In: YES
user_id=1133923
The line 3367 in your patched drpython.py:
self.SetToolBar(None)
right after self.DestroyToolBar() in updatePrefs() solved the
problem. The same problem occurs in drToolBarDialog.py,
line 406. If I add a line self.parent.SetToolBar(None) just
after self.parent.DestroyToolBar() then it works. I
commented out lines 403 and 404 before, which seem to do
something similar.
Thank you very much for your help!
Logged In: YES
user_id=796750
Glad to have helped!
Thanks for the testing.
This has been fixed 3.5.7.
In drToolBarDialog, I just moved the code to get rid of the
toolbar to within the same if clause.
I also made sure to edit updatePrefs so the SetToolBar(None)
always comes after DestroyToolBar().
Best,
Dan