Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4614174
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:39:37+00:00 2026-05-22T01:39:37+00:00

I have a fairly simple question that has me stymied. I am trying to

  • 0

I have a fairly simple question that has me stymied. I am trying to run an executable built from a simple C program using MATLAB as a shell, i.e. using the following MATLAB code:

FileName = ['D:\Users\person\Desktop\MATLAB\GUI','\Program.exe &'];

dos(FileName);

The executable correctly begins running, but crashes giving the error:

Debug Assertion Failed!

Program: D:\Users\person\Desktop\MATLAB\GUI\Program.exe

File: f:\\dd\vctools\crt_bld\self_x86\crt\src\fscanf.c

Expression: (stream != NULL)

The programs opens a text file, reads the input, performs math functions, and writes outputs back to another text file. I assume that this error means there is a problem reading from the text file, BUT– when I run the executable by itself (i.e. Windows Explorer doubleclick), it executes flawlessly, as I would expect.

So, it’s only MATLAB pointing to the file location that is causing the crash. Any ideas? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:39:38+00:00Added an answer on May 22, 2026 at 1:39 am

    Sounds like relative paths are the culprit. The Matlab command is running from whatever directory you’ve specified within Matlab; cmd runs from root or something like that (don’t know much about Dos). That’s why it works when you specify absolute paths. Change your Matlab directory to DOS root, and see if it works as originally coded.

    Edit: Note that it’s the path to whatever file Program.exe is trying to read that’s the problem, not the path to Program.exe itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Fairly simple question: I have an init method on my class that has the
I have a fairly simple question about these 2 templating engines. I'm trying to
I have what I hope is a fairly simple question about using the value
I have a question that might seem fairly simple (of course if you know
I have a fairly simple question, however the answer seems to elude me. If
I have a fairly simple question: how to take one row of cv::Mat and
A fairly simple question for which I have a guess, but I can't find
I have a fairly simple block of code. Sub Run(Name) on error resume next
I have a fairly simple python loop that calls a few functions, and writes
I have a fairly simple console app that monitors an exchange mailbox, picks particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.