Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
debug startup error

Subject: debug startup error

From: Yi Cao

Date: 25 Jul, 2008 11:40:18

Message: 1 of 11

my Matlab reports an error at startup,
"[Fatal Error] :-1:-1: Premature end of file."

I have removed user defined startup.m file. But the error
still comes up. Anyone knows how to debug such an error?

Thank for help.

Yi Cao

Subject: debug startup error

From: Fangjun Jiang

Date: 25 Jul, 2008 12:54:03

Message: 2 of 11

You might also check pathdef.m to see if there is any
corruption.

"Yi Cao" <y.cao@cranfield.ac.uk> wrote in message <g6ce32
$a86$1@fred.mathworks.com>...
> my Matlab reports an error at startup,
> "[Fatal Error] :-1:-1: Premature end of file."
>
> I have removed user defined startup.m file. But the
error
> still comes up. Anyone knows how to debug such an error?
>
> Thank for help.
>
> Yi Cao

Subject: debug startup error

From: Fangjun Jiang

Date: 25 Jul, 2008 13:00:19

Message: 3 of 11

Also, I don't know if your Matlab command window still
opens up. Another file to look into is matlabrc.m, which
is related to the Matlab startup.

"Fangjun Jiang" <f@j.com> wrote in message
<g6cidb$pbc$1@fred.mathworks.com>...
> You might also check pathdef.m to see if there is any
> corruption.
>
> "Yi Cao" <y.cao@cranfield.ac.uk> wrote in message <g6ce32
> $a86$1@fred.mathworks.com>...
> > my Matlab reports an error at startup,
> > "[Fatal Error] :-1:-1: Premature end of file."
> >
> > I have removed user defined startup.m file. But the
> error
> > still comes up. Anyone knows how to debug such an
error?
> >
> > Thank for help.
> >
> > Yi Cao
>

Subject: debug startup error

From: Yi Cao

Date: 25 Jul, 2008 14:26:02

Message: 4 of 11

Thanks for reply. I have checked all files in the
toolbox\local folder including pathdef.m and matlabrc.m.
Nothing is wrong there. Any other place I should check?

Yi Cao


"Fangjun Jiang" <f@j.com> wrote in message <g6cip3$r6
$1@fred.mathworks.com>...
> Also, I don't know if your Matlab command window still
> opens up. Another file to look into is matlabrc.m, which
> is related to the Matlab startup.
>
> "Fangjun Jiang" <f@j.com> wrote in message
> <g6cidb$pbc$1@fred.mathworks.com>...
> > You might also check pathdef.m to see if there is any
> > corruption.
> >
> > "Yi Cao" <y.cao@cranfield.ac.uk> wrote in message
<g6ce32
> > $a86$1@fred.mathworks.com>...
> > > my Matlab reports an error at startup,
> > > "[Fatal Error] :-1:-1: Premature end of file."
> > >
> > > I have removed user defined startup.m file. But the
> > error
> > > still comes up. Anyone knows how to debug such an
> error?
> > >
> > > Thank for help.
> > >
> > > Yi Cao
> >
>

Subject: debug startup error

From: Fangjun Jiang

Date: 25 Jul, 2008 14:50:18

Message: 5 of 11

Is your Matlab command window still up? Would lasterr()
provide some extra info? Otherwise, I have no other ideas.
The error seems pretty serious. Do you recall anything you
did recently that could corrupt some files related to
Matlab?


"Yi Cao" <y.cao@cranfield.ac.uk> wrote in message
<g6cnpq$hlp$1@fred.mathworks.com>...
> Thanks for reply. I have checked all files in the
> toolbox\local folder including pathdef.m and matlabrc.m.
> Nothing is wrong there. Any other place I should check?
>
> Yi Cao
>
>
> "Fangjun Jiang" <f@j.com> wrote in message <g6cip3$r6
> $1@fred.mathworks.com>...
> > Also, I don't know if your Matlab command window still
> > opens up. Another file to look into is matlabrc.m,
which
> > is related to the Matlab startup.
> >
> > "Fangjun Jiang" <f@j.com> wrote in message
> > <g6cidb$pbc$1@fred.mathworks.com>...
> > > You might also check pathdef.m to see if there is
any
> > > corruption.
> > >
> > > "Yi Cao" <y.cao@cranfield.ac.uk> wrote in message
> <g6ce32
> > > $a86$1@fred.mathworks.com>...
> > > > my Matlab reports an error at startup,
> > > > "[Fatal Error] :-1:-1: Premature end of file."
> > > >
> > > > I have removed user defined startup.m file. But
the
> > > error
> > > > still comes up. Anyone knows how to debug such an
> > error?
> > > >
> > > > Thank for help.
> > > >
> > > > Yi Cao
> > >
> >
>

Subject: debug startup error

From: Yi Cao

Date: 25 Jul, 2008 16:32:02

Message: 6 of 11

"Fangjun Jiang" <f@j.com> wrote in message <g6cp7a$bp0
$1@fred.mathworks.com>...
> Is your Matlab command window still up? Would lasterr()
> provide some extra info? Otherwise, I have no other
ideas.
> The error seems pretty serious. Do you recall anything
you
> did recently that could corrupt some files related to
> Matlab?
>
>

Yes, the command window still up, but lasterr does not give
any information except ''.

I managed to make a breakpoint in matlabrc.m. But the error
already happens before the matlabrc. Do you know what is
executed before matlabrc?

I also tried to search the string ':-1:-1' using wingrep
for all *.m files in the disk. But I cannot find any file.
Any othe ideas?

Yi

Subject: debug startup error

From: Fangjun Jiang

Date: 25 Jul, 2008 17:14:06

Message: 7 of 11

The other thing to check might be the license.dat. But I
don't think there is much lead on that.

Is there anything that you can think of that might leads
to this fatal error, something you did on your computer
system, files, install/uninstall?

I did a search on the Mathworks support
website. "Premature end of file" leads to an article about
QuickTime. I don't know if it is anything related.


"Yi Cao" <y.cao@cranfield.ac.uk> wrote in message <g6cv61
$s0m$1@fred.mathworks.com>...
> "Fangjun Jiang" <f@j.com> wrote in message <g6cp7a$bp0
> $1@fred.mathworks.com>...
> > Is your Matlab command window still up? Would lasterr
()
> > provide some extra info? Otherwise, I have no other
> ideas.
> > The error seems pretty serious. Do you recall anything
> you
> > did recently that could corrupt some files related to
> > Matlab?
> >
> >
>
> Yes, the command window still up, but lasterr does not
give
> any information except ''.
>
> I managed to make a breakpoint in matlabrc.m. But the
error
> already happens before the matlabrc. Do you know what is
> executed before matlabrc?
>
> I also tried to search the string ':-1:-1' using wingrep
> for all *.m files in the disk. But I cannot find any
file.
> Any othe ideas?
>
> Yi

Subject: debug startup error

From: Fangjun Jiang

Date: 25 Jul, 2008 17:25:04

Message: 8 of 11

Interesting. I googled "Fatal error premature end of file"
and got a few leads related to Java and XML. You might
want to do the same and see if anything rings a bell.

Subject: debug startup error

From: Yi Cao

Date: 25 Jul, 2008 23:24:05

Message: 9 of 11

"Fangjun Jiang" <f@j.com> wrote in message <g6d29g$9c1
$1@fred.mathworks.com>...
> Interesting. I googled "Fatal error premature end of
file"
> and got a few leads related to Java and XML. You might
> want to do the same and see if anything rings a bell.

The only thing I can think about is that I quited matlab
when a m-file was not completed some days ago. But, this
error repeatedly comes up even I have completed the file.
If the error is related to this file, then I think this is
a bug related to mlint, which uses java virtual machine.

Yi

Subject: debug startup error

From: Haihong Zhao

Date: 12 Aug, 2009 18:39:03

Message: 10 of 11

I have the same error message at the start-up. Matlan runs fine. I got this error after I terminated (kill it in windows task manager) a command of reading a big data file.
Don't know how to get rid of this message. Any ideas?

"Yi Cao" <y.cao@cranfield.ac.uk> wrote in message <g6dnal$365$1@fred.mathworks.com>...
> "Fangjun Jiang" <f@j.com> wrote in message <g6d29g$9c1
> $1@fred.mathworks.com>...
> > Interesting. I googled "Fatal error premature end of
> file"
> > and got a few leads related to Java and XML. You might
> > want to do the same and see if anything rings a bell.
>
> The only thing I can think about is that I quited matlab
> when a m-file was not completed some days ago. But, this
> error repeatedly comes up even I have completed the file.
> If the error is related to this file, then I think this is
> a bug related to mlint, which uses java virtual machine.
>
> Yi

Subject: debug startup error

From: Edmund

Date: 14 Nov, 2009 17:47:01

Message: 11 of 11

I had the same problem, but solved it using the solution in the link usefully referenced by fong ming hooi (http://www.mathworks.de/matlabcentral/newsreader/view_thread/242579). Specifically http://www.mathworks.co.kr/support/solutions/en/data/1-63Z0WN/index.html?product=ML&solution=1-63Z0WN

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us