Saturday, January 7, 2012

Bug hunting - Thanks for your help!

Hi all,

Since making FotoSketcher version 2.25 beta available, some users were reporting crashes when trying to launch the program.
Despite testing on 6 different PCs, I had been unable to reproduce the problem.

Therefore, I added some code to do exception handling and thanks to the help of many users (and especially Peter from British Columbia!) I finally tracked down the problem to some corrupt components. For once, my code was not the culprit! After replacing these components, the bug finally disappeared. The current beta version can be downloaded here: http://www.fotosketcher.com/FotoSketcher_beta.exe

I still have a few changes to make, but I should soon be able to upload a release candidate of version 2.25. Stay tuned!


Thank you very much again for your help,

David

38 comments:

greywulf said...

Happy to help! The error message I get is:

Exception message = Erreur lors de la lecture de ImageList2.Bitmap: Erreur a la lecture des donnees ImageList2 dans le flux.

When I press OK this is followed by:

Violation d'access a l'adresse 006B122B dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000003B4.

(Please forgive any spelling errors)

This Beta also reports as containing a virus in AVG, but that is probably just because of the exception handling code.

David said...

Thanks a lot Greywulf. That's very helpful!
As for the anti-virus alert, it could be caused by the program compression. I have run the exe file through virustotal and it is clean (just one antivirus reported a false positive).

Eltheza said...

Hi David!

I'm very happy to help too! I love FotoSketcher and have been using it for two years after it featured in a 'workshop' in Computeract!ve magazine.

I get excatly the same two messages as greywulf:-(!

I have Vista SP2 on HP laptop with Microsoft Security Essentials.

Good luck with it and Happy New Year!

Elizabeth;-)

David said...

Thanks Elizabeth and Happy New Year to you too :-)
I'm still bug hunting...

David said...

8th january 12:20 - update : I've just uploaded a new beta version (the batch processing mode has been disabled as I suspect the problem could come from there).

Pierre (BC) said...

Hi David,

The first tests are giving good results. I'll test it more in the days to come. The Emergence Fx is very nice. It would be even better if we could draw only some portions of our picture. E.g. drawing the sky with Emergence, and drawing the ground with watercolor, or vice-versa.

Thanks!

PS: I think you were right, the culprit may be hiding in the Batch mode.

AJS said...

Hi,

I just downloaded the new beta, and I get the following when I try to run it.


Exception class name = EReadError

Exception message = Erreur lors de la lecture de ImageList1.Bitmap: Erreur a la lecture des donnees ImageList dans le flux


These two message repeat and then I get.


Violation d'acces a l'adresse 006A84B0 dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000003B4.


After this I first get a static splash screen and then a second animated splash screen, it hangs here. I am running on Windows 7 Starter.

David said...

Thank you Pierre and AJS. It seems that the problem is not completely ironed out yet...
What baffles me is that I have now tested on 6 differents machines and have not encountered the problem once. This is crazy!
I'll keep looking...

David said...

9th january 14:10 GMT+1 - update : I've just uploaded a new beta version.
I did find some weird things in my Delphi project so I did some cleaning up. As I can't reproduce the bug I hope it will help. Fingers crossed...

AJS said...

Still have the same problem expect the new version actually generates a couple of additional errors. The sequence of events is.

Static splash screen is displayed, then the following errors occur.

Error creating Form1

Exception class name = EReadError

Exception message = Erreur lors de la lecture de ImageList1.Bitmap: Erreur a la lecture des donnees ImageList dans le flux

Error creating Form4

Exception class name = EReadError

Exception message = Erreur lors de la lecture de ImageList1.Bitmap: Erreur a la lecture des donnees ImageList dans le flux

Violation d'acces a l'adresse 006A84B0 dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000003B4.

After this I first get a static splash screen is disappears and then a second animated splash screen, as before it hangs here.

David said...

Thanks AJS. The messages you got are actually helpful. I have two components in my program called Imagelist1 and ImageList2. They are data structures which hold some textures and brushstrokes.
I have not modified them since previous versions of FS, so it's weird that they are causing problems. This could be a bug introduced when I recently updated Delphi... Anyway, I have deleted the 2 ImageLists and recreated them from scratch. A new beta version is now available.
If that still does not work, I will ditch the imagelists completely and use another way to store the images.

Pierre (BC) said...

Hi David,

Just tried the newest version, and I got too many error messages to list them here.

Sorry to tell you that you will have to go back to the drawing board. ;-)

Pierre

David said...

Thanks, Pierre. Back to the drawing board it is then!

David said...

9th january 20:45 GMT+1 - update : on a hunch, I've recompiled using an older version of Delphi. Could you let me know if you get the same error messages?

AJS said...

The latest version gives a slightly different set of errors.

Error creating Form4

Exception class name = EReadError

Exception message = Erreur lors de la lecture de ImageList1.Bitmap: Erreur a la lecture des donnees ImageList dans le flux

Violation d'acces a l'adresse 006A84B0 dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000003B4.

After this the UI starts and the config file is created so it is getting further than before, but I then get the following error.

Violation d'acces a l'adresse 006E2F85 dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000031A0.

Violation d'acces a l'adresse 006F0A9E dans le module 'FotoSketcher_beta.exe'. Lecture de l'adresse 000031A0.

The last error repeats and I have to end fotosketcher by using 'end task' from the task manager.

AJS said...

I just tried the version built with the older compiler and I get the exactly the same sequence of errors, just the addresses in the errors are slightly different which is probably to be expected.

David said...

10th january 17:30 GMT+1 - update : I've just uploaded a new beta version. This time I went back to version 2.20 and started over. I have added the new "Emergence" effect, but the manual brush doesn't work yet. I want to make sure that the crashes are gone before making more changes.
Again, thank you all for your help. It has been invaluable as I could not reproduce the bug.
I'm really keeping my fingers crossed for this new beta...

Pierre said...

Hi David,

It doesn't even want to open. Here's the "Crash report":


Signature du problème :
Nom d’événement de problème: APPCRASH
Nom de l’application: FotoSketcher_beta-test.exe
Version de l’application: 1.0.0.0
Horodatage de l'application: 4f0c6590
Nom du module par défaut: kernel32.dll
Version du module par défaut: 6.0.6002.18449
Horodateur du module par défaut: 4da47967
Code de l’exception: c0000005
Décalage de l’exception: 000bfea5
Version du système: 6.0.6002.2.2.0.768.3
Identificateur de paramètres régionaux: 3084
Information supplémentaire n° 1: b37c
Information supplémentaire n° 2: 2a7328d8bb40c81c93b4b5f46adb8e10
Information supplémentaire n° 3: b37c
Information supplémentaire n° 4: 2a7328d8bb40c81c93b4b5f46adb8e10

AJS said...

The latest version crashes straight away, with the following details.

Problem signature:
Problem Event Name: APPCRASH
Application Name: FotoSketcher_beta.exe
Application Version: 1.0.0.0
Application Timestamp: 4f0c6590
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.17651
Fault Module Timestamp: 4e2111c0
Exception Code: 0eedfade
Exception Offset: 0000d36f
OS Version: 6.1.7601.2.1.0.768.11
Locale ID: 2057
Additional Information 1: b243
Additional Information 2: b243213bf2bb969a7831275dae9dd211
Additional Information 3: a2e4
Additional Information 4: a2e461f48bbbf025ce3a728b386656d8

When the Windows dialog is dismissed then the following error is generated.

Exception EReadError dans le module FotoSketcher_beta (2).exe en 0004FF34.
Erreur lors de la lecture de ImageList1.Bitmap: Erreur a la lecture des donnees ImageList dans le flux.

Once this error is dismissed then the Fotosketcher exits.

BTW, I have run yesterdays image on a Windows XP system without any problems.

Anonymous said...

I've beat on it for an hour and seems good here. My system is HP 8440W WS notebook, 4 gig RAM, Nvidia Quadro fx 380, win 7 64 bit. I do notice that 68% RAM being used. 2.2 has me up to 54% with the same other programs running. CPU utilization is very similar to 2.2.

David said...

11th january 19:15 GMT+1 - update : I've uploaded a new beta, with more debug info. I've also updated the 3rd party skinning component. Can you let me know what error messages you get now (I'm sure you will get a few...)?

Pierre (BC) said...

Dès le départ, j'obtiens:

Error creating Form1
Exception class name = EReadError
Exception message=Erreur lors de la lecture ImageList2.Bitmap: Erreur à la lecture des données ImageList dans le flux.

Puis, un autre message d'erreur trop long à taper ici.
Puis s'ouvre une boîte "Credits" avec des noms de langues pour traduction. Si je clique sur une langue au hasard (Polish, je pense), il s'ouvre plusieurs fenêtres de publicité dans des onglets séparés. Pas très intéressant !

Voilà, c'était mon essai du jour ;-)

David said...

Merci pour ce retour, Pierre.
Je pense que tu as dû cliquer sur le lien du site du traducteur Polonais (j'ai testé et il y a effectivement beaucoup de pubs sur son site).
Si tu as le temps, peux-tu tester le programme suivant : http://www.fotosketcher.com/FotoSketcher_2.20.zip
Il s'agit de la version 2.20 non modifiée et non compressée, mais que j'ai recompilée. Merci pour ton aide :-)

David said...

12th january 10:33 GMT+1 - update : yet another beta version is available here: http://www.fotosketcher.com/FotoSketcher_beta.exe
I've made more changes and added messages after the creation of each form in order to pinpoint where the problem lies.

Pierre (BC) said...

Même problème et mêmes erreurs que celles déjà mentionnées plus haut. Quand je clique jusqu'au bout, j'arrive à la boîte "A propos de Fotosketcher". Puis si je ferme cette fenêtre, rien ne se passe. Le logiciel arrête.

À ton tour...

Pierre said...

J'avais téléchargé la version du 12 janvier. Je viens de télécharger celle du 11 janv. Celle que tu me demandes de tester.

Alors voici le résultat: APPCRASH

Signature du problème :
Nom d’événement de problème: APPCRASH
Nom de l’application: FotoSketcher.exe
Version de l’application: 1.0.0.0
Horodatage de l'application: 4f0db82c
Nom du module par défaut: kernel32.dll
Version du module par défaut: 6.0.6002.18449
Horodateur du module par défaut: 4da47967
Code de l’exception: c0000005
Décalage de l’exception: 000bfea5
Version du système: 6.0.6002.2.2.0.768.3
Identificateur de paramètres régionaux: 3084
Information supplémentaire n° 1: b37c
Information supplémentaire n° 2: 2a7328d8bb40c81c93b4b5f46adb8e10
Information supplémentaire n° 3: b37c
Information supplémentaire n° 4: 2a7328d8bb40c81c93b4b5f46adb8e10

Lire notre déclaration de confidentialité :
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x040c

David said...

13th january 19:10 GMT+1 - update:
A new version is available here:
http://www.fotosketcher.com/FotoSketcher_beta.exe
I've gotten rid of two ImageLists that might have gotten corrupted. Let's see if this helps!

Barry said...

Your new one gave me an error..

Not the same error as the other people's.

It starts OK, runs OK, I went to pen&ink 1, then to painting #8, expressive strokes.

The error was something like "hors des limites2 or something. I didn't record it because I went back and tried to recreate it, no go, work fine on the second trial (still first run though, I'll re-run it and try again, brb).

Yup, happened again on a new run:
"Index de ligne hors limites" is the proper message.

If you click ok it still runs properly and doesn't repeat until the next run.
It appears to happen when you run through a few styles.

Barry said...

It's painting 8.. it happens if you go straight to painting 8 (I only said about the other because that's what I did when I saw the error).

It happens on painting 8, and then 8 does nothing in the preview box. If you keep selecting 8 (after going to, say, painting 7) the message repeats, but after a few times there's no message and painting 8 preview shows working.

It's quite weird!

David said...

Thanks Barry. That's actually a minor bug. I will tackle it soon.
The main problem seems to be now solved. I'll upload a new beta sometime tomorrow.

David said...

14th january 13:23 GMT+1 - update:
I think I've finally ironed out most of the nasty bugs. Thank you to everyone who helped me!

Pierre said...

Hi David,

Your newest upload still has problems embedded in them. I had to manually Kill the process to shut it off.

David said...

Hi Pierre,

I've just received your private message, so thanks again for your help. Apparently you no longer have the bug so it seems I have finally stomped it!
I will now finish adding a few things (languages and tweaks) and version 2.25 will soon be ready for official release.

Barry said...

Great news!..

Don't forget to remove the debug code - I've seen a lot of good coders forget that bit!

Merv said...

Strange. I have been using your first beta (on an XP machine) and still have not encountered any problems. As a matter of interest did you do any tracking by operating system? Just curious. Have there been bug reports from other users on XP machines?

I only used the emergence brush and enhanced it with manual expressive strokes several times.

David said...

@Barry: yes, I've commented out all the debug code. It's still there (but inactive) if I ever need it again!
@Merv: I could not find a link between the version of Windows used and the bug. I tested on XP, Vista and 7 with no problem. It is a mystery! Now that I deleted the problematic components, everything seems to have gone back to normal.

Morpheus said...

I'm getting this pop-up 'Index de ligne hors limites' with 3.30. Thoughts?

David said...

Hi Morpheus,
I was never able to reproduce the problem. Have you tried the 64bit version (available from Fosshub.com)? Hopefully, this might solve the issue.