Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.2
    • Fix Version/s: 0.7.2
    • Component/s: runtime
    • Labels:
      None

      Description

      use case :
      Open Firefox
      http://localhost:8080/AtmoSubscribeStreamingDemo/index3.html

      click on connect, subscrible letter, unsubcribe letter.. and disconnect

      [http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Using BlockingIOCometSupport.
      [http-8080-1] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
      HttpServletRequest: org.apache.catalina.connector.RequestFacade@f01771
      HttpServletResponse: org.apache.catalina.connector.ResponseFacade@933bcb
      [http-8080-1] INFO app.OpenChannelAction - BEGIN OpenChannelAction
      [http-8080-1] DEBUG org.atmosphere.container.BlockingIOCometSupport - Suspending response: org.apache.catalina.connector.ResponseFacade@933bcb
      [http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
      HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
      HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
      [http-8080-2] INFO app.SubscribeAction - BEGIN SubscribeAction
      [http-8080-2] INFO app.SubscribeAction - meteor: org.atmosphere.cpr.Meteor@bf053f
      Voulons faire un subscribe à = letter
      LettreBroadcastable called
      [http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
      HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
      HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
      [http-8080-2] INFO app.UnsubscribeAction - BEGIN UnsubscribeAction
      [http-8080-2] INFO app.UnsubscribeAction - meteor: org.atmosphere.cpr.Meteor@bf053f
      Voulons faire un unsubscribe à = letter
      [http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
      HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
      HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
      [http-8080-2] INFO app.CloseChannelAction - BEGIN SimpleAction.sendCometMsg()
      [http-8080-2] INFO app.CloseChannelAction - meteor: org.atmosphere.cpr.Meteor@bf053f
      [http-8080-2] INFO app.CloseChannelAction - meteor resumed
      meteor resumed
      LettreBroadcastable called
      [pool-3-thread-1] ERROR org.atmosphere.cpr.DefaultBroadcaster -
      java.lang.NullPointerException
      at org.atmosphere.cpr.DefaultBroadcaster.trackBroadcastMessage(DefaultBroadcaster.java:544)
      at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:400)
      at org.atmosphere.cpr.DefaultBroadcaster$6.run(DefaultBroadcaster.java:873)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      LetterBroadcaster call
      scheduleFixedBroadcast(new LettreBroadcastable(), 2, TimeUnit.SECONDS);

      look like the scheduler are still trying to submit a last task, but because the objects were destroy just before, we get a NPE.

        Activity

        Hide
        survivant added a comment -

        sample to reproduce the bug

        Show
        survivant added a comment - sample to reproduce the bug
        Hide
        survivant added a comment -

        in the Javadoc shutdownNow()

        There are no guarantees beyond best-effort attempts to stop processing actively executing tasks.

        Show
        survivant added a comment - in the Javadoc shutdownNow() There are no guarantees beyond best-effort attempts to stop processing actively executing tasks.
        Show
        jfarcand added a comment - Fixed https://github.com/Atmosphere/atmosphere/commit/e2d8cb6fb3a05d7edea4787b5dce8430dfe3f39a

          People

          • Assignee:
            Unassigned
            Reporter:
            survivant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: