Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot builder doesn't work #3356

Closed
dsmmcken opened this issue Jan 10, 2023 · 3 comments · Fixed by #3357
Closed

Plot builder doesn't work #3356

dsmmcken opened this issue Jan 10, 2023 · 3 comments · Fixed by #3357
Assignees
Labels
bug Something isn't working

Comments

@dsmmcken
Copy link
Contributor

Steps to reproduce

  1. Open a table
  2. Open sidebar
  3. Create plot

Expected:
Plot opens

Actual:
Plot spins forever

dh-core.js:5157 Uncaught 
ClassCastException {stackTrace: null, backingJsObject: Error: java.lang.ClassCastException
    at ClassCastException.createError (http://localhost:4000/js…}
backingJsObject
: 
Error: java.lang.ClassCastException at ClassCastException.createError (http://localhost:4000/jsapi/dh-core.js:1192:10) at ClassCastException.initializeBackingError (http://localhost:4000/jsapi/dh-core.js:1212:46) at ClassCastException.Throwable (http://localhost:4000/jsapi/dh-core.js:1150:8) at ClassCastException.Exception (http://localhost:4000/jsapi/dh-core.js:1224:16) at ClassCastException.RuntimeException (http://localhost:4000/jsapi/dh-core.js:1241:16) at new ClassCastException (http://localhost:4000/jsapi/dh-core.js:1504:23) at Object.checkCriticalType_0 (http://localhost:4000/jsapi/dh-core.js:40664:16) at Object.$asInt (http://localhost:4000/jsapi/dh-core.js:40567:13) at Object.lambda$13_0 (http://localhost:4000/jsapi/dh-core.js:22850:16) at Function.copyTo_2 (http://localhost:4000/jsapi/dh-core.js:23255:11) at lambda (http://localhost:4000/jsapi/dh-core.js:152:22) at Object.$handleDelta (http://localhost:4000/jsapi/dh-core.js:22734:7) at Object.$handleDelta_0 (http://localhost:4000/jsapi/dh-core.js:23414:11) at Object.$lambda$78 (http://localhost:4000/jsapi/dh-core.js:10988:13) at Function.apply_36 (http://localhost:4000/jsapi/dh-core.js:12597:9) at lambda (http://localhost:4000/jsapi/dh-core.js:152:22) at Object.$lambda$15_2 (http://localhost:4000/jsapi/dh-core.js:30656:101) at Function.run_47 (http://localhost:4000/jsapi/dh-core.js:31300:9) at lambda (http://localhost:4000/jsapi/dh-core.js:152:22) at Function.onInvoke_211 (http://localhost:4000/jsapi/dh-core.js:29991:22) at lambda (http://localhost:4000/jsapi/dh-core.js:152:22)
__java$exception
: 
ClassCastException {stackTrace: null, backingJsObject: Error: java.lang.ClassCastException at ClassCastException.createError (http://localhost:4000/js…}
cause
: 
(...)
message
: 
"java.lang.ClassCastException"
stack
: 
"Error: java.lang.ClassCastException\n    at ClassCastException.createError (http://localhost:4000/jsapi/dh-core.js:1192:10)\n    at ClassCastException.initializeBackingError (http://localhost:4000/jsapi/dh-core.js:1212:46)\n    at ClassCastException.Throwable (http://localhost:4000/jsapi/dh-core.js:1150:8)\n    at ClassCastException.Exception (http://localhost:4000/jsapi/dh-core.js:1224:16)\n    at ClassCastException.RuntimeException (http://localhost:4000/jsapi/dh-core.js:1241:16)\n    at new ClassCastException (http://localhost:4000/jsapi/dh-core.js:1504:23)\n    at Object.checkCriticalType_0 (http://localhost:4000/jsapi/dh-core.js:40664:16)\n    at Object.$asInt (http://localhost:4000/jsapi/dh-core.js:40567:13)\n    at Object.lambda$13_0 (http://localhost:4000/jsapi/dh-core.js:22850:16)\n    at Function.copyTo_2 (http://localhost:4000/jsapi/dh-core.js:23255:11)\n    at lambda (http://localhost:4000/jsapi/dh-core.js:152:22)\n    at Object.$handleDelta (http://localhost:4000/jsapi/dh-core.js:22734:7)\n    at Object.$handleDelta_0 (http://localhost:4000/jsapi/dh-core.js:23414:11)\n    at Object.$lambda$78 (http://localhost:4000/jsapi/dh-core.js:10988:13)\n    at Function.apply_36 (http://localhost:4000/jsapi/dh-core.js:12597:9)\n    at lambda (http://localhost:4000/jsapi/dh-core.js:152:22)\n    at Object.$lambda$15_2 (http://localhost:4000/jsapi/dh-core.js:30656:101)\n    at Function.run_47 (http://localhost:4000/jsapi/dh-core.js:31300:9)\n    at lambda (http://localhost:4000/jsapi/dh-core.js:152:22)\n    at Function.onInvoke_211 (http://localhost:4000/jsapi/dh-core.js:29991:22)\n    at lambda (http://localhost:4000/jsapi/dh-core.js:152:22)"
suppressed
: 
(...)
get cause
: 
ƒ ()
get suppressed
: 
ƒ ()
[[Prototype]]
: 
Object
stackTrace
: 
null
[[Prototype]]
: 
Object

plot

@mofojed
Copy link
Member

mofojed commented Jan 24, 2023

@dsmmcken I'm unable to reproduce this using the following two tables:

from deephaven import empty_table
t = empty_table(1000).update(["x=i", "y=Math.sin(i)"])
from deephaven import time_table
tt = time_table("00:00:01").update(["y=Math.sin(i)"])

@dsmmcken what is the source table you used for this?

@mofojed mofojed added the question Further information is requested label Jan 24, 2023
@dsmmcken
Copy link
Contributor Author

from deephaven import empty_table, time_table

simple_ticking = time_table("00:00:01").update([
        "MyString=new String(`a`+i)",
        "MyInt=new Integer(i)",
        "MyLong=new Long(i)",
        "MyDouble=new Double(i+i/10)",
        "MyFloat=new Float(i+i/10)",
        "MyBoolean=new Boolean(i%2==0)",
        "MyChar= new Character((char) ((i%26)+97))",
        "MyShort=new Short(Integer.toString(i%32767))",
        "MyByte= new java.lang.Byte(Integer.toString(i%127))"])

complex_ticking = simple_ticking.update([
        "MyBigDecimal= new java.math.BigDecimal(i+i/10)",
        "MyBigInteger= new java.math.BigInteger(Integer.toString(i))"
])                          

I used timestamp and myint from complex ticking, and it is still reproducable, but interestingly your example tables are not.

@mofojed
Copy link
Member

mofojed commented Jan 24, 2023

Interesting. Seems to be crashing because of the MyBoolean column. I've distilled it down to a simpler example:

from deephaven import time_table
tt = time_table("00:00:01").update(["y=i", "MyBoolean=new Boolean(i%2 ==0)"])

Couple things to note:

  • Shouldn't crash if there's a boolean
  • Shouldn't be getting the boolean in the snapshot anyway since it's not part of the figure I created at all.

@mofojed mofojed removed the question Further information is requested label Jan 24, 2023
@mofojed mofojed transferred this issue from deephaven/web-client-ui Jan 25, 2023
mofojed added a commit to mofojed/deephaven-core that referenced this issue Jan 25, 2023
- Boolean was encoded as a ByteArrayColumnData in WebBarrageUtils. Converting to an Int was causing a class cast exception
- Use a BooleanArrayColumnData for encoding boolean data instead (BooleanArrayColumnData wasn't being used anywhere)
- Just check for null values, then check the boolean value
- Fixes deephaven#3356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants