Syntax files could not be located

Started by Stefan, May 23, 2009, 05:29:56 PM

Previous topic - Next topic

Stefan

1.43. 659

Playing with command line options 

Launch HippoEDIT with command line   " ......  --config e:\a\HippoEDIT\dat2\"   (dat2 is empty)

Get message:  "Syntax files could not be located"

Then crash.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hi Stefan,

Yes. And would you have expected ;)?
HE tries to load settings from e:\a\HippoEDIT\dat2\ and find nothing.

of course I can try to create some dummy settings to avoid crash, but just do not know is it really necessary.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Sorry, i just expect to never see my apps crashes :D
So i expect the author have an routine to catch such errors.
Maybe with IF FileExist(dat2\bla) = False Then  MsgBox "silly boy"
Or TRY CATCH END  , ON ERROR RESUME NEXT,  or something.

The reason i fall in this trap was because i expected HippoEDIT would create a new settings.xml in this empty folder to store my new settings.
I don't had expected that HippoEDIT would search for the syntax files,  because i don't want other syntax files at this moment :D
i just had the need to have an other config ,  while testing command line use.


So the reason for this bug report was  i think you want to catch such error reports by using other code.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

#3
Hello Stefan,

:) Ok I have understood, the problem is that HE requires also some syntax files some keyboard settings, some color palette etc :) And them I could not create by default. And even if I would use some default, do not know how it would work further :D.

I would check, but probably what I can do is only exit app completely in this case, but without crash :)

But this would be already in new beta. Or release. I am planning to release 1.43 soon.

Best regards,
Alex.

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Quote from: alex on May 23, 2009, 06:25:23 PM
I would check, but probably what I can do is only exit app completely in this case, but without crash :)

Thank you, that's all i expected. 
There could be errors, but all code should be wrapped by an error handling, so user would see as less errors as possible.
There could be miss functions and error messages, but no crash reports that let see HE like unstable..
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Stefan

#5
661
Thank Alex. I think you on the right way.
I got an new settings.xml  in dat2 !  :thumpsup:


But i got an crash if i open an file from TC (or just an .LNK) with this command line and press then any key in editor:

- in TC set editor to
- or create an .lnk with this settings
f:\a\HippoEDIT\HippoEdit.exe --new-instance --portable --no-recent --workspace default --config f:\a\HippoEDIT\dat2\

- in TC focus an file and press F4
- or drop an file on the .lnk
- HE starts and provide the file, but if i press an key, HE crashes


this is an example command line used:
f:\a\HippoEDIT\HippoEdit.exe --new-instance --portable --no-recent
           --workspace default --config f:\a\HippoEDIT\dat2\ F:\a\HIPPOE~1\_NSIS_~1.NSI


Can i test more ( i tested several command line already) ?


--------

And what can we do to NOT see the message "Syntax file could not be located" ?
Can we have an command Line flag for --config ?   Like  using  --CONFIG instead  or  --configForce ?

--
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

yes, I can reproduce this. But the fix  I have done was not to make such notepad mode, but just avoid a crash, when no syntax files found. You any way should have at least a def_spec.xml file as syntax to see some editor parts and commands.xml in data\keymaps to have at least keyboard working (even arrows would not work).

Maybe only commands.xml would be enough. But any way, if you should copy commads.xml you can also copy and def_spec.xml and txt_spec.xml to do not have a message about missing language files.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

OOHH, i thought this notepad mode would work now too. Sorry.

---------------------------------------
>not to make such notepad mode, but just avoid a crash, when no syntax files found.
OK, the first crash was trapped.
But then i confirm the dialog box and start typing .... and i get the crash then :-(
Not many assisted  :D

So i think HE should cancel his launch after providing the message

"Syntax file could not be located"
"Programs folder:  :::::: "
"Settings folder: ::::::::\dat2 "
"Please check your command line",

because it's making no sense to have HE open the file .....and then do an crash.
---------------------------------------

Only launch HE if important setting file are there.

I f.ex. was now able to start HE in notepad mode by copying a few files in DAT2 folder:

settings.xml
commands.xml

def_spec.xml
txt_spec.xml

acorrect.xml   (i need this sometimes, sometimes not)
color_default.xml

(But even copying the whole Data folder is only 2,5MB space needed)


---

But i understood too, that's enough too use an command line like:
X:\path to\HippoEDIT\HippoEdit.exe --new-instance --portable --no-recent --workspace notepad
to start HippoEDIT in independent-one-time-only mode.
I will test this more and provide an HowTo soon.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

the crash after typing something would be fixed next beta (it was caused by missing acorrect.xml, which is not really obligatory).

I think the minimum set of settings file to start would be:
commands.xml
keymap_default.xml
def_spec.xml
color_default.xml

I would try to introduce such notepad like mode later, but do not want to spend to much time on this now.
Maybe I would do this step by step.


HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Thank you. No rush!   I was only testing ...and found an work around as shown above.
(my problem was;
if i use HE with default settings i mess up my config and hewsp files with this temporary datas,
so i look for an workaround to start HE  without saving  settings and recent files modifications (or at least save not in my main config )



> I would try to introduce such notepad like mode later,
wouldn't be it enough to have an minimum version of:
commands.xml
keymap_default.xml
def_spec.xml
color_default.xml
inside HE
and  just  create new files from this inside templates if they are missed?

If i want my own settings .... i would provide this files above in data-folder on my own.
If i just start HE  (without knowing everything)  HE should write this files on its own.


But please take your time. This is not important to me.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-