A caught exception occurred while trying to draw a graph in Processing - raspberry-pi
while working with processing on raspberry pi I was attempting to have a second screen pop up with data I had gathered in a separate method. On short runs (about 1 minute or less), the code is able to make this without issue. On longer runs (above 1 minute) it pops up this error message:
RunnableTask.run(): A caught exception occured on thread Animation Thread-Display-.x11_:0.0-2-EDT-1: RunnableTask[enqueued true[executed false, flushed false], tTotal 0 ms, tExec 0 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <127debe, 14323ef>[count 1, qsz 0, owner <Animation Thread-FPSAWTAnimator#00-Timer0>] - <Animation Thread-Display-.x11_:0.0-2-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <127debe, 14323ef>[count 1, qsz 0, owner <Animation Thread-FPSAWTAnimator#00-Timer0>] - <Animation Thread-Display-.x11_:0.0-2-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl.getLocationOnScreen(WindowImpl.java:1159)
at jogamp.newt.driver.x11.X11UnderlayTracker.windowMoved(X11UnderlayTracker.java:141)
at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:4386)
at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:4317)
at jogamp.newt.WindowImpl.positionChanged(WindowImpl.java:4558)
at jogamp.newt.WindowImpl.sizePosMaxInsetsVisibleChanged(WindowImpl.java:4865)
at jogamp.newt.driver.x11.DisplayDriver.DispatchMessages0(Native Method)
at jogamp.newt.driver.x11.DisplayDriver.dispatchMessagesNative(DisplayDriver.java:112)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4449)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4443)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:777)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:1248)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1318)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
DefaultEDT.run(): Caught exception occured on thread Animation Thread-Display-.x11_:0.0-2-EDT-1: RunnableTask[enqueued false[executed true, flushed false], tTotal 8481 ms, tExec 8481 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <127debe, 14323ef>[count 1, qsz 0, owner <Animation Thread-FPSAWTAnimator#00-Timer0>] - <Animation Thread-Display-.x11_:0.0-2-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <127debe, 14323ef>[count 1, qsz 0, owner <Animation Thread-FPSAWTAnimator#00-Timer0>] - <Animation Thread-Display-.x11_:0.0-2-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl.getLocationOnScreen(WindowImpl.java:1159)
at jogamp.newt.driver.x11.X11UnderlayTracker.windowMoved(X11UnderlayTracker.java:141)
at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:4386)
at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:4317)
at jogamp.newt.WindowImpl.positionChanged(WindowImpl.java:4558)
at jogamp.newt.WindowImpl.sizePosMaxInsetsVisibleChanged(WindowImpl.java:4865)
at jogamp.newt.driver.x11.DisplayDriver.DispatchMessages0(Native Method)
at jogamp.newt.driver.x11.DisplayDriver.dispatchMessagesNative(DisplayDriver.java:112)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4449)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4443)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:777)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:1248)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1318)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
After displaying this message it does graph the data without issue, but I have no clue as to why this error is occurring. I'm sorry for my ignorance on this I am still pretty new to coding. If you have any ideas onto how or why this is happening, as well as any possible fixes it would be GREATLY appreciated. My full code can be found here Though I believe the error is coming from the "Second_Screen" file, I included the whole code just in case. Thank you again for any help, it is very appreciated!
Also if you need any additional information please let me know! I'm sorry if i forgot anything necessary.
In my "Second Screen File" I use this line:
window2 = GWindow.getWindow(this, "Window title", 25, 25, 855, 510, P2D);
By changing it to
window2 = GWindow.getWindow(this, "Window title", 25, 25, 855, 510, JAVA2D);
The error is resolved at the time I am testing on longer and longer runs, but it hasn't given me any errors yet. I'm not sure the difference between JAVA2D and P2D but it doesn't really matter as I'm just glad the error is resolved.
Related
Transactions are getting stuck because of tperrno issues
After migrating the OS from RHEL-7.9 to RHEL-8 we are continuously receiving the below errors. A system exception has occurred : Commit transaction failed: tperrno = 1, error text = <TPEABORT - transaction cannot commit> A system exception has occurred : Enqueuing to QSpace [PPQ_SPACE1], Q [CPA] failed: tperrno = 13, [TPETIME - timeout occured] A system exception has occurred : Enqueuing to QSpace [PPQ_SPACE1], Q [CPA] failed: tperrno = 12, [TPESYSTEM - internal system error] Failed to open Resource Manager: tperrno = 16 error text = <TPERMERR - resource manager error A system exception has occurred : Begin transaction failed: tperrno = 0 error text = <> Tried to raise this issue with Tuxedo support and applied patch but still receiving this issues.
how to fix this 'Attempted to send a key down event when no keys are in keysPressed.'?
When ever I click the button to play note1.wav this error occurred Exception caught by services library ══════════════════════════════════ Attempted to send a key down event when no keys are in keysPressed. This state can occur if the key event being sent doesn't properly set its modifier flags. This was the event: RawKeyDownEvent#3f615(logicalKey: LogicalKeyboardKey#00000(keyId: "0x1100000000", keyLabel: "", debugName: "Key with ID 0x01100000000"), physicalKey: PhysicalKeyboardKey#700e3(usbHidUsage: "0x000700e3", debugName: "Meta Left")) and its data: RawKeyEventDataAndroid#4cb08(flags: 8, codePoint: 0, plainCodePoint: 0, keyCode: 0, scanCode: 125, metaState: 0) 'package:flutter/src/services/raw_keyboard.dart': package:flutter/…/services/raw_keyboard.dart:1 Failed assertion: line 668 pos 7: 'event is! RawKeyDownEvent || _keysPressed.isNotEmpty' ════════════════════════════════════════════════════════════════════════════════ please give me solution
JavaMail IdleManager throws "Folder is not using SocketChannels" exception after a while
I'm using IdleManager, in Scala, to listen to a Gmail folder. I already have this props.setProperty("mail.imaps.usesocketchannels", "true") The main part of my code is like this: folder.addMessageCountListener(new MessageCountAdapter() { override def messagesAdded(ev: MessageCountEvent) { Logger.info("Got " + ev.getMessages.length + " new messages") idleManager.watch(folder) } }) // timeLength = 20 minutes system.scheduler.schedule(initialDelay = timeLength, interval = timeLength) { try { folder.asInstanceOf[IMAPFolder].doCommand(new IMAPFolder.ProtocolCommand() { def doCommand(p: IMAPProtocol) = { p.simpleCommand("NOOP", null) null } }) Logger.debug("Continue after sending NOOP") idleManager.watch(folder) } catch { case e: Exception => Logger.error(s"MailHelper: ${e.getMessage}") } } idleManager.watch(folder) You can see that I let the idleManager continue watching the folder after I get new messages and after I send a NOOP command. A scheduler is created to periodically (currently, once in 20 minutes) send a NOOP command to the server, to keep the connection. My program worked fine, but just for a while. 14 hours after the first call idleManager.watch(folder) and about 12.5 hours after the last email received, I still got the log Continue after sending NOOP, but right after that is an error log MailHelper: Folder is not using SocketChannels. Could you please help me with this? Edited: Thanks #BillShannon for your quick reply. I have updated from v1.5.2 to v1.5.6 and turned on the debug output. I'm sure the Properties object and the "store" instance (created from a Session with the "imaps" protocol) are unchanged. The error has appeared again. After a call to idleManager.watch(folder), here is the log ([folder] is the imaps protocol string for my folder) DEBUG IMAP: IdleManager watching [folder] A385 IDLE + idling DEBUG IMAP: startIdle: set to IDLE DEBUG IMAP: startIdle: return true DEBUG IMAP: IdleManager.watch startIdle succeeded for [folder] DEBUG IMAP: IdleManager selected 0 channels DEBUG IMAP: IdleManager adding [folder] to selector DEBUG IMAP: IdleManager waiting... DEBUG IMAP: IdleManager selected 1 channels DEBUG IMAP: IdleManager selected folder: [folder] DEBUG IMAP: handleIdle: set to RUNNING DEBUG IMAP: IdleManager got exception for folder: [folder], THROW: javax.mail.FolderClosedException: * BYE JavaMail Exception: java.io.IOException: Connection dropped by server? at com.sun.mail.imap.IMAPFolder.handleIdle(IMAPFolder.java:3199) at com.sun.mail.imap.IdleManager.processKeys(IdleManager.java:370) at com.sun.mail.imap.IdleManager.select(IdleManager.java:281) at com.sun.mail.imap.IdleManager.access$200(IdleManager.java:137) at com.sun.mail.imap.IdleManager$1.run(IdleManager.java:164) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) DEBUG IMAP: IdleManager waiting... 20 minutes later, the program sent another "NOOP", the status returned was "OK". And the program called idleManager.watch(folder) once again, here the error log reappeared Folder is not using SocketChannels. Do you need anything else? Is this an issue with the library?
Stop query if there Is an error (Parse.com)
At the moment the app it crashing if there is no internet connection when running the query. How do I tell the query to stop if there is an error and prevent this? Thanks Error Below: Error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo=0x1702e0d80 {NSUnderlyingError=0x1742569e0 "The Internet connection appears to be offline.", NSErrorFailingURLStringKey=https://api.parse.com/2/find, NSErrorFailingURLKey=https://api.parse.com/2/find, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=The Internet connection appears to be offline.} (Code: 100, Version: 1.2.21) 2014-12-01 20:36:39.257 AppName[5903:999805] Network connection failed. Making attempt 2 after sleeping for 1.546502 seconds.
In parse there you can handle errors for many things. I think to stop a query if there is not internet connection you can use kPFErrorConnectionFailed Ex. var query = PFQuery() query.findObjectsInBackgroundWithBlock{ (success:Bool!, error:NSError!)-> Void in if (error == nil) { //continue query } else{ if(error.code == kPFErrorConnectionFailed) { //handle error } } }
Erlang and PostgreSQL
I try to execute simple PostgreSQL query with erlang and epgsql. I do: {ok, C} = pgsql:connect("localhost", "shk", "qwerty", [{database, "mydb"}]). >> {ok,<0.34.0>} Then: {ok, Cols, Rows} = pgsql:squery(C, "select * from users"). But i got error: =ERROR REPORT==== 27-Apr-2012::17:58:23 === ** State machine <0.34.0> terminating ** Last message in was {'EXIT',<0.32.0>, {{badmatch, {error, {error,'ð\236ð¨ð\230ð\221ð\232ð\220',<<"42P01">>, <<208,190,209,130,208,189,208,190,209,136,208,181, 208,189,208,184,208,181,32,34,109,121,100,98,34, 32,208,189,208,181,32,209,129,209,131,209,137, 208,181,209,129,209,130,208,178,209,131,208,181, 209,130>>, [{position,<<"15">>}]}}}, [{erl_eval,expr,3}]}} ** When State == ready ** Data == {state,undefined,<0.35.0>,5000, [{<<"application_name">>,<<>>}, {<<"client_encoding">>,<<"UTF8">>}, {<<"DateStyle">>,<<"ISO, DMY">>}, {<<"integer_datetimes">>,<<"on">>}, {<<"IntervalStyle">>,<<"postgres">>}, {<<"is_superuser">>,<<"off">>}, {<<"server_encoding">>,<<"UTF8">>}, {<<"server_version">>,<<"9.0.7">>}, {<<"session_authorization">>,<<"shk">>}, {<<"standard_conforming_strings">>,<<"off">>}, {<<"TimeZone">>,<<"posixrules">>}], undefined,undefined,undefined, {30932,488494147}, {statement,undefined,undefined,undefined}, 73} ** Reason for termination = ** {{badmatch,{error,{error,'ð\236ð¨ð\230ð\221ð\232ð\220',<<"42P01">>, <<208,190,209,130,208,189,208,190,209,136,208,181, 208,189,208,184,208,181,32,34,109,121,100,98,34, 32,208,189,208,181,32,209,129,209,131,209,137, 208,181,209,129,209,130,208,178,209,131,208,181, 209,130>>, [{position,<<"15">>}]}}}, [{erl_eval,expr,3}]} What's wrong i do? How can i fix it? Thank you.
The error string seems to be in russian if I recognize the characters. To view the response you can use the following command: io:format("~ts",[<<208,190,209,130,208,189,208,190,209,136,208,181, 208,189,208,184,208,181,32,34,109,121,100,98,34, 32,208,189,208,181,32,209,129,209,131,209,137, 208,181,209,129,209,130,208,178,209,131,208,181, 209,130>>]). отношение "mydb" не существует A quick google translate makes me think the database mydb does not exist or you do not have permissions to use it.
try simply doing Response = pgsql:squery(C, "select * from mydb"), io:format("~p~n",[Response]). And see what he is giving back from the server, maybe you have typo or table don't exists etc. also check this out http://www.erlangatwork.com/2009/01/erlang-and-postgresql.html
From epgsql docs: Errors Errors originating from the PostgreSQL backend are returned as {error, #error{}}, see pgsql.hrl for the record definition. epgsql functions may also return {error, What} where What is one of the following: {unsupported_auth_method, Method} - required auth method is unsupported timeout - request timed out closed - connection was closed sync_required - error occured and pgsql:sync must be called Try to include pgsql.hrl, capture the error and print the error message, that should point you to the right direction.