News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

cb-crash-recover folder

Started by tiwag, August 28, 2006, 10:49:02 AM

Previous topic - Next topic

tiwag

the description in the crash-dialog says:
"The application encountered a crash at address %u.\n\n"
"A snapshot of the present state of Code::Blocks has been saved to the directory cb-crash-recover inside your 'My Files' folder.
Hopefully, this will prevent you from losing recent modifications.\n\n"


but in reality a new user-folder is created (at least) on Windoze-systems in the system "Document and Settings" folder

LONG WINAPI CrashHandlerFunc(PEXCEPTION_POINTERS ExceptionInfo)
{
    ...
    wxString path(ConfigManager::GetHomeFolder() + _T("cb-crash-recover"));
    wxMkdir(ConfigManager::GetHomeFolder() + _T("cb-crash-recover"));
    path << _T("/");
    ...
}


e.g. my system

Username = Cad
then ConfigManager::GetHomeFolder() returns "C:\Dokumente und Einstellungen\Cad"
(without Backslash at the end)

and the files are backed up to "C:\Dokumente und Einstellungen\Cadcb-crash-recover"

following the description in the crash-dialog it should be backed up to
"C:\Dokumente und Einstellungen\Cad\Eigene Dateien\cb-crash-revover"

is this what was intended originally ?
otherwise the explanantion in the crash-dialog should be updated accordingly.

thx
tiwag

mandrav

Be patient!
This bug will be fixed soon...

tiwag

its is better but not fixed

at least under Windoze it is NOT backuped to the folder where the description says ...

mandrav

QuoteEigene Dateien

I don't know what that is :) (only suspect "Application Data").
Anyway, I just added the missing slash. Thomas knows which folder to save into is correct though, so let's wait for him to fix this (either by changing the message, or the dest folder).
Be patient!
This bug will be fixed soon...

tiwag

Quote from: mandrav on August 28, 2006, 11:55:20 AM
QuoteEigene Dateien
this is the german translation for "my files", i thought it would be obvious in the cited context ...

Quote from: mandrav on August 28, 2006, 11:55:20 AM
I don't know what that is :) (only suspect "Application Data").
Anyway, I just added the missing slash. Thomas knows which folder to save into is correct though, so let's wait for him to fix this (either by changing the message, or the dest folder).

the "Application Data" folder would be the best location i think

thomas

The intent is to save everything to a subfolder of "My Files" ( == "Eigene Dateien") and that's what happens on my Windows system, too (at least it did so when I last tested it ~2 months ago, and since disabling CC, I have no crashes, so I cannot tell of late ;)).

"Application Data" is not a good place to save it IMO because it is not application data, it is user data. :)

Will look into it pronto. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

thomas

Since that line in the crash handler never changed, it must be GetHomeFolder() which now returns a pathname without trailing slash, while returning a trailing slash before. Strange enough, I cannot find the revision in which this happened (must be a couple of months back).

Anyway, Yiannis' fix seems to do the job. It won't work on Windows 95/98, but the crash handler doesn't work there anyway (no SEH available), so it is not a problem.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

tiwag

#7
Quote from: thomas on August 28, 2006, 02:35:43 PM
The intent is to save everything to a subfolder of "My Files" ( == "Eigene Dateien") and that's what happens on my Windows system, too (at least it did so when I last tested it ~2 months ago, and since disabling CC, I have no crashes, so I cannot tell of late ;)).
you don't need a crash to test, what GetHomeFolder() returns,
and i tell you the truth when i say it does not return the path to "My Files" (at the time of writing svn rev 2914)
it returns the base path of the user account, see AND READ my first posting above.

it does not care in which directory the damned files are saved, but the message in the dialog
should name the right directory.
therefore i propose, to print in the dialog message the variable, which already contains
the path to the backup directory.

i'll do the changes if this is agreed by the bosses ...

tiwag

killerbot

for me it was also in : Docsuments and settings\killerbotcb-crash-recover so when the slash would be inserted it would be a subdir of the top level of my profile (killerbot), which is not something like "My Files" ;-)

thomas

Quote from: killerbot on August 28, 2006, 10:59:58 PM
for me it was also in : Docsuments and settings\killerbotcb-crash-recover so when the slash would be inserted it would be a subdir of the top level of my profile (killerbot), which is not something like "My Files" ;-)
This is "My Files"...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."