PlanetSquires Forums

Support Forums => General Board => Topic started by: Ivan Iraola on November 19, 2009, 10:00:20 PM

Title: Code Sampler
Post by: Ivan Iraola on November 19, 2009, 10:00:20 PM
The attached ZIP file contains a simple Code Sampler (project), it shows the basic use of ComboBoxes, Buttons, ListBoxes, etc.

Opinions, suggestions, criticism welcome.  :)
Title: Re: Code Sampler
Post by: Dominique Bodin on November 20, 2009, 04:30:30 PM
Thank's for this cool sample,
but i have a big problem with it !

ifi decompress the .zip, and open the project, and go : all is ok

if i click to view the ProcessTab3 panel, now compile . . .

the ide v3.04 crash ! ! !

i use vista

Dominique
Title: Re: Code Sampler
Post by: Ivan Iraola on November 20, 2009, 05:05:43 PM
I don't have Vista, so I can't test it.

Anyone else has this problem?
Title: Re: Code Sampler
Post by: Haakon Birkeland on November 20, 2009, 05:26:05 PM
Yep.

And even switching back to the other parts it dies anyway â€" for a while. After a few restarts I was given an error message instead, that I didn't really bother to read but just commented out. After compilation went through again, I let the commented line back into action and it even compiled on the third tab ...

Next restart and compilation failed ... I'd guess there is something in here that FF don't appreciate from time to time.

Title: Re: Code Sampler
Post by: Ivan Iraola on November 20, 2009, 06:59:56 PM
I've noticed that FF crashes sometimes, especially when I open projects (switching from one to another), but never bother, I thought it was my machine.

What line did you comment out?, are you running Vista?.

I run Win XP Pro SP2 and I don't get any compiling errors.
Title: Re: Code Sampler
Post by: Paul Squires on November 20, 2009, 07:57:06 PM
I can't get it to crash. I am using Windows 7. 

Back with FF2 we used to have a problem with crashes when switching projects. I can't remember the last time that this ever happened to me with FF3.
Title: Re: Code Sampler
Post by: Rolf Brandt on November 20, 2009, 08:23:31 PM
Tried it out on XP Home SP2 - works!
XP Home SP3 - works.
Win7 Ultimate - works.
XP Pro SP3 - does not compile, error see screenshot.

Rolf
Title: Re: Code Sampler
Post by: Haakon Birkeland on November 21, 2009, 04:47:35 AM
Seem to be this one, as it failed again this morning on the first compilation;

FF_ProgressBar_SetFgColor( HWND_PROCESSTAB3_BIGPROGRESSBAR, 1234 )

Commenting it out will make it compile fine, and when removing the comment-mark it still compiles â€" without the error. Switching back to form view on Tab 3, or any other part, and it still compiles fine so far â€" again and again.

Seems rather inconsistent unfortunately.

I'm BTW on XP Pro x64 SP2.
Title: Re: Code Sampler
Post by: Haakon Birkeland on November 21, 2009, 04:50:29 AM
Maybe we should have our OS version in the profile (Personal Text field) for these kind of incidences, as it might be helpful to Paul or others?! It Will then show under the profile image/avatar.

Just a thought ...
Title: Re: Code Sampler
Post by: David Warner on November 21, 2009, 09:34:06 AM
No crashes or compilation problems with the CodeSampler project here on my XP Pro SP3 Dell Precision Laptop.
Title: Re: Code Sampler
Post by: Paul Squires on November 21, 2009, 10:35:44 AM
Quote from: Haakon Birkeland on November 21, 2009, 04:50:29 AM
Maybe we should have our OS version in the profile (Personal Text field) for these kind of incidences, as it might be helpful to Paul or others?! It Will then show under the profile image/avatar.

Just a thought ...

That's a very good idea.
Title: Re: Code Sampler
Post by: Dominique Bodin on November 21, 2009, 11:48:42 AM
I continue to have crash in the ide !

if i extract the sample, double click on the project to open it in the ide.
I then click on compile (without doing anything else !), it compiles ok and the .exe works ok too.
If i just click on the processtab3 panel, i click on compile and "crash" !
Even when i comment the ligne cited before, it crash the ide ! ! !

I use Vista and the last update.

Thank's

Dominique
Title: Re: Code Sampler
Post by: David Warner on November 21, 2009, 12:53:54 PM
Quoteclick on the processtab3 panel, i click on compile and "crash"

Same here
Title: Re: Code Sampler
Post by: Ivan Iraola on November 21, 2009, 01:03:17 PM
Ok, after reading what Dominique said I ran some tests, and guess what, IT CRASHES!!!.

This is the sequence:

Sequence #1

1- Open FF
2- Open the Sampler project
3- Click on the "ProcessTab3" tab on the designer
4- Click on Compile/Run
5- FF3 shuts down!!!!!

Sequence #2

1- Open FF
2- Open the Sampler project
3- DO NOT CLICK ON ANY TABS on the designer
4- Compile/Run = No problem
5- Open a different project
6- Compile/run, look at it whatever, no problem
7- Open the Sampler again
8- Compile/run
9- BOOM!!!

Also, after the crash, I see in Task Manager that "drwtsn32.exe" and "dumprep.exe" froze, they die after a while, or if you force termination, but the Sampler stops compiling fine.

Just for ha-has, I'm gonna redo the sampler since I wrote it using FF3 original release, I don't think that's gonna make a difference but I'll try.
Title: Re: Code Sampler
Post by: Marc van Cauwenberghe on November 21, 2009, 01:25:57 PM

Have the same results as Haakon.
Overall very difficult to track, sometimes it compiles sometimes not.

I seem to remember vaguely having something like this happen to me some time ago It also had to do with TABs.
Tried to figure it out for an hour now. I can't make head or tail of this.
Will try again later


Title: Re: Code Sampler
Post by: Paul Squires on November 21, 2009, 01:41:23 PM
Thanks guys, I will run some tests on Ivan's project later today. If it is a FF3 problem then I will get it fixes as soon as possible.

Right now, I am working on a couple more videos to upload for the FirePass tutorial.....
Title: Re: Code Sampler
Post by: Marc van Cauwenberghe on November 21, 2009, 01:51:09 PM
If I have to test someting, please let me know.

Marc
Title: Re: Code Sampler
Post by: Ivan Iraola on November 21, 2009, 06:39:59 PM
It crashes sometimes and displays there's a problem with OLEAUT32.DLL, don't know if that helps.

It Seems to happen with projercts containing a TAB control.
Title: Re: Code Sampler
Post by: David Warner on November 24, 2009, 06:56:08 AM
Hi Folks,

I know it is probably 'teaching Granny to suck eggs' but I find WinMerge http://winmerge.org/ (http://winmerge.org/) is a very useful tool to view file changes.

I extracted two copies of the CodeSampler project, left the first untouched, opened the second copy in FF3.04 clicked on the tab 3 and replicated the crash.

The major differences I noted in the crashing version are...

The [Objects] section in the Guide.ffp has zero filled numeric value following the .frm
e.g. Form=.\forms\ProcessTab1.frm|1384756480|30042495|
became Form=.\forms\ProcessTab1.frm|0|0|

The [ControlType](s) in ProcessTab3.frm all have zorder=1 instead of an incrementing number.

Regards,

David



Title: Re: Code Sampler
Post by: Paul Squires on November 24, 2009, 08:27:53 AM
Quote
The [ControlType](s) in ProcessTab3.frm all have zorder=1 instead of an incrementing number.
hmmm.... you may be on to something there. Back in the beta days an issue like this was reported. I don't think we could ever recreate the reason for the zorders all resetting to 1. Looks like it's time to re-investigate!  :)
Title: Re: Code Sampler
Post by: David Warner on November 24, 2009, 09:14:48 AM
I should probably have mentioned that the Tab Form Widths also changed... "width=474" became "width=476", and "ClientWidth=474" became "ClientWidth=476".

Let me know if I can do anything to help.

Regards,

David
Title: Re: Code Sampler
Post by: Paul Squires on November 24, 2009, 01:09:15 PM
Quote from: Dominique Bodin on November 20, 2009, 04:30:30 PM
Thank's for this cool sample,
but i have a big problem with it !

ifi decompress the .zip, and open the project, and go : all is ok

if i click to view the ProcessTab3 panel, now compile . . .

the ide v3.04 crash ! ! !

i use vista

Dominique

I have finally been able to see the crash in action (had to switch to a WinXP computer). Now that I see it, then maybe I can diagnose the cause of it.
Title: Re: Code Sampler
Post by: Paul Squires on November 24, 2009, 02:38:31 PM
Hi Guys,

I think that I may have solved the problem with zOrders being reset to 1 for all controls. For thos eof you out there who are willing to take a chance, please try the new FF3 exe in the attachment to this post. In theory, the new exe should not affect the functionality of your existing code base but just in case, don't try it unless you back up your projec first.

The change I made was to add one function call to a function that ensures that TabOrder is correct when the form displays on the screen.



[attachment deleted by admin]
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 03:06:41 PM
I tried the new EXE, still crashed.
Title: Re: Code Sampler
Post by: Dominique Bodin on November 24, 2009, 03:22:50 PM
Hello,
i've tried the new exe, and after modifying many things, i had no crash anymore .

I've modified the tab 3, and all is ok.

Tested also other samples, no crash.

I use Vista with all updates.

Thank's
Title: Re: Code Sampler
Post by: David Warner on November 24, 2009, 03:26:49 PM
Hi Ivan,

QuoteI tried the new EXE, still crashed.

Try un-zipping your example and use that version. It works for me, no crash so far.

@Paul: The Help...About menu is not working in your new EXE.

Regards,

David
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 03:40:17 PM
Quote
Try un-zipping your example and use that version.

Yup, that one works without crashing.
Title: Re: Code Sampler
Post by: Paul Squires on November 24, 2009, 03:51:52 PM
Quote from: David Warner on November 24, 2009, 03:26:49 PM
@Paul: The Help...About menu is not working in your new EXE.

Yes, I realized that I left some debug information there after I uploaded the zip file. I figured that I would wait to hear back regarding the success/failure of the change before changing the upload.

So, if I'm hearing you guys correctly, the change is a resounding success at this point.  That makes me happy.  :)
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 03:57:15 PM
Quote
So, if I'm hearing you guys correctly, the change is a resounding success at this point.  That makes me happy

Hold your horses mister!!!  :P at home I have an application that contains about 10 forms (Tabs and other owned forms), if that one doesn't crash then we're in business.

I'm pretty confident you've solved the problem but let's make sure.  ;)
Title: Re: Code Sampler
Post by: Rolf Brandt on November 24, 2009, 03:58:55 PM
Ivan,

I was just wondering if you have some additional functions in your functions library that the other do not have. If you used those in your sample project could that cause some of the problems?

Rolf
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 04:01:58 PM
Quote from: Rolf Brandt on November 24, 2009, 03:58:55 PM
Ivan,

I was just wondering if you have some additional functions in your functions library that the other do not have. If you used those in your sample project could that cause some of the problems?

Rolf

No, that sample was written using only "standard" FF3.
Title: Re: Code Sampler
Post by: Rolf Brandt on November 24, 2009, 04:03:15 PM
Was just an idea that crossed my mind!
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 08:01:26 PM
I have a question, the "quick fix" apparently works but ONLY with the "original" sampler code, so, what if you already have a code (like in my case) almost done and is not compiling, the final fix will address this problem?, this code it contains 10 forms and 1 module, still having sporadic crashes. I would really hate to recreate the GUI.

I hope we find the bug because this is really frustrating.
Title: Re: Code Sampler
Post by: Paul Squires on November 24, 2009, 08:17:13 PM
Hi Ivan,

If this problem is indeed due the "z-order's being reset to 1" (and that does seem to be the case) then the only solution for fixing existing projects with this problem is to manually edit each .frm form file. You could try editing the zorder= numbers for each control to ensure that they are all different (rather than all set to 1).
Title: Re: Code Sampler
Post by: Ivan Iraola on November 24, 2009, 09:21:10 PM
Ok, let's see what happens then.  ;D
Title: Re: Code Sampler
Post by: Elias Montoya on December 04, 2009, 03:20:04 PM

It seldom happens here but it does.
Title: Re: Code Sampler
Post by: Pete Totushek on December 04, 2009, 06:46:00 PM
If this is the same issue that I reported during beta stages, then Ivan, to fix your program that crashes during compile, just go to each form and move something (just one thing - like a button or something), re-compile, and it should work.  Then you can go back to each form and move things back into place if needed.

-Pete
Title: Re: Code Sampler
Post by: Ivan Iraola on December 04, 2009, 06:52:34 PM
Yes, I knew the workaround.
Title: Re: Code Sampler
Post by: Paul Breen on December 17, 2009, 05:20:27 PM
Same problem:
If I just compile and run, it works.
If I press maybe one or two tabs, it works.
If I go to text mode (edit code, make no changes) and just move around a bit, it crashes with a "memory could not be read" error.
Funny, I just replied in a similar manner to Mr. Brandt's sqlitening program. . .
xp pro sp3 2G memory. FF3.04
pb
Title: Re: Code Sampler
Post by: Ivan Iraola on December 17, 2009, 05:23:06 PM
Paul,

FF3 3.04 had an issue with zOrder and tabs, have you upgraded to 3.05?
Title: Re: Code Sampler
Post by: Rolf Brandt on December 17, 2009, 05:56:44 PM
I think that is exactly the case, Ivan. I just loaded a project from my desktop (FF 3.05) on my netbook (FF 3.04), and it crashes.

Paul, I think an update to FF 3.05 will solve the problem.
Title: Re: Code Sampler
Post by: Rolf Brandt on December 17, 2009, 06:11:28 PM
I just updated my netbook to FF 3.05. loaded the SQLMan project and tried to compile. FF crashed. Loaded again, loaded all tab children into designer mode and tried to compile again. This time it compiled fine.