question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] infinite iteration over blobList

See original GitHub issue

Query/Question When I’m calling following code

    PagedIterable<BlobItem> items = azure.listBlobsByHierarchy(path);
    ArrayList<String> strings = new ArrayList<>();
    for (BlobItem item : items) {
      strings.add(item.getName());
    }
    return strings;

it cames out that loop is infinite, constantly repeating item1 → item2 → item3 → item1 → …

Why is this not a Bug or a feature Request? It doen’t look like a bug because I can’t reproduce it in clean environment. My custom environment is plugin for browsing Azure Blob Storage in IDEA.

Setup (please complete the following information if applicable):

  • OS: Manjaro Linux, 19.0.2, kernel 5.5.8-1-MANJARO
  • IDE : IntelliJ
  • Version of the Library used: 12.5.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:53 (22 by maintainers)

github_iconTop GitHub Comments

6reactions
anuchandycommented, May 12, 2020

If we follow the instruction listed in the above IntelliJ plugin thread, then Jackson is able to use the ServiceLoader:

Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());

not sure this is the optimal solution for plugin though.

1reaction
fcofdezcommented, Feb 8, 2021

Just FYI, I experience this issue when upgrading from jackson-databind 2.11.4 (Dec 2020) to 2.12.0 (Nov 2020) c.f.

I’ve experienced this same issue upgrading to 2.12.0, the problem seems to be that the default behaviour in that version has changed (https://github.com/FasterXML/jackson-dataformat-xml/issues/411) and for an empty block, it now returns an empty string instead of null. I don’t think there’s a way to inject a custom SerializerAdapter. The fix should be fairly trivial to implement in JacksonAdapter#JacksonAdapter and configure the parser to behave as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Azure Iterate through Blobs in a container - Stack Overflow
I'm trying through iterate through blobs from a container, but I'm getting errors. I'm using the following code from Microsoft Docs: One of ......
Read more >
azure.storage.blob.ContainerClient class | Microsoft Learn
Using chunks() returns an iterator which allows the user to iterate over the content in chunks. ... A non-infinite lease can be between...
Read more >
Loops and iteration - JavaScript - MDN Web Docs
This chapter of the JavaScript Guide introduces the different iteration ... The following example iterates through the elements in an array until it...
Read more >
Infinite loops and break · CodeCraft-Python - BuzzCoder
But there is a bug here! There is no i += 1 at the end of the loop body, so i will never...
Read more >
[1504.05078] Automatic Repair of Infinite Loops - arXiv
One well-known class of bugs is the infinite loop. ... and dynamically examine the state of the loop on a per-iteration basis.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found