Skip to content

The example code crashes Android app if compiled more than once #4

@JabberwockPL

Description

@JabberwockPL

The following minimal code works on Android if the INTERNET permission is NOT set and the first time after it IS set. The app compiled that way works without problems even after phone restart etc. Each subsequent compilation causes crashes right after starting the app. Turning the permission off, compiling and turning it on again makes it work once again.

Commenting the cam.read() line also prevents crashing.

My phone is Nexus 5 with LineageOS, Processing 3.3.4, Android Mode - last official release (0255), Android API 25.

import ipcapture.*;
 
IPCapture cam;
 
void setup() {
  cam = new IPCapture(this, "<a href="http://195.235.198.107:3346/axis-cgi/mjpg/video.cgi?resolution=320x240" target="_blank" rel="nofollow">http://195.235.198.107:3346/axis-cgi/mjpg/video.cgi?resolution=320x240</a>", "", "");
  cam.start();
 
}
 
void draw() {
  if (cam.isAvailable()) {
    cam.read();
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions