Fix MaximumLength crash with datasets having >8 character states#204
Merged
Fix MaximumLength crash with datasets having >8 character states#204
Conversation
Co-authored-by: ms609 <1695515+ms609@users.noreply.github.com>
Co-authored-by: ms609 <1695515+ms609@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix crash issue in MaximumLength function
Fix MaximumLength crash with datasets having >8 character states
Nov 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MaximumLength(inapplicable.phyData[["Vinther2008"]])crashed with status -1073741819 (access violation). The Vinther2008 dataset has 10 character states (0-9), triggering two bugs.Bugs Fixed
Raw overflow in
MaximumLength.numeric():as.raw(seq_len(nToken))silently truncates values >255. With 10 states,nToken = 1023, causing incorrect bit operations.Incorrect indexing in
MinimumLength.numeric():tokens[, tokens[!squish], ...]is wrong—!squishon a positive integer returnsFALSE. Fixed totokens[, !tokens[squish, ], ...].Guards Added
length(counts) > 0before processingTests
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cloud.r-project.org/usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e ~n~options(repos~+~=~+~c(CRAN~+~=~+~'REDACTED'))~n~install.packages(c('TreeTools',~+~'ape',~+~'Rcpp',~+~'cli',~+~'cluster',~+~'fastmap',~+~'fastmatch',~+~'fs',~+~'future',~+~'promises',~+~'protoclust',~+~'Rdpack',~+~'shiny',~+~'shinyjs(dns block)cran.r-project.org/usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e install.packages(c('devtools',~+~'testthat'),~+~repos='REDACTED',~+~dependencies=TRUE)(dns block)esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.