Netconf + Yangcli + get + filter - net-snmp

I've just started to use Netconf server and I want to play with it.
I installed OpenYuma as netconf server, and for a client I would use the provided yangcli as a first approach.
My problem is that I cannot use filtering in get commands, since in the tutorials and docs are not any usable example, only previously written (outer) xml files are used, which are not shown in these docs.
I know that there are two types of filtering : subtree and xpath.
I do not care, which should be used, I only want to use one of them properly.
If I type get in yangcli, I get a lot of data.
In this case, I only want to get the memInfo part with all the leafs.
Please supplement/correct my command!!!
yangcli>get filter=('xpath','memInfo') ???
This command does not throw any errors, but only empty data object is received.
Thanks

use this one instead:
yangcli> sget /proc/meminfo

You must add # before the filter name
yangcli> get filter=#stack.xml
RPC Data Reply 12 for session 24:
rpc-reply {
data {
proc {
meminfo {
MemTotal '7956336 kB'
MemFree '7079064 kB'
Buffers '47460 kB'
Cached '294076 kB'
SwapCached '0 kB'
Active '582144 kB'
Inactive '226840 kB'
Active_anon_ '517864 kB'
Inactive_anon_ '29680 kB'
Active_file_ '64280 kB'
Inactive_file_ '197160 kB'
Unevictable '0 kB'
Mlocked '0 kB'
SwapTotal '0 kB'
SwapFree '0 kB'
Dirty '0 kB'
Writeback '0 kB'
AnonPages '467456 kB'
Mapped '50240 kB'
Shmem '80100 kB'
Slab '33104 kB'
SReclaimable '12804 kB'
SUnreclaim '20300 kB'
KernelStack '2512 kB'
PageTables '7464 kB'
NFS_Unstable '0 kB'
Bounce '0 kB'
WritebackTmp '0 kB'
CommitLimit '3978168 kB'
Committed_AS '677912 kB'
VmallocTotal '135290159040 kB'
VmallocUsed '3516 kB'
VmallocChunk '0 kB'
HardwareCorrupted '0 kB'
HugePages_Total 0
HugePages_Free 0
HugePages_Rsvd 0
HugePages_Surp 0
Hugepagesize '2048 kB'
}
}
}
}
Where stack.xml is:
<proc>
<meminfo/>
</proc>

Related

Sagemaker - UnkownServiceError for Session

I am trying to run a simple model in sagemaker.
When trying to run the following code I keep getting this error.
It is a very simple code that I saw in some tutorials and in sagemaker examples that are included in the Jupiter notebook.
Does anyone know what should I do to make it work?
imput:
import sagemaker
sess = sagemaker.Session()
output:
---------------------------------------------------------------------------
UnknownServiceError Traceback (most recent call last)
/tmp/ipykernel_11350/4126940475.py in <cell line: 3>()
1 import sagemaker
2
----> 3 sess = sagemaker.Session()
~/anaconda3/envs/python3/lib/python3.8/site-packages/sagemaker/session.py in __init__(self, boto_session, sagemaker_client, sagemaker_runtime_client, sagemaker_featurestore_runtime_client, default_bucket, settings, sagemaker_metrics_client)
131 self.settings = settings
132
--> 133 self._initialize(
134 boto_session=boto_session,
135 sagemaker_client=sagemaker_client,
~/anaconda3/envs/python3/lib/python3.8/site-packages/sagemaker/session.py in _initialize(self, boto_session, sagemaker_client, sagemaker_runtime_client, sagemaker_featurestore_runtime_client, sagemaker_metrics_client)
183 self.sagemaker_metrics_client = sagemaker_metrics_client
184 else:
--> 185 self.sagemaker_metrics_client = self.boto_session.client("sagemaker-metrics")
186 prepend_user_agent(self.sagemaker_metrics_client)
187
~/anaconda3/envs/python3/lib/python3.8/site-packages/boto3/session.py in client(self, service_name, region_name, api_version, use_ssl, verify, endpoint_url, aws_access_key_id, aws_secret_access_key, aws_session_token, config)
297
298 """
--> 299 return self._session.create_client(
300 service_name,
301 region_name=region_name,
~/anaconda3/envs/python3/lib/python3.8/site-packages/botocore/session.py in create_client(self, service_name, region_name, api_version, use_ssl, verify, endpoint_url, aws_access_key_id, aws_secret_access_key, aws_session_token, config)
868 retryhandler, translate, response_parser_factory,
869 exceptions_factory, config_store)
--> 870 client = client_creator.create_client(
871 service_name=service_name, region_name=region_name,
872 is_secure=use_ssl, endpoint_url=endpoint_url, verify=verify,
~/anaconda3/envs/python3/lib/python3.8/site-packages/botocore/client.py in create_client(self, service_name, region_name, is_secure, endpoint_url, verify, credentials, scoped_config, api_version, client_config)
85 'choose-service-name', service_name=service_name)
86 service_name = first_non_none_response(responses, default=service_name)
---> 87 service_model = self._load_service_model(service_name, api_version)
88 cls = self._create_client_class(service_name, service_model)
89 region_name, client_config = self._normalize_fips_region(
~/anaconda3/envs/python3/lib/python3.8/site-packages/botocore/client.py in _load_service_model(self, service_name, api_version)
152
153 def _load_service_model(self, service_name, api_version=None):
--> 154 json_model = self._loader.load_service_model(service_name, 'service-2',
155 api_version=api_version)
156 service_model = ServiceModel(json_model, service_name=service_name)
~/anaconda3/envs/python3/lib/python3.8/site-packages/botocore/loaders.py in _wrapper(self, *args, **kwargs)
130 if key in self._cache:
131 return self._cache[key]
--> 132 data = func(self, *args, **kwargs)
133 self._cache[key] = data
134 return data
~/anaconda3/envs/python3/lib/python3.8/site-packages/botocore/loaders.py in load_service_model(self, service_name, type_name, api_version)
375 known_services = self.list_available_services(type_name)
376 if service_name not in known_services:
--> 377 raise UnknownServiceError(
378 service_name=service_name,
379 known_service_names=', '.join(sorted(known_services)))
UnknownServiceError: Unknown service: 'sagemaker-metrics'. Valid service names are: accessanalyzer, account, acm, acm-pca, alexaforbusiness, amp, amplify, amplifybackend, amplifyuibuilder, apigateway, apigatewaymanagementapi, apigatewayv2, appconfig, appconfigdata, appflow, appintegrations, application-autoscaling, application-insights, applicationcostprofiler, appmesh, apprunner, appstream, appsync, athena, auditmanager, autoscaling, autoscaling-plans, backup, backup-gateway, batch, braket, budgets, ce, chime, chime-sdk-identity, chime-sdk-meetings, chime-sdk-messaging, cloud9, cloudcontrol, clouddirectory, cloudformation, cloudfront, cloudhsm, cloudhsmv2, cloudsearch, cloudsearchdomain, cloudtrail, cloudwatch, codeartifact, codebuild, codecommit, codedeploy, codeguru-reviewer, codeguruprofiler, codepipeline, codestar, codestar-connections, codestar-notifications, cognito-identity, cognito-idp, cognito-sync, comprehend, comprehendmedical, compute-optimizer, config, connect, connect-contact-lens, connectparticipant, cur, customer-profiles, databrew, dataexchange, datapipeline, datasync, dax, detective, devicefarm, devops-guru, directconnect, discovery, dlm, dms, docdb, drs, ds, dynamodb, dynamodbstreams, ebs, ec2, ec2-instance-connect, ecr, ecr-public, ecs, efs, eks, elastic-inference, elasticache, elasticbeanstalk, elastictranscoder, elb, elbv2, emr, emr-containers, es, events, evidently, finspace, finspace-data, firehose, fis, fms, forecast, forecastquery, frauddetector, fsx, gamelift, glacier, globalaccelerator, glue, grafana, greengrass, greengrassv2, groundstation, guardduty, health, healthlake, honeycode, iam, identitystore, imagebuilder, importexport, inspector, inspector2, iot, iot-data, iot-jobs-data, iot1click-devices, iot1click-projects, iotanalytics, iotdeviceadvisor, iotevents, iotevents-data, iotfleethub, iotsecuretunneling, iotsitewise, iotthingsgraph, iottwinmaker, iotwireless, ivs, kafka, kafkaconnect, kendra, keyspaces, kinesis, kinesis-video-archived-media, kinesis-video-media, kinesis-video-signaling, kinesisanalytics, kinesisanalyticsv2, kinesisvideo, kms, lakeformation, lambda, lex-models, lex-runtime, lexv2-models, lexv2-runtime, license-manager, lightsail, location, logs, lookoutequipment, lookoutmetrics, lookoutvision, machinelearning, macie, macie2, managedblockchain, marketplace-catalog, marketplace-entitlement, marketplacecommerceanalytics, mediaconnect, mediaconvert, medialive, mediapackage, mediapackage-vod, mediastore, mediastore-data, mediatailor, memorydb, meteringmarketplace, mgh, mgn, migration-hub-refactor-spaces, migrationhub-config, migrationhubstrategy, mobile, mq, mturk, mwaa, neptune, network-firewall, networkmanager, nimble, opensearch, opsworks, opsworkscm, organizations, outposts, panorama, personalize, personalize-events, personalize-runtime, pi, pinpoint, pinpoint-email, pinpoint-sms-voice, polly, pricing, proton, qldb, qldb-session, quicksight, ram, rbin, rds, rds-data, redshift, redshift-data, rekognition, resiliencehub, resource-groups, resourcegroupstaggingapi, robomaker, route53, route53-recovery-cluster, route53-recovery-control-config, route53-recovery-readiness, route53domains, route53resolver, rum, s3, s3control, s3outposts, sagemaker, sagemaker-a2i-runtime, sagemaker-edge, sagemaker-featurestore-runtime, sagemaker-runtime, savingsplans, schemas, sdb, secretsmanager, securityhub, serverlessrepo, service-quotas, servicecatalog, servicecatalog-appregistry, servicediscovery, ses, sesv2, shield, signer, sms, sms-voice, snow-device-management, snowball, sns, sqs, ssm, ssm-contacts, ssm-incidents, sso, sso-admin, sso-oidc, stepfunctions, storagegateway, sts, support, swf, synthetics, textract, timestream-query, timestream-write, transcribe, transfer, translate, voice-id, waf, waf-regional, wafv2, wellarchitected, wisdom, workdocs, worklink, workmail, workmailmessageflow, workspaces, workspaces-web, xray
I was trying to update some libraries like sagemaker, boto, boto3, but nothing seems to help.
I came across the same issue trying to run a machine learning tutorial by AWS in a notebook instance. What I had to do was update sagemaker within the notebook instance like so:
import sys
!{sys.executable} -m pip install sagemaker -U
Hopefully this fixes your problem :)
I had the same issue, running
pip install sagemaker -U
solved it for me. Similar to the following issue: Sagemaker Studio UnkownServiceError for Session

AHK How to make one SetTimer launch other, and than reversal

Goal of a code:
Timer CheckStart iterrates every 3 seconds until it find a choosen color.
If it finds pixel - it stops itself and start CheckStop timer, to look for another pixel every 3 seconds.
Rince and repeat
Also there is a keybind to check which timer was launched last.
#NoEnv
SendMode Input
checkstate = 0 ;just for checking state
SetTimer, CheckStart, 3000
Return
CheckStart:
PixelSearch, xx, zz, 710, 460, 730, 480, 0x385982, 0, Alt RGB
if !ErrorLevel {
checkstate = 1
SetTimer, CheckStart, Off
SetTimer, CheckEnd, 3000
Gosub, CheckEnd
}
Return
CheckEnd:
PixelSearch, xx, zz, 670, 160, 725, 200, 0xE60014, 0, Alt RGB
if !ErrorLevel {
checkstate = 0
SetTimer, CheckEnd, Off
SetTimer, CheckStart, 3000
Gosub, CheckStart
}
Return
^!z:: ; Control+Alt+Z
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%, Alt RGB
MsgBox (checkstate%) colour: %color%.
return
What I'm getting:
Before i feed needed color to 1st timer, keybind works delayed, shows state only between iterrations. Can i make it async?
After i feed needed color to 1st timer, checker became "1", but CheckEnd timer not starting. (and so keybind start to work immediately)
What i'm doing wrong? or its just prohibited to launch timer by timer?
There is no such pixel search mode as Alt, that's only for PixelGetColor.
I'm going to assume the problem here is just the pixel search taking forever.
Add in the Fast mode.
So instead of Alt RGB try Fast RGB.

My H2/C3PO/Hibernate setup does not seem to preserving prepared statements?

I am finding my database is the bottleneck in my application, as part of this it looks like Prepared statements are not being reused.
For example here method I use
public static CoverImage findCoverImageBySource(Session session, String src)
{
try
{
Query q = session.createQuery("from CoverImage t1 where t1.source=:source");
q.setParameter("source", src, StandardBasicTypes.STRING);
CoverImage result = (CoverImage)q.setMaxResults(1).uniqueResult();
return result;
}
catch (Exception ex)
{
MainWindow.logger.log(Level.SEVERE, ex.getMessage(), ex);
}
return null;
}
But using Yourkit profiler it says
com.mchange.v2.c3po.impl.NewProxyPreparedStatemtn.executeQuery() Count 511
com.mchnage.v2.c3po.impl.NewProxyConnection.prepareStatement() Count 511
and I assume that the count for prepareStatement() call should be lower, ais it is looks like we create a new prepared statment every time instead of reusing.
https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html
I am using C3po connecting poolng wehich complicates things a little, but as I understand it I have it configured correctly
public static Configuration getInitializedConfiguration()
{
//See https://www.mchange.com/projects/c3p0/#hibernate-specific
Configuration config = new Configuration();
config.setProperty(Environment.DRIVER,"org.h2.Driver");
config.setProperty(Environment.URL,"jdbc:h2:"+Db.DBFOLDER+"/"+Db.DBNAME+";FILE_LOCK=SOCKET;MVCC=TRUE;DB_CLOSE_ON_EXIT=FALSE;CACHE_SIZE=50000");
config.setProperty(Environment.DIALECT,"org.hibernate.dialect.H2Dialect");
System.setProperty("h2.bindAddress", InetAddress.getLoopbackAddress().getHostAddress());
config.setProperty("hibernate.connection.username","jaikoz");
config.setProperty("hibernate.connection.password","jaikoz");
config.setProperty("hibernate.c3p0.numHelperThreads","10");
config.setProperty("hibernate.c3p0.min_size","1");
//Consider that if we have lots of busy threads waiting on next stages could we possibly have alot of active
//connections.
config.setProperty("hibernate.c3p0.max_size","200");
config.setProperty("hibernate.c3p0.max_statements","5000");
config.setProperty("hibernate.c3p0.timeout","2000");
config.setProperty("hibernate.c3p0.maxStatementsPerConnection","50");
config.setProperty("hibernate.c3p0.idle_test_period","3000");
config.setProperty("hibernate.c3p0.acquireRetryAttempts","10");
//Cancel any connection that is more than 30 minutes old.
//config.setProperty("hibernate.c3p0.unreturnedConnectionTimeout","3000");
//config.setProperty("hibernate.show_sql","true");
//config.setProperty("org.hibernate.envers.audit_strategy", "org.hibernate.envers.strategy.ValidityAuditStrategy");
//config.setProperty("hibernate.format_sql","true");
config.setProperty("hibernate.generate_statistics","true");
//config.setProperty("hibernate.cache.region.factory_class", "org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory");
//config.setProperty("hibernate.cache.use_second_level_cache", "true");
//config.setProperty("hibernate.cache.use_query_cache", "true");
addEntitiesToConfig(config);
return config;
}
Using H2 1.3.172, Hibernate 4.3.11 and the corresponding c3po for that hibernate version
With reproducible test case we have
HibernateStats
HibernateStatistics.getQueryExecutionCount() 28
HibernateStatistics.getEntityInsertCount() 119
HibernateStatistics.getEntityUpdateCount() 39
HibernateStatistics.getPrepareStatementCount() 189
Profiler, method counts
GooGooStaementCache.aquireStatement() 35
GooGooStaementCache.checkInStatement() 189
GooGooStaementCache.checkOutStatement() 189
NewProxyPreparedStatement.init() 189
I don't know what I shoud be counting as creation of prepared statement rather than reusing an existing prepared statement ?
I also tried enabling c3p0 logging by adding a c3p0 logger ands making it use same log file in my LogProperties but had no effect.
String logFileName = Platform.getPlatformLogFolderInLogfileFormat() + "songkong_debug%u-%g.log";
FileHandler fe = new FileHandler(logFileName, LOG_SIZE_IN_BYTES, 10, true);
fe.setEncoding(StandardCharsets.UTF_8.name());
fe.setFormatter(new com.jthink.songkong.logging.LogFormatter());
fe.setLevel(Level.FINEST);
MainWindow.logger.addHandler(fe);
Logger c3p0Logger = Logger.getLogger("com.mchange.v2.c3p0");
c3p0Logger.setLevel(Level.FINEST);
c3p0Logger.addHandler(fe);
Now that I have eventually got c3p0Based logging working and I can confirm the suggestion of #Stevewaldman is correct.
If you enable
public static Logger c3p0ConnectionLogger = Logger.getLogger("com.mchange.v2.c3p0.stmt");
c3p0ConnectionLogger.setLevel(Level.FINEST);
c3p0ConnectionLogger.setUseParentHandlers(false);
Then you get log output of the form
24/08/2019 10.20.12:BST:FINEST: com.mchange.v2.c3p0.stmt.DoubleMaxStatementCache ----> CACHE HIT
24/08/2019 10.20.12:BST:FINEST: checkoutStatement: com.mchange.v2.c3p0.stmt.DoubleMaxStatementCache stats -- total size: 347; checked out: 1; num connections: 13; num keys: 347
24/08/2019 10.20.12:BST:FINEST: checkinStatement(): com.mchange.v2.c3p0.stmt.DoubleMaxStatementCache stats -- total size: 347; checked out: 0; num connections: 13; num keys: 347
making it clear when you get a cache hit. When there is no cache hit yo dont get the first line, but get the other two lines.
This is using C3p0 9.2.1

AHK Branching KeyWaits in Middle of Hotkey

I work in a doctors office doing billing. The programs made for this job are very basic and are absolutely riddled with bugs, so I repeat parts of my code a lot to make certain they work. I used two programs, one for the billing side, one for the chart. Right now, my hotkey grabs the date of birth and Medical Record Number of the patient from the billing side, goes to the chart side, searches for the patient based on those two things (normally the MRN would be sufficient, but Epic blows, so it's not enough) selects the patient, clicks "Chart Review," then waits for me to select a service date. Upon left click, it tabs back into the billing side so I can copy information to it. the issue is, sometimes the patient did not show up, and I have to record this. If they didn't show, there's no chart to click, and I have to click somewhere else to double check that they didn't show. I need a branching type of keywait where if I click, it tabs into the billing side, or if I hit A or something, it clicks appointments, and past, then tabs back to billing and clicks "Typed Notes". I can manage everything besides the branching part. Getkeystate statements don't seem to work, and I can't use an if statement with keywaits (apparently).
!D::
BlockInput, MouseMoveOff
sleep 100
Winactivate, Hyperspace
sleep 100
sendinput ^w
sleep 300
winactivate, Form billing
sleep 300
BlockInput, MouseMove
mouseclick,, 400, 70
BlockInput, MouseMove
click
sleep 200
sendinput ^c
sleep 400
dob:=Clipboard
sleep 400
BlockInput, MouseMove
mouseclick,, 385, 85
BlockInput, MouseMove
click
sleep 200
sendinput ^c
WinActivate, Hyperspace
sleep 400
sendinput ^3
sleep 400
sendinput ^v
sleep 400
BlockInput, MouseMove
mouseclick,, 200, 145
sleep 400
Clipboard:=dob
sleep 400
StringTrimLeft, dobyear, dob, 6
sleep 50
dobmathd:=A_YYYY-dobyear
sleep 50
StringTrimRight, dobmo, dob, 8
sleep 50
StringTrimRight, dobd, dob, 5
sleep 50
StringTrimLeft, dobday, dobd, 3
sleep 50
if (dobmo >= A_MM) and (dobday >= A_DD)
{
dobmathd--
}
sleep 50
sendinput ^v
sleep 200
sendinput {Enter}
sleep 200
sendinput {Enter}
sleep 1700
BlockInput, MouseMove
mouseclick,, 85, 235
sleep 300
BlockInput, MouseMoveOff
;if (character = a)
;{
;BlockInput, MouseMove
;mouseclick,, 325, 40
;sleep 200
;mouseclick,, 60, 285
;click
;sleep 400
;mouseclick,, 240, 435
;sleep 2000
;winactivate, Form billing
;BlockInput, MouseMoveOff
;return
;}
;if (
tooltip,%dobmathd% Years old, 415, 70
keywait, LButton, D, T200
sleep 200
winactivate, Form billing
return
The commented part was my last attempt, but I've been googling to find a real idea to try for a while. Any help is appreciated!
Edit: Maybe a "if I click here do this, or if I click here do this" kind of statement will work. I can get the dimensions of the Chart Review window vs the toolbar button for appointments. I've been experimenting with this for another task, but it might work here. Help with that would be appreciated too!
Edit:
#Bob, Actually, and sorry for the late reply, I found that looping a small statement with a few keywaits of very short lengths works well for me. I'll paste my code below.
And this is just a snippet, so it's not the full code.
SendInput, {Enter}
Sleep, 1800
BlockInput, MouseMove
MouseClick,, 85, 235
Sleep, 300
BlockInput, MouseMoveOff
Sleep, 20
Loop
{
KeyWait, LButton, D, T0.02 ;I've picked a chart, meaning they showed up for their appointment
If !ErrorLevel
{
Sleep, 400
BlockInput, MouseMoveOff
WinActivate, Form CMP
Return
}
KeyWait, Escape, D, T0.02
If !ErrorLevel
Return
KeyWait, ., D, T0.02 ;They do not appear to have shown up for their appointment, so check the appointment tab
If !ErrorLevel
{
BlockInput, MouseMove
MouseClick,, 315, 40
Sleep, 400
MouseClick,, 100, 285
Sleep, 1000
MouseClick,, 270, 440
Sleep, 300
BlockInput, MouseMoveOff
Loop
{
KeyWait, Y, D, T0.02 ;They did not show up for their appointment. Bill appropriately.
If !ErrorLevel
{
BlockInput, MouseMove
WinActivate, Form CMP
Sleep, 200
MouseClick,, 210, 260
Sleep, 200
MouseClick,, 100, 400
Sleep, 200
SendInput, No Show
Sleep, 200
WinActivate, Hyperspace
Sleep, 500
MouseClick,, 85, 235
Sleep 400
WinActivate, Form CMP
Sleep, 300
BlockInput, MouseMoveOff
Return
}
KeyWait, N, D, T0.02 ;Don't see a no show, re-check chart review.
If !ErrorLevel
{
BlockInput, MouseMove
MouseClick,, 85, 235
Sleep, 500
BlockInput, MouseMoveOff
KeyWait, LButton, D
Sleep, 400
WinActivate, Form CMP
BlockInput, MouseMoveOff
Return
}
KeyWait, Escape, D, T0.02
If !ErrorLevel
Return
}
}
}
I can't use an if statement with keywaits
There is a way to "abuse" Input command with L1 and V (might be good idea to throw in I as well) options to act as (somewhat limited) KeyWait replacement. That should work for your usage case.
(...)
Input,var,L1IV ; will act as KeyWait
if (var="a") {
foo:=Round(Sqrt(1764))
TrayTip,,The number is %foo%
}
else if (var="s")
MsgBox Sssnaaakess
(...)

BlackBerry downloading a file

I have a blackberry application that is downloading a file from online. Sometimes the download succeeds and other times it fails somewhere in the middle. It only seems to be a problem on the Curve 9360 device. When it fails, on the device it closes my app and shows a pop-up that says
"Uncaught exeption Application [MyApp] is not responding; process
terminated"
this is the while loop that it is in when it fails:
byte data[] = new byte[1024];
try {
while ((count = is.read(data)) != -1) {
total += count;
progress = (int)(total*100/lengthOfWebFile);
if(model.getValue() < progress){
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
EmbeddedMediaScreen.this.model.setValue(progress);
}
});
}
//write this chunk
os.write(data, 0, count);
}
} catch (Exception e) {
e.printStackTrace();
}
I don't get any kind of stack trace in the console when this happens. I get the following:
[710.328] Application BBCurve9360DemoLoop(314) is not responding; process terminated
[710.328]
[710.429] [0 0]
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
.[lots more "0 2"s]
.
.
.
[710.429] 2 203
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
[710.429] 0 2
.[lots more "0 2"s
.
.
Has anyone run across anything like this while pro grammatically downloading a file on a blackberry device?
Can anyone see anything in my IO loop that would cause this type of crash?
And lastly does anyone know if there is someway that I can get an actual stack trace of whatever exception is being thrown?
To print stack trace, you have to catch throwable instead of exception. My conclusion is based on the RIM note given below
RIM Implementation Note
Only uncaught exceptions have stack traces. The VM checks the current catch stack and if it finds anything that will catch the exception, it eliminates the stack trace to save time and memory. Any code in the current stack such as catch (Exception e) eliminates the stack trace.
If the exception is never caught, then the stack trace is generated.The stack trace is also generated if there is code such as catch (Throwable t).
Also
You get a "process terminated" message if the while loop doesnt end and the loop is continually putting in runnable objects in the event thread. Try to get rid of the invokeLater() and see if your process still gets terminated.
Try adding Thread.yield() after os.write(). This will give other threads the opportunity to run, and should stop your app from being killed by the JVM.

Resources