Author Topic: Syntax files could not be located  (Read 1342 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Syntax files could not be located
« on: May 23, 2009, 04:29:56 pm »
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 News On Twitter: http://twitter.com/hippoedit/)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Syntax files could not be located
« Reply #1 on: May 23, 2009, 04:35:44 pm »
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.
 

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Syntax files could not be located
« Reply #2 on: May 23, 2009, 04:48:59 pm »
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.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Syntax files could not be located
« Reply #3 on: May 23, 2009, 05:25:23 pm »
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.

« Last Edit: May 23, 2009, 05:32:08 pm by alex »

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Syntax files could not be located
« Reply #4 on: May 23, 2009, 05:36:39 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..

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Syntax files could not be located
« Reply #5 on: June 05, 2009, 09:11:04 am »
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 ?

--
« Last Edit: June 05, 2009, 09:15:48 am by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Syntax files could not be located
« Reply #6 on: June 05, 2009, 12:09:03 pm »
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.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Syntax files could not be located
« Reply #7 on: June 05, 2009, 12:50:07 pm »
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.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Syntax files could not be located
« Reply #8 on: June 05, 2009, 01:18:21 pm »
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.



Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +6/-0
    • View Profile
Re: Syntax files could not be located
« Reply #9 on: June 05, 2009, 01:53:33 pm »
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.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
744 Views
Last post February 23, 2009, 04:09:01 pm
by alex
1 Replies
688 Views
Last post March 02, 2009, 03:59:49 pm
by alex
4 Replies
725 Views
Last post November 04, 2009, 01:06:41 pm
by alex
6 Replies
838 Views
Last post November 12, 2009, 03:37:48 pm
by Stefan
6 Replies
175 Views
Last post January 21, 2012, 03:26:37 am
by alex