Menu

#105 Broken command line handling

confirmed
closed-fixed
nobody
None
5
2016-01-01
2015-12-12
Si⠀
No

Command line args cause my fledgling wxHaskell program to crash, and I notice this was raised in a mailing list discussion [1], but I didn't spot a corresponding ticket here.

Essentially you get an error where a program named after the first character of your program name is passed an unexpected parameter that is the first character of your argument. Additional args made no noticeable difference, nor does how your Haskell treats any args.

I'm using lts-3.17 + extra-deps: [wx-0.92.1.0, wxcore-0.92.1.0, wxc-0.92.1.0, wxdirect-0.92.1.0, split-0.2.2] on stack.

An example run:

[Si@thor Mintegrator]$ ./Mintegrator.exe ?eh?
fileName: ?eh?
Unexpected parameter '?'
Usage: M [-h] [--verbose]
  -h, --help    show this help message
  --verbose     generate verbose log messages

The hacky naming workaround is fun but not that practical (see screenshot).

[1] http://sourceforge.net/p/wxhaskell/mailman/wxhaskell-users/thread/9263E730-0309-4994-A7E2-659E085B4DB4%40proclivis.com/#msg33643185

1 Attachments

Discussion

  • Si⠀

    Si⠀ - 2015-12-12

    That's weird, I just noticed that I also get a {first char of program name}-{username} file dumped into my home directory when the program is run sucessfully (without arguments).

    So for Mintegrator, I get M-Si in my home dir, and it has the contents 29665, which appears to be a pid.

     

    Last edit: Si⠀ 2015-12-12
  • Henk-Jan van Tuyl

    I am not sure if this bug is the same as the one from the mailinglist, but there is a bug ticket at the wxWidgets site related to this: http://trac.wxwidgets.org/ticket/16935

     
  • Si⠀

    Si⠀ - 2015-12-30

    I've opened a pull request for addressing this: https://github.com/wxHaskell/wxHaskell/pull/24

     
  • Henk-Jan van Tuyl

    • status: open --> closed-fixed
     
  • Henk-Jan van Tuyl

    Pull request 24 is pulled. The ticket can be closed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.