error in process filter: Stack overflow in regexp matcher

79 views
Skip to first unread message

nenad mitrovic

unread,
Dec 24, 2018, 4:12:04 PM12/24/18
to Clojure
I am trying to execute this piece of code: (rest (file-seq (file (str "corpus/" "ham"))).
When I execute I get this error: "error in process filter: Stack overflow in regexp matcher".
I have 1400 files in corpus/ham folder. But when I execute only three file it works.

Andy Fingerhut

unread,
Dec 24, 2018, 4:20:39 PM12/24/18
to clo...@googlegroups.com
I have just tried to reproduce a similar case on a system running Mac OS X 10.13.6, Oracle/Apple Java 1.8.0_192, Clojure 1.9.0, and Leiningen 2.8.3, and a directory containing 1400 files.  I did not see the error you did.

What versions of OS, Java, Clojure, and anything on top of Clojure (e.g. Leiningen) are you using?

If you are using Leiningen, what is the contents of your ~/.lein/profiles.clj and project.clj files, if any?  Some add-on plugins that modify what is shown in the REPL, e.g. that auto-pretty-print results, can have errors parsing some input, or printing some output, even if Clojure by itself has no problems.  If you can reproduce your problem using a `clj` command line that avoids using Leiningen, for example, that would help determine whether it is caused by something in your Leiningen setup, vs. elsewhere.

Andy 

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nenad mitrovic

unread,
Dec 24, 2018, 4:35:46 PM12/24/18
to Clojure
windows 8.1, java 1.8.0_191, clojure 1.8.0


profiles.clj contains the following content:

{:profiles/dev  {:env {:database-url "jdbc:postgresql://localhost/spam_filter_dev?user=db_user_name_here&password=db_user_password_here"}}
 :profiles/test {:env {:database-url "jdbc:postgresql://localhost/spam_filter_test?user=db_user_name_here&password=db_user_password_here"}}}

and here is project.clj

(defproject spam-filter "0.1.0-SNAPSHOT"



  :description "FIXME: write description"




  :dependencies [[org.clojure/clojure "1.8.0"]

                 [selmer "1.0.0"]

                 [markdown-clj "0.9.85"]

                 [luminus/config "0.5"]

                 [ring-middleware-format "0.7.0"]

                 [metosin/ring-http-response "0.6.5"]

                 [bouncer "1.0.0"]

                 [org.webjars/bootstrap "4.0.0-alpha.2"]

                 [org.webjars/font-awesome "4.5.0"]

                 [org.webjars.bower/tether "1.1.1"]

                 [org.webjars/jquery "2.2.0"]

                 [org.clojure/tools.logging "0.3.1"]

                 [com.taoensso/tower "3.0.2"]

                 [compojure "1.4.0"]

                 [ring-webjars "0.1.1"]

                 [ring/ring-defaults "0.1.5"]

                 [ring "1.4.0" :exclusions [ring/ring-jetty-adapter]]

                 [mount "0.1.8"]

                 [luminus-nrepl "0.1.2"]

                 [migratus "0.8.9"]
                 [conman "0.3.0"]
                 [org.postgresql/postgresql "9.4-1206-jdbc4"]
                 [org.webjars/webjars-locator-jboss-vfs "0.1.0"]
                 [luminus-immutant "0.1.0"]
                 [luminus-log4j "0.1.2"]]



  :min-lein-version "2.0.0"

  :uberjar-name "spam-filter.jar"

  :jvm-opts ["-server"]

  :source-paths ["src/clj"]

  :resource-paths ["resources"]



  :main spam-filter.core

  :migratus {:store :database}



  :plugins [[lein-environ "1.0.1"]

            [migratus-lein "0.2.1"]]

  :profiles

  {:uberjar {:omit-source true

             :env {:production true}

             :aot :all

             :source-paths ["env/prod/clj"]

             :resource-paths ["env/prod/resources"]}

   :dev           [:project/dev :profiles/dev]

   :test          [:project/test :profiles/test]

   :project/dev  {:dependencies [[prone "1.0.1"]

                                 [ring/ring-mock "0.3.0"]

                                 [ring/ring-devel "1.4.0"]

                                 [pjstadig/humane-test-output "0.7.1"]

                                 [mvxcvi/puget "1.0.0"]]

                  

                  

                  :source-paths ["env/dev/clj" "test/clj"]

                  :resource-paths ["env/dev/resources"]

                  :repl-options {:init-ns user}

                  :injections [(require 'pjstadig.humane-test-output)

                               (pjstadig.humane-test-output/activate!)]

                  ;;when :nrepl-port is set the application starts the nREPL server on load

                  :env {:dev        true

                        :port       3000

                        :nrepl-port 7000}}

   :project/test {:env {:test       true

                        :port       3001

                        :nrepl-port 7001}}

   :profiles/dev {}

   :profiles/test {}})

nenad mitrovic

unread,
Dec 24, 2018, 4:38:50 PM12/24/18
to Clojure
Sorry, here is profiles.clj

{:user
  {
  :java-cmd "C:\\Program Files\\Java\\jdk1.8.0_111\\bin\\java.exe"
  :plugins [
  
[cider/cider-nrepl "0.8.1"]
[luminus/lein-template "2.9.9.2"]

    ]
   }
 }

On Monday, December 24, 2018 at 10:12:04 PM UTC+1, nenad mitrovic wrote:

Andy Fingerhut

unread,
Dec 24, 2018, 5:57:18 PM12/24/18
to clo...@googlegroups.com
I would recommend trying to temporarily rename ~/.lein/profiles.clj to a different name, so that there is no such file with that name any more, and try your file-seq expression again to see if it behaves any differently.

Andy

--

Justin Smith

unread,
Dec 24, 2018, 10:24:00 PM12/24/18
to clo...@googlegroups.com
This isn't a clojure issue.

A reference to "process filter" indicates this is an emacs problem. Its regex syntax matcher tends to blow up on long lines.

nenad mitrovic

unread,
Dec 25, 2018, 5:11:17 PM12/25/18
to Clojure
Thank you Andy, after I changed ~/.lein/profiles.clj file to a different nam, it works now. I can see all of 1400 files.
Reply all
Reply to author
Forward
0 new messages