public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Zachary Kurmas <kurmasz@gvsu.edu>
To: Andy Keep via Kawa <kawa@sourceware.org>
Subject: ClassCastException (class java.lang.Integer cannot be cast to class gnu.math.IntNum)
Date: Fri, 24 Feb 2023 14:26:00 +0000	[thread overview]
Message-ID: <550c8c8b-d654-43cc-be7b-4e34d7606dac@Spark> (raw)
In-Reply-To: <e65a1af5-112e-4874-9640-4878a79be01d@Spark>

[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]

Does anybody recognize this exception:

java.lang.ClassCastException: class java.lang.Integer cannot be cast to class gnu.math.IntNum (java.lang.Integer is in module java.base of loader 'bootstrap'; gnu.math.IntNum is in unnamed module of loader 'app')

I apologize for the overly vague question, but I can’t seem to come with a minimum example, so I was hoping someone had seen the error before and could point me in a useful direction.

If you are curious, here is an example of why I’m having trouble isolating the source of the error.

  *   I am having my students write Connect 4 in Kawa.  Only one student has run into this problem.
  *   The basic structure of the project is that
     *    (1) connect4.scm parses the command line (which is mostly code I wrote)
     *    (2) connect4_engine.scm has the students’ code.
  *   My code parses the command line, calls include-relative on the “engine” code then calls the function play-connect-4
  *   I see the bug when running connect4.scm — even if I hard-code all the parameters to play-connect-4.
  *   I don’t see the bug if I copy the call to play-connect-4 (with hard-coded parameters) to the end of connect4_engine.scm and run that file directly.

So, trying to isolate the bug makes it go away.  Also, when connect4.scm calls connet4_engine.scm the stack trace does not contain line numbers of connect4_engine, so I don’t have a good sense of where the bug is popping up.


Thanks,
Zack

--
Zachary Kurmas
Associate Professor of Computer Science
Grand Valley State University
https://kurmasgvsu.github.io

       reply	other threads:[~2023-02-24 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e65a1af5-112e-4874-9640-4878a79be01d@Spark>
2023-02-24 14:26 ` Zachary Kurmas [this message]
2023-02-24 15:18   ` Per Bothner
2023-02-24 15:41     ` Zachary Kurmas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=550c8c8b-d654-43cc-be7b-4e34d7606dac@Spark \
    --to=kurmasz@gvsu.edu \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).