Jump to content
Sign in to follow this  
sbsmac

Squint - the sqf editor and error-checker

Recommended Posts

@slammer - glad it's working for you now :-)

@lozz - are you looking in the right place for the program ? You need to look under Start->all programs->macs tools->squint.

Share this post


Link to post
Share on other sites
@slammer - glad it's working for you now :-)

Well until today now it constantly crashes, just doing the little window that it does on loading, then W7 tell me it stopped working, uninstalled it, reinstalled it with no diffrence.

Here is the error report.

Problem signature:
 Problem Event Name:	APPCRASH
 Application Name:	squint.exe
 Application Version:	1.0.0.0
 Application Timestamp:	4ced817f
 Fault Module Name:	clr.dll
 Fault Module Version:	4.0.30319.1
 Fault Module Timestamp:	4ba1d9ef
 Exception Code:	c0000005
 Exception Offset:	00060051
 OS Version:	6.1.7600.2.0.0.768.3
 Locale ID:	1053
 Additional Information 1:	7676
 Additional Information 2:	76760e18df457ec3f70494d59f3b4730
 Additional Information 3:	ab8d
 Additional Information 4:	ab8ddbd459cd3504ebb6a257f456467b

:(

reg M

Share this post


Link to post
Share on other sites

It's quite strange (and rather worrying) that you are seeing a crash in clr.dll - that's the .Net common runtime. The only examples I can find on the web indicate that this _might_ be due to a missing reference which shouldn't occur unless you have a corrupted download of squint or .Net.

To ensure you really have got rid of squint completely... from the DOS prompt (start, cmd)

cd \documents and settings

del squint.* /s/q

NOTE - be VERY careful with the above. If you get the wildcards wrong you could erase all your documents

Note this will delete your squint configuration and any other project files so you might want to back up the latter from documents\squint.

You should make sure you've got all the latest .net related windows updates installed obviously.

I'm not at all sure these steps will fix your problem but I'll be adding some extra debug capability in the next version which might at least give me a better clue what's going on when it does crash. :j:

Share this post


Link to post
Share on other sites

Now uploaded. I've also added screenshots for all themes. You can see them on the themes page.

I'd love to get more themes from other people as well so if anyone would like to share, please post them here. :)

Thanks also for the bug-reports on dev-heaven deadfast. My interest in squint is re-awakening so I expect to start making some improvements and bug fixes in the next few weeks after I've cleaned up some of the code as a result of the Mac.Arma release.

Share this post


Link to post
Share on other sites

Good progress, saves me from stabbing random objects normally.

Formatting needs work still, finding coupled {} w/wo ;'s is especially grinding on my psyche.

Performance is problematic when the program hits syntaxtically unclean files.

The parser also has failings when parsing over format'd textual instances.

Specifically, a redundant space or tab is not cleanly detected in a format[''];'d statement, nor can be semicolons. Having a file parsed with a format'd problem causes a tree->leaf going parse problem which hides globals and causes all files to fail to be able to have their locals declared as private.

I do some work for RP-Mods, and her'e an excerpt from a line you'd probably seen:

(format["[" "KilledCiv" ", %1, " "%2""] spawn Isse_AddCrimeLogEntry; if (%1 in civarray)then{if(!(" "murder"" in %1_reason))then{%1_reason = %1_reason + [" "murder""]}; kopfgeld_%1 = kopfgeld_%1 + 30000};", player,_killer]) call broadcast;

Triggers "Missing element after comma" and a cyclic recursive failure to interpret (Like ANSI C would) thereafter despite it being the only true issue. (Missing comma, missing element, after, expecting, etc) attempts should be made to see if the next element regardless of the problematic line is functionally accurate in the ARMA scope instead of reverting to as I said cyclic recursion or par deforma trickle down problems. Not under every circumstance will the parser fail, but let's just say a few should cause it.. Through a few missing quotes, malformated formats, it'll happen.

I have a munged file loaded, this causes it to complain of variable being undeclared (corrupt, blah) but no suggestion or attempt is made to let the user or parser suggest privatizing, despite an individual file elsewhere in the project being clean except for missing it's privates, no puns intended.

Math-oriented functions don't correctly diagnose evaluation problems. Normally math issues are like the logic, left to right as are Latin-deriving speakers is how we think, thus moving further through the line, a multiplication or division of a variable suggests precedence also from left to right, where items encapsulated in parenthesis are explicitly acted upon after the last parenthesis, a syntax issue, but a functionally correct interpretation most of us have.

if ((cos(this)*that)==hai) is fairly common

- James

Edited by sparcdr

Share this post


Link to post
Share on other sites

James, thanks for the feedback. I must admit I'm finding it a little difficult to 'parse' some of your comments so apologies if I do not address them all :)

Formatting needs work still, finding coupled {} w/wo ;'s is especially grinding on my psyche.

Can you expand on this ? If you have a 'highlight' colour different from your background colour (in settings/editor/code-window) then...

1) Blocks preceding errors (such as missing semicolon) will be highlighted when you select the error.

2) Matching braces are highlighted as you use the arrow keys to move the cursor past them.

3) You can right-click and select 'highlight bracketed area' at any point.

Performance is problematic when the program hits syntaxtically unclean files.

Can you supply an example ? There are certainly some cases where this can happen - deeply nested includes or complex macro nesting or _very_ (thousands of entries) arrays but if you notice appreciable performance problems with a 'simple' file it's a bug.

The parser also has failings when parsing over format'd textual instances.

Specifically, a redundant space or tab is not cleanly detected in a format[''];'d statement, nor can be semicolons.

The first error I see here is

Unexpected input '"KilledCiv"' in array element

which looks correct to me. Unless I'm missing something, quote-escaping requires the quotes to be placed next to each other so the correct form would have been ...

"[""KilledCiv""

With the spaces, squint (and arma) will interpret the second quote as closing the string and thus it appears as if you have provided multiple array elements that haven't been separated by commas. The 'follow on' problems you report are likely to be due to subsequent quote mismatching meaning that the closing array square-bracket appears to be part of a string so squint continues to assume that the rest of the file is just the contents of an (unclosed) array. Similar to this...

a= ["a string " "intended-to-be-quoted" " ] <-now the closing brace looks like it is inside a string and the rest of the file will be poorly handled.

I have a munged file loaded, this causes it to complain of variable being undeclared (corrupt, blah) but no suggestion or attempt is made to let the user or parser suggest privatizing, despite an individual file elsewhere in the project being clean except for missing it's privates, no puns intended

Sorry, I don't understand what you mean here. Can you provide a simple example ?

Math-oriented functions don't correctly diagnose evaluation problems. Normally math issues are like the logic, left to right as are Latin-deriving speakers is how we think, thus moving further through the line, a multiplication or division of a variable suggests precedence also from left to right, where items encapsulated in parenthesis are explicitly acted upon after the last parenthesis, a syntax issue, but a functionally correct interpretation most of us have.

if ((cos(this)*that)==hai) is fairly common

I'm not quite sure what you're getting at here ? Different operators have different evaluation priority in sqf (as they do in other languages). It's possible that some of the assumed priorities in squint are incorrect but I don't think that's what you are referring to. The thing that many people fail to understand about sqf is that brackets do not denote function arguments but are simply there for grouping. Ie

operator(this) * that 

may evaluate as

(operator this)  * that 

OR

operator (this * that )

depending on the priority of 'operator' (I can't remember what the priority is for cos off the top of my head.)

This is precisely why squint warns

Careful - this may not evaluate as you expect - use brackets

Indeed, if you right-click on the error and select "help on errors" you will find this explanation here: https://sites.google.com/site/macsarmatools/squint/errors#TOC-Careful---this-may-not-evaluate-as-

Edited by sbsmac

Share this post


Link to post
Share on other sites
Thank you for the great tool!

One Thing:

I noticed the command setWaypointVisible is not included.

Thanks Melmarkian :-) There's probably a few of the new commands missing which I need to add. Squint development has been shelved for a bit but I may pick it up again with the recent news that ToH will use sqf for scripting.

Share this post


Link to post
Share on other sites

Hi I want to use this great tool but I get a System.IndexOutOfRangeException error everytime I launch the installer or launcher :confused::confused::confused:

Share this post


Link to post
Share on other sites
Hi I want to use this great tool but I get a System.IndexOutOfRangeException error everytime I launch the installer or launcher :confused::confused::confused:

Got .NET 4 installed?

Share this post


Link to post
Share on other sites

Could you post the contents of the exception 'details' ? Thanks

Share this post


Link to post
Share on other sites

The signature of the error that my windows reported

Problem signature:
 Problem Event Name:	CLR20r3
 Problem Signature 01:	squint.exe
 Problem Signature 02:	1.0.0.0
 Problem Signature 03:	4ced817f
 Problem Signature 04:	mscorlib
 Problem Signature 05:	4.0.0.0
 Problem Signature 06:	4d53693b
 Problem Signature 07:	3dab
 Problem Signature 08:	105
 Problem Signature 09:	System.IO.DirectoryNotFound
 OS Version:	6.1.7600.2.0.0.256.4
 Locale ID:	2057
 Additional Information 1:	0a9e
 Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
 Additional Information 3:	0a9e
 Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Share this post


Link to post
Share on other sites

When the error dialog comes up, there should be a button marked 'Details'. If you press that you get a whole load more information.

Thanks.

Share this post


Link to post
Share on other sites
When the error dialog comes up, there should be a button marked 'Details'. If you press that you get a whole load more information.

Thanks.

I am using Windows 7 and it had an error "squint has stopped working"

There is a button called "View problem details" the choices are limited, the information it contained is what I posted above.

Share this post


Link to post
Share on other sites

Reminder to you mac - launching squint makes XP say:

0001.jpg

Removing that one file you said last time didn't help as said in Skype.

Any other ideas? Complete reinstall?

Share this post


Link to post
Share on other sites

Apologies to bulkgm for letting this sit in my inbox for so long... Here's a colour scheme he contributed:

afp.png

You can find this and more schemes at the squint colour schemes page.

Share this post


Link to post
Share on other sites

After a XP reinstall I had to reinstall squint as well and it works now again fine. :)

Share this post


Link to post
Share on other sites

sbsmac, that new colour scheme is not actually download-able. File missing.

Share this post


Link to post
Share on other sites

Oops - now fixed. Thanks for pointing it out.

Share this post


Link to post
Share on other sites

Does not recognize:

OBJECT getVariable [sTRING, DEFAULT];

Wants to privatize _forEachIndex, I assume this should get same behaviour as _x?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×