FFS is crashing for one particular job!

Get help for specific problems
Posts: 21
Joined: 7 Jun 2010

saicode

I am a long time Synctoy user started using FreeFileSync 1 day ago and really
enjoying it!!

I have two folder pairs. The second pair is a portion of the first one that is
supposed to sync to another folder.

Pair 1
<Left>D:\Fonts</Left> <Right>F:\share-stuffs\Font_Sync_Resu</Right>

Pair 2
<Left>D:\Fonts\Fonts_Library</Left> <Right>C:\Users\robin\Documents\Magic
Briefcase\Font_BKUP</Right>

The Pair 1 is working just fine but as soon as I try to sync Pair 2 the
program is just crashing. I have tried it many time it keeps happening.
scrnshot:
http://s7.postimage.org/m1qc3y97v/ffs_error.jpg

All other sync jobs are working just fine. What is the problem? Is there
sometime I am doing wrong?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

OMG :> Is this reproducible? What version of FFS are you using?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

I'm assuming you're on x64 with FFS 5.6: Replace the FreeFileSync_x64.exe
located in subdirectory "bin" with this one:
[404, Invalid URL: http://freefilesync.sourceforge.net/FFS%20v5.6-test.rar]

When the crash occurs again a file "exception.dmp" will be created in the
working directory. Please send me this file for analysis.
Posts: 21
Joined: 7 Jun 2010

saicode

Thanks Zenju.

Yes it's reproducible.

I am not able to download from the link you posted. I am getting the the
following error:
1. Server: freefilesync.sourceforge.net
2. URL path: /FFS
3. Error notes: NONE
4. Error type: 404
5. Request method: GET
6. Request query string: NONE
7. Time: 2012-08-23 12:02:31 UTC (1345723351)
Posts: 21
Joined: 7 Jun 2010

saicode

And yes, I am using FFS 5.6 on Win7_64Bit
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Sourceforge bug: don't click on the link, but copy and paste it
Posts: 21
Joined: 7 Jun 2010

saicode

Thanks again Zenju.
Hi I tried with your file.

It's still crashing and it not generating any exception.dmp. :(
I tried twice.

It's just leaving two sync.ffs_lock files, one in the source other in the
destination directory.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

> It's still crashing


This is "good", as long as the problem is reproducible we'll nail it down
eventually.

Could you make a screenshot or paste the info shown when you click "view
problems details" on the Windows crash dialog?

Also: If the FFS version I sent does not create the dump file itself you can
force it: Install Process Explorer, find the 64 bit FFS executable, rightclick and select "create full dump". If the dump file is too large (even if
compressed), then select "create minidump". Then send me this file, and I
should see what FFS was doing while it crashed. But make sure you create the
dump for the modified FFS version I posted above, not the regular FFS
executable.
Posts: 21
Joined: 7 Jun 2010

saicode

Thanks for your patience and help Zenju!

Here are the screenshots for Windows crash dialog, and the minidump.
http://ge.tt/9U8oAYM?c

Hope it helps you to find the bug and smash it! :)

By the way, what’s the difference between the standard and the modified
version of FFS, if I may ask?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

> difference between the standard and the modified


The modified version has debugging symbols and compiler optimizations turned
off.


> find the bug and smash it


Alas, the dump file is messed up. This could be due to a problem when taking
the shot or another consequence of the underlying problem. You took the dump
while the crash dialog was shown, right?

The error code "c0000417" could give a hint. Some research finds this is the
hex value of STATUS_INVALID_CRUNTIME_PARAMETER. I have registered a handler
for this type of exception, which cannot do much, but it will show an almost
empty message box. This should guarantee a stable runtime context for you to
take a hopefully non-corrupted dump file.

Here is the new version:
[404, Invalid URL: http://freefilesync.sourceforge.net/FFS_v5.6_test.rar]
Posts: 21
Joined: 7 Jun 2010

saicode

Full dump is more than 130MB and more than 30MB when zipped!

So uploading the minidump:
http://ge.tt/6mtzJZM/v/0?c

Please let me know if this was of any work?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Unfortunately I still see a corrupted call stack. Anyway, did you see the
messagebox this time or did it crash as usual?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Additionally, in order to make sure we don't have a general problem with
taking the snapshots, could you make one in a non-erroneous situation, e.g.
when FFS is showing a message box?
Posts: 21
Joined: 7 Jun 2010

saicode

I saw a blank message box.
I tool the snapshot while FFS was showing the showing the message box (and
hung).
Posts: 21
Joined: 7 Jun 2010

saicode

Is there something else I could do to take the snapshot?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Yes, there are two things:
1. create a snapshot during a normal FFS operation, when it is showing a message box. I want to see if there is some general problem with taking snapshots.
2. When the blank message box is shown after the error occured, go into process explorer, lookup FreeFileSync_x64.exe properties, goto Threads tab, and click "stack" with the main thread selected (FreeFileSync_x64.exe!WinMainCRTStartup). Click "Copy All" and report the call stack. This will be poor man's debugging, but at least I should be able to see *where* the error occurs.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

I'm just realizing you also need the debugging symbols for step 2: I've
updated [404, Invalid URL: http://freefilesync.sourceforge.net/FFS_v5.6_test.rar] Just place FreeFileSync_x64.pdb
also into subfolder "bin" just like FreeFileSync_x64.exe.
Posts: 21
Joined: 7 Jun 2010

saicode

Now suddenly it can manage to compare , although with many popups.

Here are the all the files that you needed. Please see the file names for
description.
http://ge.tt/77nm3fM

By the way, what does that yellow thunderbolt icon that you can find in todays
screenshot with many popups?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Both dump files are not working, this is unrelated to your issue and means we
have to do it the hard way. Your callstack for the main thread hanging on a
messagebox however proves invaluable! Alas again something went wrong, I do
not see the symbol names in the callstack but symbol addresses only. So after
painstakingly resolving the symbol names by hand I know what went wrong: A C
library function "strftime" fails upon receiving invalid input, and decides to
crash the application! Why tell there is a problem, when you can instead kill
anybody? It's pathtetic!

I'm not yet sure how to fix this. Right now I see only nasty solutions which
are unnacceptable.

Anyway the trigger for this "bug" (or "by design" as others seem to call it)
is an invalid date on some of your files. This is most likely for one of the
items that got the thunderbolt icon, which answers your other question.

Could you have a look at your files in question and tell me the exact file
modification dates? I want to know what invalid dates resulted in the crash.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Here is the fixed version:
[404, Invalid URL: http://freefilesync.sourceforge.net/FreeFileSync_5.7_beta_setup.exe]
Posts: 21
Joined: 7 Jun 2010

saicode

The new beta is also crashing...

The modified dates for the conflicting files are blank!!
Here is what i mean : http://ge.tt/4DMTnhM/v/0?c

But the other job with the same files in it is working just fine!
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

> The new beta is also crashing...


This means we either have two problems to address, or the bugfix did not work.
I've again made a debug version of the v5.7 beta containing the recent
changes:

[404, Invalid URL: http://freefilesync.sourceforge.net/FFS_5.7_beta_test.rar]
- Copy both files into the "bin" subdirectory of the FFS 5.7 beta version.

This time, again the messagebox will be shown *but* it will write an
"exception.dmp" file automatically before showing the message. Please send me
this file. Whether this works or not, again go into process explorer and copy
the call stack for the main thread manually like last time (but only *if* the
main thread is hanging, if another thread is hanging showing the message box
I'll want to see this one).


> The modified dates for the conflicting files are blank!!


These invalid dates were at least one cause for a crash, in the newer version
they are blank, in the test version it will show "error".
Could you go into Windows Explorer, right click on those files and make a
screenshot of the file modifcation times?


> working just fine!


After showing the messagebox, FFS continues so the effect is that the error
get's ignored, still we need to find out what is causing it.
Posts: 21
Joined: 7 Jun 2010

saicode

I meant it's working fine for another batch job, which includes the same files
with blank modification date. And not crashing or showing any error message.

Pair 1 <Left>D:\Fonts</Left> <Right>F:\share-stuffs\Font_Sync_Resu</Right>
Pair 2 <Left>D:\Fonts\Fonts_Library</Left>
<Right>C:\Users\robin\Documents\Magic Briefcase\Font_BKUP</Right>

Both pair 1 and pair 2 contains the same file on left side.
Pair 1 is working fine but Pair 2 creates all the problems we are talking
about.

I can see the msg box showing that the exception.dmp file has been written but
I am not able to find the exception.dmp file. Where is it written?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

It is written to the current working directory, which by default is
<installation folder>/bin.
Posts: 21
Joined: 7 Jun 2010

saicode

It's not being written... I tried few times.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

I just checked, it's written directly into <installation folder>
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

PS: if you've installed into "C:\program files\FreeFileSync" make sure to
start with admin rights, the OS doesn't allow write access otherwise. In any
case, just paste the call stack, this will be better than nothing and I should
see where the problem occurs.
Posts: 21
Joined: 7 Jun 2010

saicode

Here are the files. Both exception.dmp and process explorer minidump are
there.

http://ge.tt/7nAeXpM?c
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

It's frustrating, all dump files are corrupted...it could have been so
*easyy*. But I need to analyze the hard way again. Could you again paste the
Process Explorer call stack for the thread that is hanging showing the
messagebox?
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

with "process explorer call stack" I mean the textual representation in PE,
not the dump file.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Let me know if there is further interest to get this problem fixed. I won't
keep the test setup for too long.
Posts: 21
Joined: 7 Jun 2010

saicode

Sorry for the late reply. I have been busy in traveling and the that PC is at
home.

I will get back to with the "process explorer call stack" tonight when I get
home.
Posts: 21
Joined: 7 Jun 2010

saicode

User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Thanks for the update! It seems my validity check does not catch the invalid
date it is given. I have therefore enhanced the popup message you are seeing
with details about the data:

[404, Invalid URL: http://freefilesync.sourceforge.net/FFS_5.7_beta_test2.rar]

Please send me a screenshot of the new popup text and also the "exception.dmp"
that is created. I changed a few things in the dump creation routine, perhaps
it is working now.
Posts: 21
Joined: 7 Jun 2010

saicode

User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

I'm not able to reproduce the error condition with the values from the popup
message, which could be due to differences in the version of the CRT. Anyway,
I think the problem is related to the year which is 2199. If I change the year
to 10000 I'm finally able to reproduce it! Clearly a year 10000 is not an
invalid parameter; in any case it's a runtime parameter and not a design-time
one. So MS' decision to have the application crash on a runtime parameter
which is NOT even in conflict with the C standard definition of "struct tm"
which places no bounds on the "year" is a plain implementation bug.
Since I cannot do the parameter validation myself since MS does not adhere to
the standard, the only solution is to disable these kinds of asserts entirely
(thanks MS for providing the means to do so) and have the time formatting
function fail, which is at least reasonable behavior according to the function
contract.
This is what I have done in the new beta version. I assume the problem is
finally fixed:

[404, Invalid URL: http://freefilesync.sourceforge.net/FreeFileSync_5.8_beta_setup.exe]
Posts: 21
Joined: 7 Jun 2010

saicode

Hi ZenZu

This one seems to be working! Although I get a conflict popup and the
thunderbolt marked files. What’s surprising for me that in the other job which
syncs the very same files (from left to another directory) does not show the
conflicts!

But anyhow, it’s working. Here is one screenshot just in case you want to
refer to [http://ge.tt/2YgtQNN/v/0?c.](http://ge.tt/2YgtQNN/v/0?c.)

Thanks a lot for such long painstaking efforts to resolve this issue!!




One more thing!

Because I have have really benefited by FFS and humbled by your personal
attention for helping me out, I would like to return the favor by contributing
to your FFS project.

Even though FFS has become one of my indispensable program like many other
users, in my humble opinion the GUI (mainly the Icons) is quite dated and can
be improved to make the program even more attractive.

If you would like I could suggest some more options (just visual, using more
apt icons and if possible colors etc.) for FFS.

I am not specifically UI designer (I am an Industrial designer by profession),
but I have to do UI design as part of some projects and I believe I can help
to make FFS visually much better.

You could find some of my work at www.saikatbiswas.com.
Again, it’s mostly industrial design but it may give you some idea of my
taste.

Looking forward to hearing from you!
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

> conflict popup and the thunderbolt marked files


Just mouse-hover over them with the mouse and have a look at the tooltip
description. I'd expect something like "File %x has an invalid date!"


> contributing to your FFS project.


I gladly accept your offer! :) I like your style, elegant, yet not
unnecessarily fancy; this should fit nicely for FFS. Just get in touch with me
via email and we'll discuss the details. I have a quite clear set of
requirements for the GUI, and having done all the visual design, also a fair
respect on the amount of detail work required. There is definitively room for
improvement, so I'm curioius how the workover will turn out.
Posts: 21
Joined: 7 Jun 2010

saicode

The tool-tip says "Both sides have changed since last synchronization "
Here is a screenshot http://ge.tt/7U1YkON/v/0?c

Thanks for accepting my offer. I am not able to find your email address.
Sent you an a message by Sourceforge with my email ID.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

> Both sides have changed since last synchronization


This conflict is due to the automatic mode being unable to set a sync
direction. However I would expect a categorization conflict, too, since FFS
handles files with a date at least one year in the future as conflicting. This
conflict can be seen if you toggle the middle grid to categorization view, via
F8 or right click middle grid's column label.
Posts: 21
Joined: 7 Jun 2010

saicode

Hi Zenju,

Did you get my message with email id?

I am looking forward to starting the GUI work.
User avatar
Site Admin
Posts: 7505
Joined: 9 Dec 2007

Zenju

Yes, and I have sent an answer to the gmail address. Maybe it's in SPAM
folder?