v1.7 - Deleting LastFile with AutoOpen=true causes crash on startup

Bug #502147 reported by John
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Kabikaboo
Fix Committed
Critical
aidave
kabikaboo (Debian)
New
Undecided
Unassigned

Bug Description

Maybe same error as #414550.

I'm getting an error message every time I try to run the program now. It worked fine the first time I installed it (used the setup.exe installer), but then I turned off my computer and went to bed, and when I started it up today I get an error message saying to check a logfile, which I did. Of course, I don't know what it's telling me. I installed the c++ package the readme file talks about, though I don' think that's it since it started fine the first time I installed it. Any ideas?
Here's what the logfile said:

Traceback (most recent call last):
File "kabikaboo.py", line 3183, in <module>
File "kabikaboo.py", line 64, in initializeinterface
File "kabikaboo.py", line 1250, in openfileonstartup
File "file.pyc", line 96, in open
File "file.pyc", line 105, in loadlastsaved
File "file.pyc", line 287, in loadfromfile_pickle
UnboundLocalError: local variable 'document' referenced before assignment

Tags: 1.7 win

Related branches

Revision history for this message
S (supertanker) wrote :

Testing aidave's theory turned out to be correct: the problem is that Kabikaboo is attempting to auto-load a file that does not exist--e.g., a document was created in Kabikaboo, Kabikaboo was closed, and then the document was moved/deleted. When Kabikaboo starts again, it attempts to autoload.

Temporary fix is to set "autoopen" in C:\Documents and Settings\Your Name\.kabikaboo\settings.txt to False

Changed in kabikaboo:
importance: Undecided → High
status: New → Confirmed
milestone: none → 1.8
Revision history for this message
aidave (aidave) wrote :

Even though this is a serious bug when it happens, it is probably one of the rarer edge cases.

Still a high priority fix.

summary: - app gives error msg and fails to start (Win ver.)
+ v1.7 - Deleting LastFile with AutoOpen=true causes crash on startup
S (supertanker)
Changed in kabikaboo:
assignee: nobody → Cody Jackson (supertanker)
S (supertanker)
Changed in kabikaboo:
status: Confirmed → Fix Released
Revision history for this message
S (supertanker) wrote :

The bug has been fixed in the latest revision of the Kabikaboo trunk. For those who have gone the twenty-nine yards to get Kabikaboo's native source working on Windows, this patch should work. For others, unfortunately, this patch cannot be retroactively applied to the Windows builds, and so will be fixed with the version 1.8 installer.

The patch detects if the file exists before it attempts to open it. If it does not exist, it prints a warning dialog and opens a new, blank file, at which point the user can either find and open the old file or save the new file.

Revision history for this message
aidave (aidave) wrote :

Thanks Cody, the patch looks good.

I can't help but wonder if this bug had a deeper source.
I think the "self.file.open(self.document)" should have dealt with the file not existing...
Nonetheless it is fixed, thanks.

aidave (aidave)
Changed in kabikaboo:
status: Fix Released → Fix Committed
Revision history for this message
aidave (aidave) wrote :

I changed this to Fix Committed instead of Fix Released, I think Released implies its released as a patch, whereas we really just have the fix in the codebase, but are still in need of a patch.

Anyone know/want to build a 1.7.1 patch? :)

There are new font features too...

Changed in kabikaboo:
importance: High → Critical
Revision history for this message
aidave (aidave) wrote :

Changed to "critical" cuz we have 3 duplicates (!) so far...

Revision history for this message
Jeremy Bícha (jbicha) wrote :

aidave, I wish I had seen your question at the time. We definitely could have done a 1.7.1 release. If we're lucky, we might get a 1.8 release out soon. Otherwise I'll have to backport some other fixes to the 1.7 branch.

aidave (aidave)
Changed in kabikaboo:
assignee: Cody Jackson (supertanker) → aidave (aidave)
Revision history for this message
flamma (flamma-member) wrote :

Still happening on Debian sid.

I ceased to use kabikaboo two years ago because I didn't knew why it refused to open. Today I gave a second try and discovered it was because of this.

Revision history for this message
aidave (aidave) wrote :

Yup, we just don't have a patch release for it yet.
Have to use repo if you want bug-free version... sorry!
Would add a patch if I could get some time to figure that shizz out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.